Init SD3 LoRA Training
LoRA training for SD3.5 inside ComfyUI
- sd3_models
- dataset
- optimizer_settings
- resume_args
- block_args
- loss_args
- network_trainer
- epochs_count
- args
The SD3/SD3.5 sibling of the Init family. If you're training a LoRA for Stable Diffusion 3.5 and you'd rather do it in ComfyUI than spin up Kohya separately, InitSD3LoRATraining is the node that configures and launches the run. It's the least-trafficked of the three Init nodes for a reason - SD3.5 never grew the training community that Flux and SDXL did - but if that's your base model, this is your node.
Like the rest of the pack, it wraps kohya-ss/sd-scripts, so the knobs and their names are Kohya's. SD3.5 shares Flux's DNA in the ways that matter to a trainer: it's a flow-matching model with a T5 text encoder alongside the CLIP pair, which is why you'll see flow-shift and T5 options here that SDXL doesn't have.
How it works
You feed it three required inputs - sd3_models (type TRAIN_SD3_MODELS), a dataset JSON, and optimizer_settings from an OptimizerConfig node - and it builds a trainer. The output network_trainer (NETWORKTRAINER) goes into a FluxTrainLoop node to run steps, exactly like the Flux and SDXL paths; the loop machinery is shared. You also get epochs_count and the raw Kohya args.
The inputs that matter
network_dim(default 16) andnetwork_alpha(default 16) - a reasonable 1:1 starting point.learning_rate(default 1e-4) - a sensible default for this architecture family.max_train_steps(default 1500) - scale to your dataset.training_shift(default 3) - the flow-matching timestep shift, specific to SD3-style models. The default is a fine starting point; it's not a knob to fiddle with blind.train_text_encoder- this one exposes the full menu (clip_l,clip_l+T5, and fp8 variants). On modern flow-matching bases you generally leave the text encoders frozen and just cache their outputs, sodisabledis the safe default. Caching (cache_text_encoder_outputs) is also your biggest speed win here.blocks_to_swapandfp8_base- the usual VRAM levers.
Installing the pack
Via ComfyUI Manager: search ComfyUI Flux Trainer, install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-FluxTrainer
pip install -r ComfyUI-FluxTrainer/requirements.txt
Torch 2.4.0+ is recommended, and the examples pull in kijai's ComfyUI-KJNodes. Use the normal fp8/fp16 SD3.5 model files, and - as with Flux - make sure any VAE you supply is the standard non-diffusers safetensors, not the diffusers folder version.
Common issues
Fewer guides exist for SD3.5. This is the honest one. The training community largely skipped SD3.5, so you'll find far fewer copy-paste recipes than for SDXL or Flux. Lean on the pack's example workflows and the general flow-matching intuition (frozen encoders, cache the outputs, moderate learning rate) rather than hunting for an SD3.5-specific settings table that may not exist.
Dataset setup is the same trap as everywhere else. A bad or empty dataset JSON throws an opaque parse error. Build your dataset with the pack's dataset node, keep captions in .txt files next to the images, and make sure the folder path resolves before you start.
It's experimental. Kijai's README is blunt that the whole thing is work-in-progress and that his defaults aren't necessarily good. Validate on a short run before committing hours of GPU time.
Inputs (28)
| Name | Type | Default | Description |
|---|---|---|---|
| sd3_models | TRAIN_SD3_MODELS | — | |
| dataset | JSON | — | |
| optimizer_settings | ARGS | — | |
| output_name | STRING | sd35_lora | — |
| output_dir | STRING | sd35_trainer_output | path to dataset, root is the 'ComfyUI' folder, with windows portable 'ComfyUI_windows_portable' |
| network_dim | INT | 161–2048 | network dim |
| network_alpha | FLOAT | 16.000–2048 | network alpha |
| learning_rate | FLOAT | 0.00010–10 | learning rate |
| max_train_steps | INT | 15001–100000 | max number of training steps |
| cache_latents | COMBO | caches text encoder outputs | |
| cache_text_encoder_outputs | COMBO | caches text encoder outputs | |
| training_shift | FLOAT | 3.00000–10 | shift value for the training distribution of timesteps |
| highvram | BOOLEAN | false | memory mode |
| blocks_to_swap | INT | 00–100 | option for memory use reduction. The maximum number of blocks that can be swapped is 36 for SD3.5L and 22 for SD3.5M |
| fp8_base | BOOLEAN | false | use fp8 for base model |
| gradient_dtype | COMBO | fp32 | the actual dtype training uses |
| save_dtype | COMBO | bf16 | the dtype to save checkpoints as |
| attention_mode | COMBO | sdpa | memory efficient attention mode |
| train_text_encoder | COMBO | disabled | also train the selected text encoders using specified dtype, T5 can not be trained without clip_l |
| clip_l_lr | FLOAT | 0.00000–10 | text encoder learning rate |
| clip_g_lr | FLOAT | 0.00000–10 | text encoder learning rate |
| T5_lr | FLOAT | 0.00000–10 | text encoder learning rate |
| sample_prompts | STRING | illustration of a kitten | photograph of a turtle | validation sample prompts, for multiple prompts, separate by `|` |
| gradient_checkpointing | COMBO | enabled | use gradient checkpointing |
| additional_argsopt | STRING | additional args to pass to the training command | |
| resume_argsopt | ARGS | resume args to pass to the training command | |
| block_argsopt | ARGS | limit the blocks used in the LoRA | |
| loss_argsopt | ARGS | loss args |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| network_trainer | NETWORKTRAINER | — |
| epochs_count | INT | — |
| args | KOHYA_ARGS | — |