Nodes/Comfyui-ZiT-Lora-loader/Z-Image LoRA Auto Loader
ComfyUI Node

Z-Image LoRA Auto Loader

Auto Strength and Loading, No Wiring

By capitan01R·Created 6 months ago·Updated 5 months ago· 36
Z-Image LoRA Auto Loader
  • model
  • model
  • analysis_report
lora_name
global_strength0.75

If the "correct" Z-Image setup is the Auto Strength node feeding the Turbo LoRA Loader, the Z-Image LoRA Auto Loader is the lazy version - and lazy is fine when the wiring is the hard part. It bundles the forensic per-layer strength analysis and the loading into a single node: MODEL in, patched MODEL out, one knob. No JSON to route, no hidden inputs to feed.

The inputs are minimal: model, lora_name (dropdown of models/loras), and global_strength (default 0.75, range −2 to 2). The tooltip is the whole manual: "Master strength. Everything else is computed automatically." The outputs are a patched model plus an analysis_report (STRING) - the same readable per-layer breakdown the Auto Strength node produces, which you can dump into a Show Text node if you want to see what it decided.

How it works

Same forensics as its sibling: it reads the LoRA's weight tensors directly, reconstructs ΔW = lora_B @ lora_A per layer pair, scales by alpha / rank, and maps each layer to a strength clamped between a 0.30 floor and a 1.50 ceiling - strength = clamp(global × mean_norm / layer_norm, 0.30, 1.50). High-signal layers get pulled back, weak layers get nudged up, the mean lands on your global. It applies those by scaling the lora_B tensors before patching, then loads the result through a key map built from your model's own state_dict keys.

The payoff is the one you're chasing with every Z-Image LoRA: likeness that holds without the blown-out, washed-out look you get from cranking or dialing back a flat global strength. The author's update thread specifically recommends it over hand-tweaking the manual sliders.

The caveat worth knowing

The Auto Loader does the per-layer strength treatment, but it does not do the QKV fusion the Turbo LoRA Loader does. Its key map comes straight from the model's fused qkv keys, so if your LoRA ships in the standard diffusers export with separate to_q / to_k / to_v keys, those attention keys can still get skipped silently - the same problem this whole pack exists to fix. If a LoRA looks under-applied through the Auto Loader, run it through the Z-Image Turbo LoRA Loader (auto_convert_qkv on) instead, or wire the Auto Strength node's layer_strengths JSON into the Turbo Loader, which gets you both the fusion and the calibration. Files already in fused format are fine straight through the Auto Loader.

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/capitan01R/Comfyui-ZiT-Lora-loader

Restart ComfyUI. ComfyUI Manager has it too under Comfyui-ZiT-Lora-loader. No extra dependencies beyond numpy, no model downloads. One built-in behavior worth knowing: global_strength of 0 returns your model unchanged with a "Skipped" report string - a handy bypass, not a failure. And as always with this pack, Turbo LoRAs won't transfer to Z-Image Base, so keep the loader pointed at the model it was trained for.

Categoryloaders/Z-Image

Inputs (3)

NameTypeDefaultDescription
modelMODEL
lora_nameCOMBO0 options:
global_strengthFLOAT0.75-2–2Master strength. Everything else is computed automatically.

Outputs (2)

NameTypeDescription
modelMODEL
analysis_reportSTRING