Realtime LoRA Trainer (SD 1.5 - sd-scripts)
A LoRA in under two minutes, inside ComfyUI
- image_1
- image_2
- image_3
- image_4
- lora_path
Everyone moved on to Flux and Z-Image for the interesting stuff, but SD 1.5 is still the fastest thing you can train a LoRA on - and this node makes that speed usable inside a live ComfyUI graph instead of a separate CLI trainer you have to babysit.
What it is and why you'd reach for it
This is one of ten trainer nodes in ShootTheSound/comfyUI-Realtime-Lora, "Realtime LoRA Trainer" - a pack whose whole pitch is closing the loop between training and using a LoRA without leaving your workflow. The pack author calls SD 1.5 out specifically as underrated: on a modern GPU, 500 steps can finish in around two minutes, fast enough that "train a quick LoRA, then immediately test it in the same workflow" is genuinely practical rather than aspirational. That makes this node less about chasing SOTA quality and more about rapid iteration - testing whether a concept, a face, or a style is even learnable before you commit to a longer run on a bigger model.
Training here runs on Kohya's sd-scripts under the hood, the same engine most SD 1.5/SDXL LoRA tutorials on the internet are written against - so if you outgrow this node's exposed settings, the vocabulary (rank, alpha, learning rate) transfers directly to running sd-scripts by hand.
Inputs and outputs that matter
- images_path - point it at a folder of training images (with
.txtcaptions for batch training), or use inputcount plus the image_1-image_4 / caption_1-caption_4 optional slots for a small hand-picked set. - sd_scripts_path - where sd-scripts is installed (default
~/sd-scripts). The node calls into that install; you never open it directly. - ckpt_name - a dropdown of SD 1.5 checkpoints ComfyUI already knows about.
- caption - the default caption used when you haven't supplied per-image ones; rare trigger words still apply here the same as anywhere else.
- training_steps (default 500), learning_rate (default 0.0005), lora_rank (default 16) - SD 1.5-era defaults, and unlike the newer flow-matching architectures in this pack, SD 1.5's settings tables are the settled, well-trodden ones - this is the one model here where a generic "rank 16-32, LR 1e-4 to 3e-4" internet guide still roughly applies.
- vram_mode - three presets,
Min (256px)up toMax (768px); the shipped default isLow (512px). - output_name, keep_lora - filename and whether to retain the output after the run.
- Output: lora_path - a string, feed it straight into
lora_path_opton the pack's other SD 1.5 nodes (the SD 1.5 Model Layer Editor, or a standard LoRA loader) or the Apply Trained LoRA node.
Installing it
The node comes with the pack. ComfyUI Manager: search "Realtime LoRA Trainer." Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ShootTheSound/comfyUI-Realtime-Lora
Restart ComfyUI. That's the whole install for using the pack's loaders and analyzers. Actually training needs sd-scripts installed separately (kohya-ss/sd-scripts on GitHub - follow its own instructions), and the README's one Python-version warning applies here too: 3.10-3.12, with 3.10 the safest bet and 3.13 explicitly not recommended yet.
Troubleshooting
ckpt_name dropdown is empty. It only lists what's already in your checkpoints folder in a format ComfyUI recognizes as SD 1.5 - an empty dropdown means nothing matched, not that the node is broken.
Training either errors immediately or silently does nothing. Almost always sd_scripts_path pointing at a folder that isn't actually a working sd-scripts install, or a Python version mismatch - the README specifically calls out 3.13 as untested territory for both sd-scripts and AI-Toolkit training paths.
The trained LoRA doesn't look like anything changed. At the SD 1.5 scale of dataset (15-25 images for a character), 500 steps at the default settings is a reasonable starting point, but a genuinely undertrained result usually means too few steps or too low a learning rate for the dataset size - raise steps before touching anything else, since SD 1.5 tolerates more steps per image than the newer, larger architectures in this pack do.
Repeated runs on the same inputs seem to skip training entirely. That's a feature, not a bug - the pack caches automatically, so identical inputs reuse the existing LoRA instead of re-training from scratch.
Inputs (20)
| Name | Type | Default | Description |
|---|---|---|---|
| inputcount | INT | 41–100 | Number of image inputs. Click 'Update inputs' button after changing. |
| images_path | STRING | Optional: Path to folder containing training images. If provided, images from this folder are used instead of image inputs. Caption .txt files with matching names are used if present. | |
| sd_scripts_path | STRING | ~/sd-scripts | Path to kohya sd-scripts installation. |
| ckpt_name | COMBO | SD 1.5 checkpoint to train LoRA on. | |
| caption | STRING | photo of subject | Default caption for all images. Per-image caption inputs override this. |
| training_steps | INT | 50010–5000 | Number of training steps. 500 is a good starting point. Increase for more images or complex subjects. |
| learning_rate | FLOAT | 0.00050.00001–0.1 | Learning rate. 0.0005 trains fast but may overshoot. Experiment with lowering for more stable/slower training. |
| lora_rank | INT | 164–128 | LoRA rank/dimension. 16-32 typical. Higher = more capacity but larger file and more VRAM. |
| vram_mode | COMBO | Low (512px) | VRAM optimization preset. Images are automatically resized to the specified resolution. |
| keep_lora | BOOLEAN | true | If True, keeps the trained LoRA file. |
| output_name | STRING | MyLora | Custom name for the output LoRA. Timestamp will be appended. |
| custom_python_exe | STRING | Advanced: Optionally enter the full path to a custom python.exe (e.g. C:\my-venv\Scripts\python.exe). If empty, uses the venv inside sd_scripts_path. The sd_scripts_path field is still required for locating training scripts. | |
| image_1opt | IMAGE | Training image (not needed if images_path is set). | |
| caption_1opt | STRING | Caption for image_1. Overrides default caption. | |
| image_2opt | IMAGE | Training image. | |
| caption_2opt | STRING | Caption for image_2. Overrides default caption. | |
| image_3opt | IMAGE | Training image. | |
| caption_3opt | STRING | Caption for image_3. Overrides default caption. | |
| image_4opt | IMAGE | Training image. | |
| caption_4opt | STRING | Caption for image_4. Overrides default caption. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| lora_path | STRING | Path to the trained SD 1.5 LoRA file. |