Reference Train Options
The training knobs, without abandoning the defaults
- train_options
The whole pitch of this pack is "don't think about training settings," and this node is the escape hatch for when you do. It's a bundle of overrides that plugs into Instant Reference LoRA or Instant Reference LoRA Train via the optional train_options socket. Every field defaults to 0 (or off), which means "use the profile's setting" - so you can add one and only change the one thing you care about.
The profiles ship with sane, fast defaults: 50 steps, AdamW at 1e-3, LoCon with dim/alpha 16 on SDXL, an 8-dim lora_anima network on the Anima profile, both UNet-only and bf16. Most runs should never touch this node. But the defaults are also deliberately rough - 50 steps is an adaptation, not a finish - and this is where you go when a result is close but not close enough.
The inputs that matter
- force_retrain - the one you'll actually use. The pack caches by hashing images, checkpoint, captions, and options, so "just try again" does nothing. Flip this on to bypass the cache and retrain for real.
- steps_override - 0 means profile default (50). Raise to a few hundred for a more complete character LoRA; you're trading minutes per run for quality.
- network_dim_override / network_alpha_override - the rank and alpha, Kohya's vocabulary. Dim is capacity, alpha is how strongly it's applied; the classic relationship is alpha at (or below) dim. Push dim up to 32–64 for a stronger capture at the cost of more VRAM and a bigger file.
- learning_rate_override - 0 uses the profile's 1e-3. If you raise steps, you'll usually want to lower this; the KB's advice on SDXL-era recipes applies here.
- resolution_override - a string in
"1024,1024"format, since profiles train at 1024². - seed_override - set a fixed seed for reproducible training runs;
-1means random. - gradient_checkpointing, cache_latents, cache_text_encoder_outputs - memory and speed toggles, all default on. Leave them unless your GPU is crying.
- train_batch_size_override - batch size; 0 uses the profile.
Outputs
One: train_options, wired into the training node's train_options socket.
Install
ComfyUI Manager → search "Instant Reference" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/cstria0106/comfyui-instant-reference
Notes
Two things to keep in mind. First, the cache key includes your training options, so changing any of these fields invalidates the cached LoRA and starts a fresh training run - which is exactly what force_retrain would do anyway, just with intent. Second, the actual training runs through sd-scripts in the pack's own venv, so first run still pays the heavy setup cost (sd-scripts clone, Python 3.12 on Windows, tagger download) before any of your overrides matter. After that, iterate freely - this is the node that turns "instant reference" from a party trick into something you can actually tune.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| steps_override | INT | 00–100000 | — |
| learning_rate_override | FLOAT | 0.00000–1 | — |
| network_dim_override | INT | 00–1024 | — |
| network_alpha_override | INT | 00–1024 | — |
| resolution_override | STRING | — | |
| gradient_checkpointing | BOOLEAN | true | — |
| cache_latents | BOOLEAN | true | — |
| cache_text_encoder_outputs | BOOLEAN | true | — |
| seed_override | INT | -1-1–2147483647 | — |
| force_retrain | BOOLEAN | false | — |
| train_batch_size_override | INT | 00–256 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| train_options | TRAIN_OPTIONS | — |