Nodes/VRGameDevGirl Video Enhancement Nodes/VRGDG Z-Image Speed Character Lora Training
ComfyUI Node

VRGDG Z-Image Speed Character Lora Training

Train a Z-Image character LoRA without ever leaving ComfyUI

By vrgamegirl19·Created about a year ago·Updated a day ago· 742
VRGDG Z-Image Speed Character Lora Training
  • 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
◄workspace_dirA:/MUSUBI/Training/ZImageSpeedCharacterLoraTraining►
◄run_nameZImageSpeedCharacterLoraTrainingRun►
◄output_nameZImageSpeedCharacterLoraTraining►
◄image_count4►
◄resolution_width1024►
◄resolution_height1024►
◄blocks_to_swap0►
◄clear_memory_before_text_encodertrue►
◄cache_strategyauto►
◄strength_model1.00►
◄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►
◄caption_1►
◄caption_2►
◄caption_3►
◄caption_4►
◄caption_5►
◄caption_6►
◄caption_7►
◄caption_8►
◄caption_9►
◄caption_10►
◄caption_11►
◄caption_12►
◄caption_13►
◄caption_14►
◄caption_15►
◄caption_16►
◄caption_17►
◄caption_18►
◄caption_19►
◄caption_20►

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) - auto reuses the text-embedding cache when present, force rebuilds it, skip bypasses creation. Caching the text encoder is the single biggest speed lever in modern training, so leave it on auto.
  • 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_scaled requires fp8_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.

CategoryVRGDG/Training

Inputs (59)

NameTypeDefaultDescription
modelMODEL—
workspace_dirSTRINGA:/MUSUBI/Training/ZImageSpeedCharacterLoraTrainingWorkspace folder for cache, output, logs, config, and the managed dynamic dataset.
run_nameSTRINGZImageSpeedCharacterLoraTrainingRunRun name used for logs.
output_nameSTRINGZImageSpeedCharacterLoraTrainingLoRA output name used for checkpoints and downstream preview naming.
image_countINT41–20How many dynamic image inputs and caption fields to show.
resolution_widthINT102464–4096Training bucket width. Pick the resolution preset you want to train at.
resolution_heightINT102464–4096Training bucket height. Pick the resolution preset you want to train at.
blocks_to_swapINT00–64How many transformer blocks to swap to CPU. 0 is fastest if VRAM allows it.
clear_memory_before_text_encoderBOOLEANtrueClears Comfy and CUDA memory before the text encoder cache stage.
cache_strategyCOMBOautoCache behavior. auto reuses cache when present, force rebuilds, skip bypasses cache creation.
strength_modelFLOAT1.00-100–100Strength used when applying the newest trained LoRA back onto the returned MODEL.
musubi_rootSTRINGA:/MUSUBI/musubi-tuner-ltx2Root folder of your musubi install.
zimage_checkpointSTRINGA:/MUSUBI/models/zimage/zimage-base.safetensorsPath to the base Z-Image DiT checkpoint.
vaeSTRINGA:/MUSUBI/models/zimage/vae.safetensorsPath to the Z-Image VAE checkpoint.
text_encoderSTRINGA:/MUSUBI/models/qwen3Path to the Qwen3 text encoder checkpoint or directory.
fp8_baseBOOLEANtrueEnable fp8 base model weights during Z-Image training.
fp8_scaledBOOLEANtrueEnable scaled fp8 weights during Z-Image training. Requires fp8_base.
fp8_llmBOOLEANfalseLoads the text encoder in fp8 mode during caching to reduce VRAM usage.
use_32bit_attentionBOOLEANfalseUse 32-bit precision for attention computations in the Z-Image model.
image1optIMAGE—
image2optIMAGE—
image3optIMAGE—
image4optIMAGE—
image5optIMAGE—
image6optIMAGE—
image7optIMAGE—
image8optIMAGE—
image9optIMAGE—
image10optIMAGE—
image11optIMAGE—
image12optIMAGE—
image13optIMAGE—
image14optIMAGE—
image15optIMAGE—
image16optIMAGE—
image17optIMAGE—
image18optIMAGE—
image19optIMAGE—
image20optIMAGE—
caption_1optSTRING—
caption_2optSTRING—
caption_3optSTRING—
caption_4optSTRING—
caption_5optSTRING—
caption_6optSTRING—
caption_7optSTRING—
caption_8optSTRING—
caption_9optSTRING—
caption_10optSTRING—
caption_11optSTRING—
caption_12optSTRING—
caption_13optSTRING—
caption_14optSTRING—
caption_15optSTRING—
caption_16optSTRING—
caption_17optSTRING—
caption_18optSTRING—
caption_19optSTRING—
caption_20optSTRING—

Outputs (7)

NameTypeDescription
modelMODEL—
latest_state_pathSTRING—
log_pathSTRING—
latest_comfy_lora_pathSTRING—
output_nameSTRING—
completed_stepsINT—
total_target_stepsINT—