Z-Image AITK LoRA Loader (Standard)
The ai-toolkit-native loader for the raw pipeline
- lora_stack
- RAW_MODEL
- RAW_CLIP
AI Toolkit (Ostris's trainer) is the default way Z-Image LoRAs get made - it shipped Turbo training two days after the model dropped and Base support almost immediately. So a huge share of the LoRAs you'll grab are AITK format. This node is the raw-pipeline answer to that: ZImageAITKLoRALoader loads the transformer and text encoder as raw state dicts and patches an AITK-format LoRA onto them, with a dedicated key-matching engine for the lora_te. (text encoder) and lora_unet (model) conventions AITK saves.
How it differs from its siblings
It's the same shape as ZImageLoaderAndPatcher - same three dropdowns, same strengths, same optional lora_stack, same RAW_MODEL/RAW_CLIP outputs - but the patching rules are AITK-specific:
- For the model:
lora_unetprefixed keys are stripped and matched againstdiffusion_model.*/ bare keys, including ablocks→layersswap. - For the CLIP:
lora_te.*keys map ontotransformer.*/ bare weight keys.
Because it applies patches onto the raw state dicts (not through ComfyUI's patch system), it can handle AITK's key layout without the "Load LoRA ignores my LoRA" failure. It also supports the lora_stack chaining, so you can stack AITK LoRAs in order - the structured stacking path for the most common Z-Image LoRA source.
The inputs that matter
transformer_name- frommodels/diffusion_models/.text_encoder_name- frommodels/text_encoders/.lora_name- frommodels/loras/.strength_model/strength_clip- default 1.0, range ±100.lora_stack(LYCORIS_STACK, optional) - built withZImageLycorisStacker, applied before the singlelora_name.
Outputs: RAW_MODEL, RAW_CLIP. Sample via ZImageComfyInjector. If you're coming from the Qwen TE loader, note the difference: ZImageQwenTELoRALoader handles the lora_te text-encoder half on a normal ComfyUI-native CLIP; this node does the whole LoRA in the raw pipeline. If your LoRA is AITK and you want the ComfyUI-native two-socket workflow, the TE loader is your pick; if you're already in a raw/merge workflow, this is the one.
Install
ComfyUI Manager (search ComfyUI-Zlycoris) or:
cd ComfyUI/custom_nodes
git clone https://github.com/TripleHeadedMonkey/ComfyUI-Zlycoris.git
Restart ComfyUI. Heavy first-install deps (transformers, diffusers, optimum, lycoris, ...); no model files bundled.
Where people get burned
lora_tekeys only apply if the CLIP was actually loaded. Iftext_encoder_nameisNone, the clip half of the LoRA silently does nothing. AITK LoRAs frequently have both halves, so skipping the TE is a quiet way to lose half your adapter.- Key translation is best-effort. Unmatched keys just aren't patched - the console logs how many layers were patched per file, and "0" means the keys didn't match this node's conventions. If that happens, the file may be a DiffSynth LoRA (use
ZImageDiffSynthLoader) or a raw LyCORIS file (ZImageLoaderAndPatcher). - ±100 strength range is generous and unforgiving. On Z-Image, AITK-trained Base LoRAs genuinely want 1.0–2.0+ on Turbo, so the range exists for real. But it's equally easy to fat-finger 50 and watch the model turn to noise. Render-test at 1.0 first.
- Raw outputs again - if you feed
RAW_MODELinto a KSampler expecting it to work, it won't. Inject first.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| transformer_name | COMBO | 1 options: None | |
| text_encoder_name | COMBO | 1 options: None | |
| lora_name | COMBO | 1 options: None | |
| strength_model | FLOAT | 1.00-100–100 | — |
| strength_clip | FLOAT | 1.00-100–100 | — |
| lora_stackopt | LYCORIS_STACK | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| RAW_MODEL | RAW_MODEL | — |
| RAW_CLIP | RAW_CLIP | — |