Nodes/ComfyUI-QwenImageLoraLoader/NunchakuQI&ZITDiffsynthControlnet
ComfyUI Node

NunchakuQI&ZITDiffsynthControlnet

DiffSynth ControlNet for 4-bit Qwen and Z-Image

By ussoewwin·Created 10 months ago·Updated 24 days ago· 340
NunchakuQI&ZITDiffsynthControlnet
  • model
  • model_patch
  • vae
  • image
  • mask
  • MODEL
strength1.00

This is the odd one out in the pack, and the useful one if you need it. It isn't a LoRA node at all. It brings DiffSynth-style ControlNet to Nunchaku-quantized Qwen-Image and Z-Image-Turbo models, so you can steer generation with a control image (a depth map, for instance) instead of relying on the prompt alone. If you've hit the wall where Qwen or Z-Image gives you the right content but never quite the composition you wanted, this is the node that fixes where things go.

Quick grounding. ControlNet conditions generation on spatial structure pulled from a reference image: the prompt decides what appears, the control decides where it goes. It's the biggest composition unlock since Stable Diffusion itself. The wrinkle here is that you're running a 4-bit Nunchaku model, so you can't just drop in a stock ControlNet loader; this node is the bridge that applies a DiffSynth control patch to the quantized model.

How it works

The control lives in a separate patch file, not in this node. You load it with a Model Patch Loader (ModelPatchLoaderCustom, from the author's companion ComfyUI-NunchakuFluxLoraStacker pack), which can offload the patch to CPU memory to save VRAM, and that produces a MODEL_PATCH. You feed that patch into this node along with your Nunchaku model, a VAE, and your control image. The node conditions the model on the image at the strength you set and hands back a patched model that you send to your sampler. In short: patch plus control image go in, a structurally-guided model comes out.

The inputs and outputs that matter

  • model (MODEL) - your Nunchaku Qwen-Image or Z-Image-Turbo model.
  • model_patch (MODEL_PATCH) - the DiffSynth ControlNet patch, from a Model Patch Loader (or from the Krea2 depth control-lora loader in this pack, if you're doing Krea2 depth control).
  • vae (VAE) - needed to encode the control image into the model's latent space.
  • image (IMAGE) - the control image itself (e.g. a depth map). This is the structure you're imposing.
  • strength (default 1.0, range -10 to 10) - how hard the control is applied. 1.0 is the baseline; ease off if the control is overpowering the prompt, push higher if it's being ignored.
  • mask (MASK, optional) - restrict the control to part of the frame for regional guidance.

Output is a single conditioned MODEL for your KSampler.

Installing it

Comes with the pack: ComfyUI Manager search and install, or git clone https://github.com/ussoewwin/ComfyUI-QwenImageLoraLoader into custom_nodes, then restart. Two things this node needs that the pack doesn't bundle: a working official ComfyUI-nunchaku install underneath (its wheel matched to your PyTorch/CUDA), and the Model Patch Loader to produce the MODEL_PATCH it consumes, which lives in the companion ComfyUI-NunchakuFluxLoraStacker pack. Get both in place first. Python 3.11+.

Where people get burned

  • No patch, no control. The model_patch input is the whole mechanism. If nothing changes, check that your Model Patch Loader is actually loading a compatible DiffSynth control patch and feeding this node.
  • Forgetting the VAE. The control image has to be encoded, so the vae input isn't optional plumbing, it's load-bearing. Wire your model's VAE in.
  • Strength tuning. Because the range runs -10 to 10, it's easy to leave it somewhere extreme from an earlier experiment. If the output looks nothing like your prompt, or nothing like your control image, strength is the first dial to sanity-check. And VRAM: if you're tight, the Model Patch Loader's CPU-offload option is there to keep the patch out of GPU memory.
Categoryadvanced/loaders/qwen

Inputs (6)

NameTypeDefaultDescription
modelMODEL
model_patchMODEL_PATCH
vaeVAE
imageIMAGE
strengthFLOAT1.00-10–10
maskoptMASK

Outputs (1)

NameTypeDescription
MODELMODEL