Nunchaku Qwen Patches
The compatibility shim for 4-bit Qwen + the FlowMatch scheduler
- model
- image
- model
- image
This is a glue node. It doesn't generate anything, doesn't change your image on its own, and if you're not running a Nunchaku-quantized Qwen model you can close this tab - you'll never touch it. It exists to fix one specific incompatibility: when you drive a Nunchaku Qwen model with this pack's FlowMatch scheduler (or tiled diffusion), the latent dimensions get handled wrong and things break. This node patches the model so they don't.
A little context, because "Nunchaku Qwen" is two obscure things bolted together. Qwen-Image is Alibaba's 20-billion-parameter image model - big, capable, Apache-licensed, but far too heavy to run comfortably on consumer hardware in full precision. Nunchaku is an MIT inference engine that quantizes diffusion transformers down to 4-bit (SVDQuant) so a 20B model actually fits and runs fast on a normal GPU. It's a genuinely popular piece of kit; the Nunchaku Qwen-Image release landed in August 2025 and the community leaned on it hard. The catch with any aggressive quantization is that it changes how the model reports and handles its internals - and that's precisely the seam that snags when a third-party scheduler starts feeding it a custom sigma schedule.
How it works
You pass your loaded model through this node before it reaches the sampler. With mode set to enable, it applies the pack's patches - the fixes for how the Nunchaku Qwen implementation handles image dimensions - and returns the patched model. The changelog is candid about the history here: earlier versions had "issues with dimensions not being handled correctly," and this node (alongside a matching tiled-diffusion patch) is the fix. It's a monkeypatch in node form: same model, corrected behavior, then straight on to sampling.
The inputs and outputs that matter
Small surface, and that's the point:
- mode (required) -
enableordisable, defaultenable. Enable applies the patch; disable passes everything through untouched, which is exactly what you want for an A/B test to confirm the patch is what fixed your run. - model (optional, MODEL) - the Nunchaku Qwen model to patch. Wire your loader into this, take the patched model output, and continue to your sampler.
- image (optional, IMAGE) - an image passthrough, returned on the image output. Convenience routing so the node can sit inline without forcing you to split your wiring around it.
Outputs are the mirror of the inputs: a patched model and a passed-through image. In practice you care about the model output - that's the whole job.
Installing it
It comes with the pack. In ComfyUI Manager, search erosDiffusion, install, restart. Or: cd ComfyUI/custom_nodes && git clone https://github.com/erosDiffusion/ComfyUI-EulerDiscreteScheduler.git, then restart.
But note what this node doesn't bring: Nunchaku itself. This is a patch for a setup you build separately - you need the Nunchaku node pack installed and an actual Nunchaku Qwen model downloaded, and Nunchaku's own install is the fiddly part of the whole chain (it wants a prebuilt wheel that matches your exact PyTorch and CUDA versions). Get Nunchaku Qwen running on its own first; this node only makes sense once that's already working.
Where people get burned
- Wrong setup entirely. This patch is scoped to Nunchaku-quantized Qwen. It does nothing useful on a regular Qwen checkpoint, on Flux, on Z-Image, or on any non-Nunchaku model. Dropping it into a workflow it doesn't apply to is at best a no-op and at worst confusing - don't cargo-cult it in.
- It's a fix for a moving target. The whole reason this node exists is that Nunchaku's quantized internals and a third-party scheduler don't naturally agree. When either side updates, patches like this can drift. If dimension errors come back after a Nunchaku or ComfyUI update, check you're on the pack's latest version before assuming your workflow is wrong.
- This is the experimental corner of an experimental pack. The pack's headline act is the FlowMatch scheduler for Z-Image; this Qwen patch and the metadata loader are utilities the author bundled alongside it. Treat it as the niche compatibility tool it is, toggle
disableto isolate whether it's helping, and keep it out of workflows that don't need it.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | enable | 2 options: enable, disable |
| modelopt | MODEL | — | |
| imageopt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| image | IMAGE | — |