ComfyUI Node
VRGDG Z-Image LoRA Train Chunk
Runs one Z-Image LoRA training chunk using musubi-tuner, optionally caches if needed, converts the latest LoRA to ComfyUI format, and can apply it to the returned MODEL.
VRGDG Z-Image LoRA Train Chunk
- model
- model
- latest_state_path
- log_path
- latest_comfy_lora_path
- output_name
- completed_steps
- total_target_steps
◄dataset_images_dir►
◄workspace_dir►
◄run_nameZImageChunkRun►
◄output_nameZImageChunkRun►
◄resolution_width1024►
◄resolution_height1024►
◄steps_per_run250►
◄total_target_steps3000►
◄network_dim32►
◄network_alpha32►
◄blocks_to_swap4►
◄clear_memory_before_text_encodertrue►
◄learning_rate_preset1e-4►
◄learning_rate0.0001►
◄num_repeats1►
◄cache_strategyauto►
◄copy_latest_to_comfy_lorastrue►
◄keep_only_comfy_lorafalse►
◄strength_model1.00►
◄create_captionsfalse►
◄caption_text►
◄add_trigger_wordfalse►
◄trigger_text►
◄musubi_rootA:/MUSUBI/musubi-tuner-ltx2►
◄zimage_checkpointA:/MUSUBI/models/zimage/zimage-base.safetensors►
◄vaeA:/MUSUBI/models/zimage/vae.safetensors►
◄text_encoderA:/MUSUBI/models/qwen3►
◄fp8_basetrue►
◄fp8_scaledtrue►
◄fp8_llmfalse►
◄use_32bit_attentionfalse►
CategoryVRGDG/Training
Inputs (32)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | Base model to return downstream with the latest trained LoRA optionally applied. | |
| dataset_images_dir | STRING | Folder containing your training images, or a parent folder that will be organized into an images subfolder. | |
| workspace_dir | STRING | Working folder for cache, logs, config files, checkpoints, and training state. | |
| run_name | STRING | ZImageChunkRun | Name prefix used for the log file. |
| output_name | STRING | ZImageChunkRun | Name prefix used for saved LoRA files and state folders. |
| resolution_width | INT | 102464–8192 | Training bucket width written to the musubi dataset config. |
| resolution_height | INT | 102464–8192 | Training bucket height written to the musubi dataset config. |
| steps_per_run | INT | 2501–100000 | How many steps to train per run, and also when to save the LoRA/state at the end of that run. |
| total_target_steps | INT | 30001–1000000 | Training stops once the latest saved step reaches this total. |
| network_dim | INT | 321–2048 | LoRA rank. |
| network_alpha | INT | 321–2048 | LoRA alpha scaling value. |
| blocks_to_swap | INT | 40–28 | Higher values reduce VRAM usage but usually slow training. |
| clear_memory_before_text_encoder | BOOLEAN | true | Tries to unload ComfyUI models and clear VRAM/RAM before text encoder caching. |
| learning_rate_preset | COMBO | 1e-4 | Quick preset for the training learning rate. Choose Custom to use the float input below. |
| learning_rate | FLOAT | 0.00011e-8–1 | Custom learning rate used only when the preset is set to Custom. |
| num_repeats | INT | 11–1000 | How many times each image-caption pair is repeated in the dataset. |
| cache_strategy | COMBO | auto | Auto builds cache only when needed, Force always rebuilds it, Skip goes straight to training. |
| copy_latest_to_comfy_loras | BOOLEAN | true | Copies the latest Comfy-compatible LoRA into the ComfyUI loras folder after training. |
| keep_only_comfy_lora | BOOLEAN | false | If enabled, deletes the standard .safetensors LoRA files after a matching .comfy.safetensors file exists. |
| strength_model | FLOAT | 1.00-100–100 | Strength used if the node applies the latest LoRA back onto the output model. |
| create_captions | BOOLEAN | false | If enabled, missing caption txt files are created automatically using the caption text input. |
| caption_text | STRING | Base caption text used when create_captions is enabled and an image has no caption file. | |
| add_trigger_word | BOOLEAN | false | If enabled, the trigger text is prepended to each caption. |
| trigger_text | STRING | Trigger word or phrase to prepend to captions when add_trigger_word is enabled. | |
| musubi_root | STRING | A:/MUSUBI/musubi-tuner-ltx2 | Root folder of your musubi-tuner-ltx2 install. |
| zimage_checkpoint | STRING | A:/MUSUBI/models/zimage/zimage-base.safetensors | Path to the base Z-Image DiT checkpoint used for caching and training. |
| 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. |
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 | — |