Nodes/Realtime LoRA Trainer/Realtime LoRA Trainer (Z-Image Base - Musubi Tuner)
ComfyUI Node

Realtime LoRA Trainer (Z-Image Base - Musubi Tuner)

Train on the undistilled Z-Image for LoRAs that hold up on Turbo

By shootthesound·Created 8 months ago·Updated 2 months ago· 538
Realtime LoRA Trainer (Z-Image Base - Musubi Tuner)
  • image_1
  • image_2
  • image_3
  • image_4
  • lora_path
inputcount4
images_path
musubi_path~/musubi-tuner
dit_model
vae_model
text_encoder
captionphoto of subject
training_steps400
learning_rate0.0001
lora_rank32
vram_modeLow (768px)
keep_loratrue
output_nameMyLora
custom_python_exe
caption_1
caption_2
caption_3
caption_4

What it is

This is the "train on the harder model to get a better result" node. Z-Image ships in two forms: Turbo, the fast distilled version everyone actually generates with, and Base (officially just "Z-Image," Apache 2.0, released January 2026), the undistilled foundation model nobody generates with directly because it's five to ten times slower. But Base is what the community learned to train on - a widely-cited realism LoRA author put it plainly: LoRAs trained on Base kept skin texture and detail on Turbo at inference, while the same training done on Turbo directly overcooked faster and lost texture. MusubiZImageBaseLoraTrainer is the node for that workflow: train here, apply the result on Turbo (or Base, or eventually Edit) at inference.

The catch you should know before you start: LoRAs trained on Base have been widely reported needing strength 2.0 or higher when applied to Turbo, rather than the usual 1.0. Community testing traced this to the AI-Toolkit training path specifically - OneTrainer users don't report the same mismatch - and it's still not fully explained. Expect to experiment with strength on your first few runs rather than assume 1.0 is right.

How it works

Musubi Tuner trains against the de-distilled Z-Image weights (ostris/Z-Image-De-Turbo), caching text embeddings from the Qwen3 encoder up front the way every current-gen trainer in this pack does. Base's own image quality is intentionally weaker than Turbo's - the team designed it that way, on the theory that a base model with too much finishing baked in is harder to fine-tune cleanly. That's the tradeoff you're accepting: worse standalone output, better raw material for a LoRA.

Inputs and outputs that matter

  • dit_model, vae_model, text_encoder dropdowns, populated once the de-distilled model and its VAE/text-encoder are in your models/diffusion_models folder.
  • inputcount plus image_N / caption_N pairs, or images_path for a folder.
  • training_steps (400 default here, lower than most of this pack's other trainers), learning_rate (0.0001 - notably lower than the 0.0003–0.0005 defaults elsewhere in the pack, reflecting how much more sensitive current architectures are to a hot LR), lora_rank (32).
  • vram_mode - eight presets, Max (1256px) down to Min (512px), several with fp8 or fp8-offload variants.

Output is a single lora_path string, ready for ApplyTrainedLora or one of the Z-Image Selective Loaders.

Installing it

Same pack:

cd ComfyUI/custom_nodes
git clone https://github.com/ShootTheSound/comfyUI-Realtime-Lora

Restart ComfyUI, install Musubi Tuner separately, and set musubi_path. Download the de-distilled model from ostris/Z-Image-De-Turbo into models/diffusion_models - this is the one non-obvious step, since the regular distilled Turbo checkpoint won't train correctly here.

Common issues

LoRA looks too weak at strength 1.0 on Turbo. This is the known Base-to-Turbo mismatch described above - try pushing strength to 1.5–2.0 before concluding the training failed. Smaller datasets (20-ish images) seem to need higher strength than large ones (hundreds of images), for reasons the community hasn't fully pinned down.

Confusing this with training on Turbo directly. If you want the fastest possible iteration loop and don't care about the texture/quality tradeoff, RealtimeLoraTrainer's Z-Image Turbo option is the simpler path. This node exists specifically for people chasing better skin texture and detail retention.

Python version and downloads. Same 3.10–3.12 rule, and make sure you grabbed the de-distilled model, not the standard Turbo one - they're not interchangeable for training.

Categoryloaders

Inputs (22)

NameTypeDefaultDescription
inputcountINT41–100Number of image inputs. Click 'Update inputs' button after changing.
images_pathSTRINGOptional: Path to folder containing training images. If provided, images from this folder are used instead of image inputs. Caption .txt files with matching names are used if present.
musubi_pathSTRING~/musubi-tunerPath to musubi-tuner installation.
dit_modelCOMBOZ-Image Base DiT model (transformer) from diffusion_models folder.
vae_modelCOMBOZ-Image VAE model from vae folder.
text_encoderCOMBOQwen3 text encoder from text_encoders or clip folder.
captionSTRINGphoto of subjectDefault caption for all images. Per-image caption inputs override this.
training_stepsINT40010–5000Number of training steps. 400 is a good starting point.
learning_rateFLOAT0.00010.00001–0.1Learning rate. 0.0001 is recommended for Z-Image Base training.
lora_rankINT324–128LoRA rank/dimension. 32 is recommended for Z-Image Base.
vram_modeCOMBOLow (768px)VRAM optimization preset. Low/Min always use fp8. Min adds pre-caching for lowest VRAM.
keep_loraBOOLEANtrueIf True, keeps the trained LoRA file.
output_nameSTRINGMyLoraCustom name for the output LoRA. Timestamp will be appended.
custom_python_exeSTRINGAdvanced: Optionally enter the full path to a custom python.exe (e.g. C:\my-venv\Scripts\python.exe). If empty, uses the venv inside musubi_path. The musubi_path field is still required for locating training scripts.
image_1optIMAGETraining image (not needed if images_path is set).
caption_1optSTRINGCaption for image_1. Overrides default caption.
image_2optIMAGETraining image.
caption_2optSTRINGCaption for image_2. Overrides default caption.
image_3optIMAGETraining image.
caption_3optSTRINGCaption for image_3. Overrides default caption.
image_4optIMAGETraining image.
caption_4optSTRINGCaption for image_4. Overrides default caption.

Outputs (1)

NameTypeDescription
lora_pathSTRINGPath to the trained Z-Image Base LoRA file (ComfyUI format).