ZML_名称加载lora(nunchaku)
Apply LoRAs by name to nunchaku-quantized FLUX — one stack, many samplers
- model
- 输出_模型
The nunchaku edition of ZmlNameLoraLoader: same "load LoRAs by name from a JSON list" idea, but for models loaded through the nunchaku FLUX engine - the MIT-licensed quantized FLUX inference stack that became the low-VRAM community's favorite in 2025 (the quantized svdq-int4 FLUX.1-dev checkpoints people run on RTX 20/30-series cards). You'll want this node the moment you're running FLUX through nunchaku and stacking LoRAs across multiple samplers.
Why nunchaku needs its own loader at all: nunchaku models aren't ordinary torch checkpoints. The diffusion model is wrapped in a ComfyFluxWrapper and LoRAs have to be merged through nunchaku's own to_diffusers machinery, not the plain load_lora_for_models path. The node literally checks the wrapper's class name first - if the model isn't nunchaku-loaded, it prints "make sure it was loaded by the Nunchaku FLUX DiT Loader" and bails out. Wrong engine, no LoRA. That guard is the whole reason this sibling exists.
How it works
- model (MODEL) - must come from a nunchaku FLUX loader, not a standard checkpoint loader.
- LoRA名称列表 (STRING, force-input) - JSON:
[{"lora_name": "style.safetensors", "weight": 0.8}]. Same shape asZmlNameLoraLoader, and the pack's Power Lora Loader emits it, so the intended wiring is: Power Lora Loader → this node.
Single output, 输出_模型 (MODEL) - note there's no CLIP port, because the nunchaku engine keeps the text encoder on the usual path; you just swap the model. Inside, the code does the memory-efficient deepcopy dance (clone the wrapper once, share the transformer) that nunchaku LoRA merging wants, then iterates your list applying each LoRA via nunchaku.lora.flux.to_diffusers.
Behaviors to know:
- Weights at ~0 (
abs < 1e-5) are skipped, so you can leave a LoRA in the list at zero weight as a handy "off" switch. - Invalid JSON → returns the model unchanged with a console warning, same silent-ish failure as the sibling.
- Missing file → raises, loud and clear.
When to reach for it
Same relay pattern as ZmlNameLoraLoader, just FLUX-quantized: one master LoRA stack, several samplers or a second pass, all kept in sync from a single editor. If you're on a low-VRAM card running nunchaku FLUX and you've been hand-typing LoRAs into every sampler, this removes a whole class of "I forgot the third LoRA on the detail pass" mistakes.
Install
Part of ComfyUI-ZML-Image, but with a real prerequisite: you need nunchaku itself installed (the node imports nunchaku.lora.flux at runtime), which lives in its own repo - ComfyUI Manager can install it, or follow the nunchaku project's setup for your GPU. The pack's README only covers nunchaku via this node's existence, so treat the nunchaku install as your responsibility:
cd ComfyUI/custom_nodes
git clone https://github.com/zml-w/ComfyUI-ZML-Image
# restart ComfyUI
plus the nunchaku engine itself. Chinese-first UI - LoRA名称列表 is "LoRA name list" - translation patch at https://github.com/zml-w/ZZZ_ZML_English_Patch.
Community signal on nunchaku is strong (hundreds of threads across 2025 - people pushing quantized FLUX onto cards that shouldn't run it), so the engine is real and maintained; the node itself is a thin, reliable wrapper over it. The one thing to double-check when something misbehaves: that your model really came from a nunchaku loader, since the class-name guard is the first thing that trips.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| LoRA名称列表 | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 输出_模型 | MODEL | — |