How to train an SDXL LoRA with OneTrainer on a cloud GPU

Rent a GPU on Deploy, then open a terminal in JupyterLab or over SSH. Install OneTrainer from the official Nerogar/OneTrainer repository, put captioned images in a folder the way its quick start describes, and train from the CLI or the UI that repository ships. Copy the LoRA and the workspace backups off the instance before you destroy it. Destroying the instance deletes its disk.

The repository LICENSE.txt file is the GNU Affero General Public License, Version 3, 19 November 2007 (read 2026-11-12). That is the license for the OneTrainer program. The SDXL weights have their own license. The preset named below stores the base-model repository name in base_model_name. Copy that value from the preset file. This page does not paste it. Read the weights’ license before you train or redistribute a LoRA.

Another SDXL trainer is How to run Kohya_ss on a cloud GPU. A different LoRA trainer is How to train a FLUX LoRA with AI Toolkit on a cloud GPU. A generic checkpoint resume is How to save and resume training checkpoints on a cloud GPU. OneTrainer’s own continue path is the backup directory described below, not that page’s PyTorch snippet.

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 repository says about memory

The OneTrainer README and docs/QuickStartGuide.md publish no GPU GB figure (read 2026-11-12). The README says you can optionally keep EMA weights in CPU memory to reduce VRAM usage. The quick start says a higher batch size requires more VRAM. Neither file prints a number of GB. This page does not add one.

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-12T19:13:48.059Z. GET /v1/public/gpu-catalog the same day (generated_at 2026-11-12T19:13:49.196Z) 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. There is no upstream GPU GB cutoff to match these values against. Which listing you can start is on Deploy. This page does not say which listings are available.

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

Weight sizes for SDXL on CloudGPU’s model page are a different source: How much VRAM do I need for FLUX and SDXL?. Those figures are not in the OneTrainer README.

Install on Linux

On Deploy, choose Raw GPU. The README says installing OneTrainer requires Python >=3.11.1 and <3.14. lib.include.sh sets OT_CONDA_USE_PYTHON_VERSION to 3.13, OT_PYTHON_VERSION_MINIMUM to 3.11.1, and OT_PYTHON_VERSION_TOO_HIGH to 3.14. If conda is not on PATH, use how to set up a conda environment on a cloud GPU. LAUNCH-SCRIPTS.md says OneTrainer installs and manages the Python version via Conda when Conda is present. This page did not check whether the Raw GPU image already has conda.

The README’s automatic Linux install, copied:

git clone https://github.com/Nerogar/OneTrainer.git
cd OneTrainer
./install.sh

The cd is the manual section’s “Navigate into the cloned directory”, placed so ./install.sh runs inside the clone. install.sh itself is seven lines: it enables set -e, sources lib.include.sh, and calls prepare_runtime_environment. This page did not run it.

lib.include.sh chooses requirements-cuda.txt or requirements-cuda-legacy.txt from the CUDA Version line in the nvidia-smi header. The comment in that function says a major version below 13 selects the legacy file, and that a missing nvidia-smi or a header without that line keeps the CUDA 13 default. requirements-cuda.txt pins torch==2.12.0+cu130 and torchvision==0.27.0+cu130 with --extra-index-url https://download.pytorch.org/whl/cu130. requirements-cuda-legacy.txt pins torch==2.12.0+cu126 and torchvision==0.27.0+cu126 with --extra-index-url https://download.pytorch.org/whl/cu126. The file says the legacy file is the CUDA 12.6 build. How to install a specific PyTorch CUDA version is the index check. cloudgpu-net is not in the OneTrainer README. The download speed guide says to leave it off during pip.

The README’s Ubuntu example for a missing library, copied. This page did not check whether the image is Ubuntu:

sudo apt-get update
sudo apt-get install libgl1

Dataset folder

docs/QuickStartGuide.md says to place the images in any directory. For prompts it gives two options: a .txt file with the same name in the same directory, for example image1.jpg and image1.txt, or renaming the images with the prompt. A concept then points at that directory. The prompt source can be .txt files in the same directory, the image filenames, or a single .txt file with one prompt per line. Mask files, when you use masked training, use the image name plus -masklabel.png.

The quick start says a workspace should be an empty directory for one run, and that it holds backup, sampling, and TensorBoard data. It says the TensorBoard button opens a web interface. It does not print a port. This page does not add one. How to use SSH port forwarding on a cloud GPU is the tunnel page for a port you already know.

UI and CLI

The README’s Unix GUI route is start-ui.sh. That script calls scripts/train_ui_qt.py. It is a Qt window, not a Gradio app, and start-ui.sh does not print a listen port. This page did not check whether the window opens over SSH. There is no Gradio route to forward.

The CLI is the headless route. LAUNCH-SCRIPTS.md says to use run-cmd.sh, and its training example is:

./run-cmd.sh train --config-path <path to your config>

docs/CliTraining.md says the configuration is a .json file passed to python scripts/train.py, and that the UI export button writes a single file with every setting. The angle-bracket path above is the launch doc’s placeholder, not a file this page created.

The SDXL LoRA preset is training_presets/SDXL/#sdxl 1.0 LoRA.json (read 2026-11-12). Fields this page read:

Field Value in that file
training_method LORA
model_type STABLE_DIFFUSION_XL_10_BASE
output_model_format KOHYA_LORA
output_model_destination models/lora.safetensors
resolution 1024
batch_size 4
learning_rate 0.0003
backup_after 10

base_model_name is also set. Copy it from the file. The file does not contain backup_after_unit. TrainConfig.default_values() in modules/util/config/TrainConfig.py sets backup_after to 30 and backup_after_unit to TimeUnit.MINUTE. BaseConfig.from_dict leaves a missing key on that default. This page did not load the preset, so it does not state that a run backs up on a 10-minute interval. The same default list sets save_every to 0 and save_every_unit to TimeUnit.NEVER. The preset file does not override those two keys.

The quick start’s Backup and Continue section says backups are saved in the workspace and contain the model data to continue, and that you continue by selecting the backup directory as the base model. It also says backups are not for external tools and to use saves. The preset’s save path is models/lora.safetensors in the table above.

To keep the CLI running after SSH drops, this page wraps the launch-doc command in tmux. That wrapper is not in LAUNCH-SCRIPTS.md:

tmux new -s onetrainer
./run-cmd.sh train --config-path <path to your config>

No ComfyUI install in the OneTrainer README

The OneTrainer README does not document ComfyUI. The ComfyUI examples top-level directory list on 2026-11-12 had sdxl and lora directories and no OneTrainer directory. Those directories are not this installer. This page does not add a ComfyUI workflow.

When it fails

CUDA out of memory. The README and the quick start do not print a VRAM cutoff. LAUNCH-SCRIPTS.md says OT_CUDA_LOWMEM_MODE=true enables aggressive garbage collection in PyTorch for low-memory GPUs, and that the default is false. Its command-line example is env OT_PREFER_VENV="true" OT_CUDA_LOWMEM_MODE="true" OT_PLATFORM_REQUIREMENTS="requirements-cuda.txt" ./start-ui.sh. If the process raises an out-of-memory 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. The requirements files pin torch==2.12.0+cu130 or, when the driver CUDA major version is below 13, torch==2.12.0+cu126. 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. The legacy file’s own comment calls it the CUDA 12.6 build. This page did not run either pin on an RTX 5090. Catalog RTX 5090 and RTX 5090D are 32. That is the catalog value, not a OneTrainer requirement.

Save the LoRA, then destroy

Copy models/lora.safetensors and the workspace directory off the instance before you destroy it. 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 pricing page states the billing rule in these words:

Per minute, rounded up, with a 1-minute minimum. One hour is pre-authorised while an instance runs, and unused minutes go back to your balance when you destroy the instance. There is no subscription and no minimum term.

Prices are not copied here.

Frequently asked questions

How much VRAM does the OneTrainer README publish?

The OneTrainer README and docs/QuickStartGuide.md publish no GPU GB figure (read 2026-11-12). The README says EMA weights can be kept in CPU memory to reduce VRAM usage, and the quick start says a higher batch size requires more VRAM. Neither file prints a number of GB. There is no upstream cutoff to match against vram_gb in https://cloudgpu.app/gpu-prices.json. Which listing you can start is on https://cloudgpu.app/deploy.

Which license covers OneTrainer?

The repository LICENSE.txt file is the GNU Affero General Public License, Version 3, 19 November 2007. That is the license for the program. The SDXL weights named by the preset base_model_name field have their own license. Copy that field from training_presets/SDXL/#sdxl 1.0 LoRA.json and read it before you train or redistribute a LoRA.

How does OneTrainer expect an SDXL dataset to be laid out?

docs/QuickStartGuide.md says to put the images in any directory. One option is a text file with the same name beside each image, such as image1.jpg and image1.txt. The other option is renaming the images with the prompt. A concept points at that directory. Mask files use the image name plus -masklabel.png.

Do the LoRA and the backups stay on the instance after I destroy it?

No. Copy models/lora.safetensors from the SDXL LoRA preset and the workspace directory off the instance first. The quick start says backups are saved in the workspace. 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).