Load Z-Image Turbo (SDNQ)
Meet the SDNQ loader
- pipeline
Z-Image Turbo is already the model that brought near-Flux quality to a 12GB card. This node asks the natural follow-up: what if you have less? Load Z-Image Turbo (SDNQ) loads a version of Z-Image Turbo that's been quantized down to 4-bit unsigned ints with an SVD rank-32 decomposition, so the whole pipeline sits in a much smaller footprint than the stock checkpoint. The author runs it at 2048x2048 on a 10GB RTX 3080 and reports roughly 7GB of VRAM used - and that he can keep an LLM running alongside it. That's the pitch: Turbo's speed and photorealism on hardware that normally has to pass.
The name is doing two jobs, so let's unpack it. Z-Image is Alibaba's 6-billion-parameter flow-matching model, and Turbo is the distilled 8-step variant that launched first and became the community's daily driver - the "guidance at CFG 1, 5-9 steps" workflow. SDNQ is the "SD.Next Quantization Engine," a PyTorch-native quantization stack from the SD.Next world that supports everything from 1-bit to 16-bit weights; the "-svd-r32" in the model ID means SVD rank 32. The default model_id is Disty0/Z-Image-Turbo-SDNQ-uint4-svd-r32, an Apache-2.0 repack that diffusers loads as a standard ZImagePipeline.
How it works, and what's different about it. This is a diffusers wrapper, not a ComfyUI-native loader. The node calls DiffusionPipeline.from_pretrained() directly with torch_dtype=bfloat16, applies whatever attention backend and offload options you asked for, and hands the ready pipeline back. Three practical consequences: the weights download into your HuggingFace cache on first run (not ComfyUI's models/ folder), ComfyUI's own memory management doesn't see them - the README warns you in so many words to "use carefully" - and it only works if your diffusers is new enough. You get a single ZIMAGE_SDNQ_PIPELINE output to wire into ZImageSDNQGenerate.
The inputs you'll actually touch:
model_id- the HF repo. The default is the right one; you can point it at other SDNQ Z-Image quantizations, including Base versions.device- leaveautounless you have a reason not to.cpu_offload- sequential offloading when VRAM is tight. It works; it just costs speed.vae_tiling- tiles the VAE decode to save memory at high resolutions. Handy for those 2048px runs.attention_backend-default(SDPA) unless you're chasing speed.flashneeds a prebuilt wheel on Windows; the author foundsagewas actually slower, and if you ever load a Base model, Sage is known to corrupt outputs entirely.
Installing. Search "ComfyUI-ZImageDit" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/erosDiffusion/ComfyUI-ZImageDit
Then restart ComfyUI. The README is admirably blunt that you'll probably need to pip-install things manually, and the big one is diffusers - it has to be recent enough for both the Z-Image pipeline and native SDNQ (≥0.40.0). From a portable install's embedded Python:
python.exe -m pip install git+https://github.com/huggingface/diffusers.git
The node also auto-installs the sdnq package if it's missing, falling back to a --no-build-isolation workaround for its known broken pyproject.toml; install_sdnq.bat is the Windows helper for that same fight.
Common gotchas. If startup fails, check the requirements - and note that quanto is not needed for these two nodes (it's for the pack's other, experimental files; ignore them). enable_compilation didn't work for the author; don't build a workflow around it. And the README owns up front that some options are only half-ported and untested. This is an alpha pack by a hobbyist who cheerfully admits he has no time to support it - it's genuinely useful, occasionally fiddly, and reads like it was written by someone who just wanted the model to work on his own 3080.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| model_id | STRING | Disty0/Z-Image-Turbo-SDNQ-uint4-svd-r32 | Hugging Face model ID for the SDNQ-quantized Z-Image Turbo model |
| device | COMBO | auto | Device to load the model on. 'auto' selects CUDA if available, otherwise CPU |
| attention_backendopt | COMBO | default | Attention mechanism: 'default' (SDPA), 'flash' (Flash Attention 2), 'flash3' (Flash Attention 3), 'sage' (Sage Attention). Flash/Sage may improve speed on supported GPUs |
| enable_compilationopt | BOOLEAN | false | Compile transformer with torch.compile for faster inference. First run will be slower while compiling |
| cpu_offloadopt | BOOLEAN | false | Enable sequential CPU offloading to reduce VRAM usage. Models are moved between CPU and GPU as needed |
| low_cpu_mem_usageopt | BOOLEAN | true | Use memory-efficient loading method. Recommended to keep enabled |
| vae_tilingopt | BOOLEAN | false | Process VAE decode in tiles to reduce VRAM usage. Useful for high resolutions |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| pipeline | ZIMAGE_SDNQ_PIPELINE | — |