Nodes/ComfyUI-Zlycoris/Z-Image DiffSynth LoRA Loader
ComfyUI Node

Z-Image DiffSynth LoRA Loader

The loader that fixes DiffSynth-trained Z-Image LoRAs

By TripleHeadedMonkey·Created 7 months ago·Updated 7 months ago· 4
Z-Image DiffSynth LoRA Loader
  • model
  • clip
  • MODEL
  • CLIP
lora_name
strength_model1.00
strength_clip1.00

DiffSynth is one of the two main ways people train Z-Image LoRAs (AI Toolkit being the other), and its LoRAs ship with a key layout that stock ComfyUI can't apply. DiffSynth saves "flat" keys - layers.0.attention..., context_refiner.*, noise_refiner.*, final_layer.* - where ComfyUI's Z-Image implementation expects them under a diffusion_model. prefix. ZImageDiffSynthLoader is a specialized Load LoRA that rewrites those keys before patching, so DiffSynth-trained adapters actually work.

What it rewrites

When you load a LoRA through it, the node walks every key and fixes the known DiffSynth patterns:

  • context_refiner.*diffusion_model.context_refiner.* (the Z-Image context refiner blocks)
  • noise_refiner.*diffusion_model.noise_refiner.*
  • layers.*diffusion_model.layers.* (the DiT backbone)
  • bare final_layer.* / label_emb.*diffusion_model.*

Then it hands the corrected state dict to ComfyUI's standard load_lora_for_models. Nothing else about the loader is special - it's the key translator that makes the difference between a LoRA doing nothing and a LoRA working.

The inputs

  • model (MODEL), clip (CLIP) - your loaded Z-Image transformer and Qwen encoder. These are ComfyUI-native types, so the node slots into a normal workflow right after your standard loaders.
  • lora_name - dropdown from models/loras/.
  • strength_model / strength_clip - default 1.0, range ±20.

Outputs are MODEL and CLIP, straight into the sampler. No raw-pipeline detour with this one - it's the pack's only "normal" LoRA loader, and it's built for a specific format.

When to reach for it

If you trained with DiffSynth Studio's Z-Image support (which also produced the widely-shared Z-Image-i2L image-to-LoRA tool), or you downloaded a LoRA whose training card says DiffSynth and stock Load LoRA silently ignores it, this is the node. If the LoRA is AI Toolkit format, the ZImageQwenTELoRALoader (for the lora_te text-encoder half) or ZImageLoaderAndPatcher (for raw LyCORIS patching) are the right tools. Picking the wrong specialized loader is the most common mistake - all three look identical from across the room.

Install

ComfyUI Manager (search ComfyUI-Zlycoris) or:

cd ComfyUI/custom_nodes
git clone https://github.com/TripleHeadedMonkey/ComfyUI-Zlycoris.git

Restart ComfyUI. The heavy pack dependency list (diffusers, transformers, ...) applies; no model files to download.

Where people get burned

  • It only fixes the known DiffSynth prefixes. A DiffSynth LoRA trained on a variant that renamed its blocks differently may have keys that don't match any rule, and they'll pass through un-rewritten - which means "Load LoRA" behavior, i.e. mostly nothing. Check the console; a loader that applied nothing is the tell.
  • strength_model and strength_clip both go through, and they're independent. DiffSynth LoRAs often include both transformer and text-encoder parts; if the clip half has keys the remapper didn't touch, strength_clip does nothing and the difference is easy to misread as "the LoRA is weak."
  • Same warning as everywhere in this pack: on Z-Image, base-trained LoRAs frequently want strength above 1.0. Don't conclude the loader is broken until you've tried 1.5–2.0.
CategoryZ-Image/Loaders

Inputs (5)

NameTypeDefaultDescription
modelMODEL
clipCLIP
lora_nameCOMBO0 options:
strength_modelFLOAT1.00-20–20
strength_clipFLOAT1.00-20–20

Outputs (2)

NameTypeDescription
MODELMODEL
CLIPCLIP