VRGDG Z-Image Speed Character Lora Training
Train a Z-Image character LoRA without ever leaving ComfyUI
- model
- image1
- image2
- image3
- image4
- image5
- image6
- image7
- image8
- image9
- image10
- image11
- image12
- image13
- image14
- image15
- image16
- image17
- image18
- image19
- image20
- model
- latest_state_path
- log_path
- latest_comfy_lora_path
- output_name
- completed_steps
- total_target_steps
LoRA training usually means leaving ComfyUI, opening a trainer, building a dataset folder, and babysitting a config file. VRGDG_ZImageSpeedCharacterLoraTraining is VRGameDevGirl's answer: it runs the Z-Image trainer with a fast character-LoRA preset and takes its dataset as dynamic IMAGE inputs with caption fields right on the node. Paste images, type captions, run - it handles dataset prep, caching, config generation, training, and loading the finished LoRA back onto the model.
It descends from the author's LTX "easy LoRA training inside ComfyUI" nodes, which earned real traction in r/comfyui for exactly this reason: training inside the graph, with resumable state and previews, instead of a command line. And Z-Image is a genuinely good target - small (6B), LoRA-friendly, and the community consensus is that a character LoRA on 10-20 clean images is one of the easiest wins in modern training.
How it works
The important settings, in order of how often you'll touch them:
model(MODEL input) - the Z-Image checkpoint you're training from, wired in from a loader. Training happens on top of it.image_count(default 4, up to 20) - how many image/caption slot pairs the node shows. Add your character reference shots here and caption each.workspace_dir- where the node keeps cache, output, logs, config, and "the managed dynamic dataset." Mandatory to fix first - see below.musubi_root,zimage_checkpoint,vae,text_encoder- paths into your musubi install and the files it trains with (Z-Image DiT, VAE, Qwen3 encoder). The node is a wrapper around musubi-tuner, so these must point at real files.resolution_width/resolution_height(default 1024×1024) - the training bucket size. The tooltip says it plainly: "pick the resolution preset you want to train at."blocks_to_swap(default 0) - how many transformer blocks drop to CPU to fit in VRAM. 0 is fastest if you have the memory; raise it on a 12GB card. This is musubi's block-swap lever and it's what makes low-VRAM training possible at all.cache_strategy(auto/force/skip) -autoreuses the text-embedding cache when present,forcerebuilds it,skipbypasses creation. Caching the text encoder is the single biggest speed lever in modern training, so leave it onauto.clear_memory_before_text_encoder(default true) - frees Comfy and CUDA memory before the text-encoder cache stage. Leave it on.fp8_base/fp8_scaled(default true) - fp8 weights for the base model during training.fp8_scaledrequiresfp8_base.fp8_llm(default false) - loads the Qwen3 text encoder in fp8 during caching to cut VRAM.use_32bit_attention(default false) - 32-bit attention precision, when you want safety over speed.strength_model(default 1.0) - the strength used when applying the newly trained LoRA back onto the returned MODEL, so you can immediately generate a preview with your fresh LoRA.
The outputs are the training lifecycle in one place: model (base model with the new LoRA applied at strength_model), latest_state_path (resumable state), log_path, latest_comfy_lora_path (the LoRA you actually use), output_name, and completed_steps / total_target_steps for progress.
Installing it
Part of the VRGameDevGirl Video Enhancement Nodes pack. ComfyUI Manager → search vrgamedev → install, restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl
The heavy lifting is elsewhere. You need musubi-tuner cloned and working (the node wraps it), plus a Z-Image base checkpoint, its VAE, and a Qwen3 text encoder. The Base model is the one you want to train on, and small, clean datasets with natural-language captions are the recipe that works.
Common issues
Every path is A:/MUSUBI/... and you're not on the author's machine. That's the trap. The defaults are absolute Windows paths baked in by the author - workspace_dir, musubi_root, zimage_checkpoint, vae, and text_encoder will all point at nonexistent files until you set them to your own layout. This is the first thing to fix, and it's the most common reason the node errors on first run.
OOM during training. Lower resolution_width/resolution_height (512 for quick tests is legit), raise blocks_to_swap, and make sure fp8_base is on. If the text-encoder cache stage is what's dying, flip fp8_llm on.
Training "finishes" but the LoRA looks like nothing. With character work the dataset is the bottleneck, not the trainer: 15-25 sharp, varied images, diverse backgrounds, captions that describe what should vary and leave what should stay fixed undescribed. No knob on this node fixes a bad dataset.
It's slow and you want a smoke test first. Train a couple hundred steps at 512 to validate the pipeline before committing to hours at 1024.
This is the most ambitious node in the pack and the most demanding - it expects a musubi install and model files nobody hands you. But for Z-Image character work, a train-and-preview loop inside ComfyUI is genuinely nice, and once the paths are set it's a better first-run experience than most trainer setups.
Inputs (59)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| workspace_dir | STRING | A:/MUSUBI/Training/ZImageSpeedCharacterLoraTraining | Workspace folder for cache, output, logs, config, and the managed dynamic dataset. |
| run_name | STRING | ZImageSpeedCharacterLoraTrainingRun | Run name used for logs. |
| output_name | STRING | ZImageSpeedCharacterLoraTraining | LoRA output name used for checkpoints and downstream preview naming. |
| image_count | INT | 41–20 | How many dynamic image inputs and caption fields to show. |
| resolution_width | INT | 102464–4096 | Training bucket width. Pick the resolution preset you want to train at. |
| resolution_height | INT | 102464–4096 | Training bucket height. Pick the resolution preset you want to train at. |
| blocks_to_swap | INT | 00–64 | How many transformer blocks to swap to CPU. 0 is fastest if VRAM allows it. |
| clear_memory_before_text_encoder | BOOLEAN | true | Clears Comfy and CUDA memory before the text encoder cache stage. |
| cache_strategy | COMBO | auto | Cache behavior. auto reuses cache when present, force rebuilds, skip bypasses cache creation. |
| strength_model | FLOAT | 1.00-100–100 | Strength used when applying the newest trained LoRA back onto the returned MODEL. |
| musubi_root | STRING | A:/MUSUBI/musubi-tuner-ltx2 | Root folder of your musubi install. |
| zimage_checkpoint | STRING | A:/MUSUBI/models/zimage/zimage-base.safetensors | Path to the base Z-Image DiT checkpoint. |
| vae | STRING | A:/MUSUBI/models/zimage/vae.safetensors | Path to the Z-Image VAE checkpoint. |
| text_encoder | STRING | A:/MUSUBI/models/qwen3 | Path to the Qwen3 text encoder checkpoint or directory. |
| fp8_base | BOOLEAN | true | Enable fp8 base model weights during Z-Image training. |
| fp8_scaled | BOOLEAN | true | Enable scaled fp8 weights during Z-Image training. Requires fp8_base. |
| fp8_llm | BOOLEAN | false | Loads the text encoder in fp8 mode during caching to reduce VRAM usage. |
| use_32bit_attention | BOOLEAN | false | Use 32-bit precision for attention computations in the Z-Image model. |
| image1opt | IMAGE | — | |
| image2opt | IMAGE | — | |
| image3opt | IMAGE | — | |
| image4opt | IMAGE | — | |
| image5opt | IMAGE | — | |
| image6opt | IMAGE | — | |
| image7opt | IMAGE | — | |
| image8opt | IMAGE | — | |
| image9opt | IMAGE | — | |
| image10opt | IMAGE | — | |
| image11opt | IMAGE | — | |
| image12opt | IMAGE | — | |
| image13opt | IMAGE | — | |
| image14opt | IMAGE | — | |
| image15opt | IMAGE | — | |
| image16opt | IMAGE | — | |
| image17opt | IMAGE | — | |
| image18opt | IMAGE | — | |
| image19opt | IMAGE | — | |
| image20opt | IMAGE | — | |
| caption_1opt | STRING | — | |
| caption_2opt | STRING | — | |
| caption_3opt | STRING | — | |
| caption_4opt | STRING | — | |
| caption_5opt | STRING | — | |
| caption_6opt | STRING | — | |
| caption_7opt | STRING | — | |
| caption_8opt | STRING | — | |
| caption_9opt | STRING | — | |
| caption_10opt | STRING | — | |
| caption_11opt | STRING | — | |
| caption_12opt | STRING | — | |
| caption_13opt | STRING | — | |
| caption_14opt | STRING | — | |
| caption_15opt | STRING | — | |
| caption_16opt | STRING | — | |
| caption_17opt | STRING | — | |
| caption_18opt | STRING | — | |
| caption_19opt | STRING | — | |
| caption_20opt | STRING | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| latest_state_path | STRING | — |
| log_path | STRING | — |
| latest_comfy_lora_path | STRING | — |
| output_name | STRING | — |
| completed_steps | INT | — |
| total_target_steps | INT | — |