How to train a FLUX LoRA with FluxGym on a cloud GPU

Rent a GPU on Deploy, then open a terminal in JupyterLab or over SSH. Install FluxGym from the official repository with the manual Linux steps that README prints, start python app.py, upload images and captions in the page, and copy the outputs directory off the instance before you destroy it. Destroying the instance deletes its disk.

The README names 12GB, 16GB, and 20GB. It also says that project “only works for 24GB VRAM”. That sentence is about AI Toolkit, not a fourth FluxGym tier. Training a FLUX LoRA with AI Toolkit is How to train a FLUX LoRA with AI Toolkit on a cloud GPU. Kohya’s GUI, which FluxGym’s backend is built on, is How to run Kohya_ss on a cloud GPU. Loading a FLUX checkpoint in ComfyUI is How to run FLUX.1-dev in ComfyUI on a cloud GPU. Saving and resuming a training run is How to save and resume training checkpoints on a cloud GPU.

The commands below are copied from the upstream files named in each step. They were not run on a CloudGPU instance for this page. Anything this page adds around them is marked.

What the README says about memory

The FluxGym README heading names 12GB, 16GB, and 20GB, and a later sentence says it supports 12GB, 16GB, and 20GB VRAMs. app.py builds the VRAM control as a radio with choices 20G, 16G, and 12G, and the default value is 20G. The 16G branch writes an adafactor optimizer block. The 12G branch writes adafactor plus --split_mode and --network_args "train_blocks=single". The else branch’s comment says 20G+ VRAM and writes --optimizer_type adamw8bit. A block that checks vram == "8G" is commented out and is not a radio choice. This page did not run the app.

The README’s sentence that the other project “only works for 24GB VRAM” is that file’s claim about AI Toolkit. The AI Toolkit guide says the 24gb in its example config filename is the upstream filename, not a fit check. This page does not merge those two sentences into one number.

GET /v1/public/compute-capabilities does not list GPUs. It returns feature flags. The memory column is vram_gb from gpu-prices.json, updated_at 2026-11-12T22:09:18.532Z. GET /v1/public/gpu-catalog the same day (generated_at 2026-11-12T22:09:19.501Z) listed the same names and the same vram_gb values, plus Ascend 910B at 64, which is not in gpu-prices.json and is not listed here. The catalog response also includes an availability field. This page does not copy it. RTX 2080 is 8, RTX 3080 is 10, and RTX 2080 Ti is 11, which are below 12 as numbers. RTX 3080 Ti is 12, equal to the 12G label as a number. V100 16G is 16, equal to the 16G label as a number. No catalog row is 20. Rows at 24 and above are above 20 as a number. This page does not mark a row as enough. Which listing you can start is on Deploy. The catalog had no FluxGym template. The catalog template named ComfyUI has id flux-1-dev, recommended_gpu RTX 4090 48G, and min_vram_gb 24. Those are template fields, not the FluxGym README’s 12GB, 16GB, and 20GB labels.

Catalog name vram_gb
RTX 2080 8
RTX 3080 10
RTX 2080 Ti 11
RTX 3080 Ti 12
V100 16G 16
A30 24
RTX 3090 24
RTX 4090 24
RTX 4090D 24
RTX 4080 SUPER 32G 32
RTX 5090 32
RTX 5090D 32
V100 32G 32
A100 40G 40
A800 40G 40
A40 48
RTX 4090 48G 48
RTX 4090D 48G 48
RTX A6000 48
NVIDIA RTX PRO 5000 72G 72
RTX PRO 5000 72G 72
A100 80G 80
A800 80G 80
H800 80
RTX 6000D 83
H20 96G 96
RTX PRO 6000 96G 96
RTX PRO 6000 Max-Q 96
H20-3e 141G 141

License and the models the file names

The repository LICENSE grants permission “free of charge”. The copyright line is “Copyright 2024 cocktailpeanut”. That “free of charge” sentence is the license text. It is not a CloudGPU price and not a storage allowance. The commits API on 2026-11-12 listed 0667073462fc226f2bf09c7d20b9eb99401de188 on the default branch, committed 2026-07-28T05:07:19Z. The GitHub license field the same day was MIT.

models.yaml is the file the README says the app downloads from. The flux-dev entry sets repo to cocktailpeanut/xulf-dev, base to black-forest-labs/FLUX.1-dev, file to flux1-dev.sft, and license_name to flux-1-dev-non-commercial-license. The flux-schnell entry sets repo and base to black-forest-labs/FLUX.1-schnell, file to flux1-schnell.safetensors, and license to apache-2.0. The bdsqlsz/flux1-dev2pro-single entry sets file to flux1-dev2pro.safetensors and the same dev license_name. Those ids and filenames are the file’s text. Read the license each entry links before commercial use. The README says the models download when you start training with the model selected. This page did not start a training run.

Install on Linux

On Deploy, choose Raw GPU. The README also has a one-click section. This page follows the manual Linux section. Copied:

git clone https://github.com/cocktailpeanut/fluxgym
cd fluxgym
git clone -b sd3 https://github.com/kohya-ss/sd-scripts
python -m venv env
source env/bin/activate
cd sd-scripts
pip install -r requirements.txt
cd ..
pip install -r requirements.txt

The README then says to install a PyTorch nightly build, and it prints this index:

pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

Its next paragraph says that for NVIDIA RTX 50-series, including 5090, you install a cu128 nightly build and update bitsandbytes:

pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128
pip install -U bitsandbytes

Those are the README’s two alternatives. This page did not run either line and does not say which index a given driver accepts. How to install a specific PyTorch CUDA version is a separate page. The RTX 5090 guide says that card is compute capability 12.0 (sm_120) and needs a PyTorch build for CUDA 12.8 or newer. This page did not re-test FluxGym on an RTX 5090. Catalog RTX 5090 and RTX 5090D are 32, which is above the README’s 20GB figure as a number. That comparison is the memory number only.

requirements.txt lists gradio with no version pin. It also pins other packages, including diffusers==0.38.0 and transformers==4.49.0. This page did not install them.

The launch the README prints, with the venv activated, from the fluxgym directory:

source env/bin/activate
python app.py

The Docker section is a different install. It prints docker compose up -d --build and says to open http://localhost:7860. That URL is the Docker section’s URL. app.py does not pass a port. See the next section.

The page, captions, and SSH

The README’s usage list is: enter the LoRA info, upload images and caption them using the trigger word, and click start. Its caption rules are: each caption file is a .txt file, each caption file has an image with the same name, and img0.png pairs with img0.txt.

app.py ends with demo.launch(debug=True, show_error=True, allowed_paths=[cwd]). It does not pass server_name, server_port, or a share flag. requirements.txt does not pin Gradio, so this page does not state which address or port that call binds. Read the URL the process prints. The Docker section’s http://localhost:7860 is not a line from app.py.

To keep that process after the SSH session closes, this page wraps it in tmux. The README does not print tmux:

tmux new -s fluxgym
cd fluxgym
source env/bin/activate
python app.py

The tunnel command is not in the FluxGym README. It is the form in how to use SSH port forwarding on a cloud GPU, using the port the process prints:

ssh -N -L <port>:127.0.0.1:<port> -p <ssh-port> <ssh-user>@<ssh-host>

Then open http://127.0.0.1:<port> on your computer.

The README’s sample-image section says sample generation is off unless you set the prompt field and the “every N steps” field. Its example sentence uses 960 expected steps and an interval of 100. Those numbers are the README’s example. This page did not time a run and does not treat them as a duration.

ComfyUI route

The FluxGym README does not document a ComfyUI custom node. The ComfyUI examples top-level list on 2026-11-12 had flux and lora directories and no FluxGym directory. The lora example says to put LoRA files in models/loras and to apply them with the LoraLoader node. FluxGym does not write that folder. app.py builds the training directory as outputs/ plus a slug of the LoRA name, and the generated script passes --output_dir, --output_name, and --save_model_as safetensors. Copy that directory off, then place a file where the ComfyUI lora example says if you load it there. The FLUX.1-dev ComfyUI guide linked above is the checkpoint install. This page does not claim FluxGym’s output is already in that template’s folders.

When it fails

CUDA out of memory. The README does not print a CUDA out-of-memory procedure. The radio’s 12G and 16G branches are the file’s own lower-memory settings, quoted above. If the process raises that error, use how to fix CUDA out of memory on a cloud GPU.

“CUDA error: no kernel image is available for execution on the device” on an RTX 5090. Use the README’s cu128 nightly paragraph, quoted above, and the RTX 5090 guide linked above. This page did not run that install.

Save the LoRA, then destroy

app.py sets output_dir to outputs/<slug>, writes dataset.toml and sample_prompts.txt in that directory, and passes the directory to the training script as --output_dir. Copy that directory off before you destroy the instance. Save your work before you destroy a cloud GPU is the checklist. The terms say data on local instance storage is permanently deleted when the instance is destroyed. The checkpoint guide linked above is the general save-and-resume page. It is not a FluxGym flag.

The pricing page FAQ states the billing rule in these words:

Per-minute options have a 1-minute minimum; unused prepaid minutes are refunded when you destroy the instance. Some configurations use whole-hour billing with a 1-hour minimum; unused time within a charged hour is not refunded on voluntary stop. The billing period, minimum charge and initial prepayment are shown before confirmation. No subscription.

Prices are not copied here.

Frequently asked questions

What VRAM tiers does the FluxGym README publish?

The FluxGym README names 12GB, 16GB, and 20GB. app.py’s radio choices are 20G, 16G, and 12G, and the default is 20G. A commented block checks 8G and is not a radio choice. In https://cloudgpu.app/gpu-prices.json (updated_at 2026-11-12T22:09:18.532Z), RTX 2080 is 8, RTX 3080 is 10, and RTX 2080 Ti is 11, which are below 12 as numbers. RTX 3080 Ti is 12. V100 16G is 16. No catalog row is 20. Rows at 24 and above are above 20 as a number. This page does not mark a row as enough. Which listing you can start is on https://cloudgpu.app/deploy.

What is the upstream license?

The repository LICENSE grants permission free of charge, and the copyright line is Copyright 2024 cocktailpeanut. That free of charge sentence is the license text. It is not a CloudGPU price and not a storage allowance. models.yaml sets license apache-2.0 on the flux-schnell entry and license_name flux-1-dev-non-commercial-license on the flux-dev and flux1-dev2pro entries. Read the license each entry links before commercial use. The commits API on 2026-11-12 listed 0667073462fc226f2bf09c7d20b9eb99401de188 on the default branch, committed 2026-07-28T05:07:19Z.

How do I open the FluxGym UI through SSH?

The README’s manual launch is python app.py with the venv activated. app.py calls demo.launch(debug=True, show_error=True, allowed_paths=[cwd]) and does not pass server_name, server_port, or a share flag. requirements.txt lists gradio with no version pin, so this page does not state a port for that call. Read the URL the process prints and forward that port to 127.0.0.1. The Docker section prints http://localhost:7860 for the compose route. That URL is not a line from app.py.

Where does FluxGym save the LoRA, and does it stay after I destroy the instance?

app.py builds the directory outputs/ plus a slug of the LoRA name, and the generated script passes --output_dir, --output_name, and --save_model_as safetensors. Copy that directory off before you destroy the instance. It does not stay. The terms say data on local instance storage is permanently deleted when the instance is destroyed.

Sources (read 2026-11-12, Asia/Shanghai)


Cards you can start are on the Deploy page. Prices are on https://cloudgpu.app/pricing and are not repeated here.

Last updated: 2026-11-12 (Asia/Shanghai).