SDNQ Sampler
Run FLUX and Qwen-Image on a 12GB card without rebuilding your graph
- image1
- image2
- image3
- image4
- image
- latent
The SDNQ Sampler is the one node in comfyui-sdnq you'll actually use, and it's a different beast from what you're used to in ComfyUI. Instead of the usual graph - checkpoint loader, CLIP, VAE, sampler, decode - it's a single box that loads a pre-quantized model, downloads it if you don't have it, runs the denoise loop, and hands you a finished image. Drop it in, pick a model, type a prompt, hit queue. That's the whole pitch, and it genuinely works.
Why would you want that? Because the model list is the draw. Thirty-plus pre-quantized builds of FLUX.1, FLUX.2, Qwen-Image, Z-Image, SD3.5, even LTX-2 video, all hosted by Disty0's SDNQ collection. The quantization is SDNQ, Disty0's own engine that registers itself into diffusers via an import side effect - the pack's own source literally calls from sdnq import SDNQConfig to hook in. The node then loads through DiffusionPipeline.from_pretrained, which is why it can swallow FLUX and Qwen and Z-Image alike without caring what architecture they are. This is diffusers running inside ComfyUI, not ComfyUI's native loaders.
That's also the catch, and you should know it before you fall in love: it's a walled garden. You can't wire your own VAE, CLIP, or ControlNet into it, and your LoRAs go through the node's own dropdowns, not the ComfyUI LoRA loader. What you get in return is VRAM relief - the advertised 50-75% saving is in the right ballpark for the uint4 builds - plus zero setup for models that would otherwise take you an afternoon of GGUF hunting. It's the "I just want to see what FLUX.2 looks like" node. There's a case to use it forever; there's also a case to treat it as a demo and graduate to a native workflow when you outgrow it.
The inputs that matter
The dropdown list is long, so start with the sensible defaults rather than reading everything:
- model_selection - 31 pre-configured models, each auto-downloaded from HuggingFace on first use.
FLUX.1-dev-SDNQ-uint4orQwen-Image-SDNQ-uint4are safe first picks.[Custom Path]plus custom_model_path lets you point at a local diffusers directory if you'd rather manage downloads yourself. - prompt / negative_prompt - self-explanatory, but note the tooltip: FLUX-schnell runs at cfg 0 and ignores your negative prompt entirely. Don't be surprised when it does.
- scheduler - the one that bites. The tooltip is emphatic for a reason:
FlowMatchEulerDiscreteSchedulerfor FLUX/SD3/Qwen/Z-Image,DPMSolverMultistepScheduler/Euler/UniPC for SDXL/SD1.5. Wrong family = broken, banded garbage. The default is DPM, so if you're on a flow-matching model, switch it before your first queue. - memory_mode -
gpu(24GB+),balanced(12-16GB, the default), orlowvram(8GB, sequential offload, slowest). Same logic as ComfyUI's own low-VRAM flags: only climb down as far as you need to. - cfg, steps, seed, width, height, dtype - the usual knobs; bfloat16 is the right dtype for FLUX on a modern card.
Outputs are image (an IMAGE tensor, feed it to any preview/save node) and latent (LATENT, if you want to pass the result on). For LTX-2 video, set num_frames above 1 and you get a batch of frames out.
Install
ComfyUI Manager → search "comfyui-sdnq" → install → restart. Manual:
cd ComfyUI/custom_nodes/
git clone https://github.com/EnragedAntelope/comfyui-sdnq.git
cd comfyui-sdnq && pip install -r requirements.txt
The requirements pull in sdnq>=0.1.7, diffusers ≥0.36, huggingface-hub, safetensors, accelerate, and hf-xet for fast chunked downloads. First model fetch is 5-20GB and lands in ComfyUI/models/diffusers/sdnq/.
Where people get burned
The number-one troubleshooting section in the README is library versions, because it's the real problem. Newest models (FLUX.2-klein, GLM-Image, Qwen-Image-2512, LTX-2) need diffusers built from source:
pip install --upgrade transformers diffusers
pip install git+https://github.com/huggingface/diffusers.git
If you hit a Config has no attribute error, that's exactly this. Slow? Install Triton (pip install triton on Linux, triton-windows on Windows) to unlock the quantized matmul path - the node auto-disables it if Triton's missing. OOM at big resolutions? Toggle enable_vae_tiling and/or drop to a uint4 model. And remember the quantization rule from the broader ComfyUI world: it exists so models fit, not so they're faster - if the full model already fits your card, uint4 buys you little and costs quality in fine details like eyes. Use it when you need it.
It's opinionated, it's a one-shot convenience box, and for running bleeding-edge models on modest VRAM it's the fastest on-ramp there is.
Inputs (37)
| Name | Type | Default | Description |
|---|---|---|---|
| model_selection | COMBO | FLUX.1-dev-qint8 | Select a pre-configured SDNQ model (auto-downloads from HuggingFace) or choose [Custom Path] to specify a local model directory |
| custom_model_path | STRING | Local path to SDNQ model directory (only used when [Custom Path] is selected). Example: /path/to/model or C:\path\to\model | |
| prompt | STRING | Text description of the image to generate. Be descriptive for best results. | |
| negative_prompt | STRING | blurry, low quality, distorted, deformed, ugly, bad anatomy, bad hands, text, watermark, signature | What to avoid in the image. Default includes common quality issues. Clear this for no negative prompt. Note: FLUX-schnell (cfg=0) ignores negative prompts. |
| steps | INT | 251–150 | Number of denoising steps. More steps = better quality but slower. 20-30 is typical for most models. |
| cfg | FLOAT | 7.00–30 | Guidance scale - how closely to follow the prompt. Higher = more literal. FLUX-schnell uses 0.0, FLUX-dev uses 3.5-7.0, SDXL uses 7.0-9.0. |
| width | INT | 102464–4096 | Image width in pixels. Must be multiple of 8. Larger = more VRAM usage. 1024 is standard for FLUX/SDXL. |
| height | INT | 102464–4096 | Image height in pixels. Must be multiple of 8. Larger = more VRAM usage. 1024 is standard for FLUX/SDXL. |
| seed | INT | 00–18446744073709550000 | Random seed for reproducible generation. Same seed + settings = same image. |
| scheduler | COMBO | DPMSolverMultistepScheduler | ⚠️ IMPORTANT: Use FlowMatchEulerDiscreteScheduler for FLUX/SD3/Qwen/Z-Image. Use DPMSolver/Euler/UniPC for SDXL/SD1.5. Wrong scheduler = broken images! |
| dtype | COMBO | bfloat16 | Model precision. bfloat16 recommended for FLUX (best quality/speed). float16 for older GPUs. float32 for CPU. |
| memory_mode | COMBO | balanced | Memory management: 'gpu' = All on GPU (fastest, needs 24GB+ VRAM). 'balanced' = Model offloading (12-16GB VRAM). 'lowvram' = Sequential offloading (8GB VRAM, slowest). |
| auto_download | BOOLEAN | true | Automatically download model from HuggingFace if not found locally. Disable to only use local models. |
| lora_selectionopt | COMBO | [None] | Select LoRA from ComfyUI loras folder ([None] = disabled, [Custom Path] = use custom path below). LoRAs add styles or concepts to generation. |
| lora_custom_pathopt | STRING | Custom LoRA path or HuggingFace repo ID (only used when [Custom Path] is selected). Example: /path/to/lora.safetensors or username/lora-repo | |
| lora_strengthopt | FLOAT | 1.00-5–5 | LoRA 1 influence strength. 1.0 = full strength, 0.5 = half strength, 0.0 = disabled. Negative values invert the LoRA effect. Range: -5.0 to +5.0. |
| lora2_selectionopt | COMBO | [None] | Optional second LoRA. Select from ComfyUI loras folder or use [Custom Path]. |
| lora2_custom_pathopt | STRING | Custom path for LoRA 2 (only used when [Custom Path] is selected). | |
| lora2_strengthopt | FLOAT | 1.00-5–5 | LoRA 2 influence strength. |
| lora3_selectionopt | COMBO | [None] | Optional third LoRA. Select from ComfyUI loras folder or use [Custom Path]. |
| lora3_custom_pathopt | STRING | Custom path for LoRA 3 (only used when [Custom Path] is selected). | |
| lora3_strengthopt | FLOAT | 1.00-5–5 | LoRA 3 influence strength. |
| lora4_selectionopt | COMBO | [None] | Optional fourth LoRA. Select from ComfyUI loras folder or use [Custom Path]. |
| lora4_custom_pathopt | STRING | Custom path for LoRA 4 (only used when [Custom Path] is selected). | |
| lora4_strengthopt | FLOAT | 1.00-5–5 | LoRA 4 influence strength. |
| lora5_selectionopt | COMBO | [None] | Optional fifth LoRA. Select from ComfyUI loras folder or use [Custom Path]. |
| lora5_custom_pathopt | STRING | Custom path for LoRA 5 (only used when [Custom Path] is selected). | |
| lora5_strengthopt | FLOAT | 1.00-5–5 | LoRA 5 influence strength. |
| use_quantized_matmulopt | BOOLEAN | true | Enable Triton quantized matmul for 30-80% speedup. Uses torch.compile internally for dequantization. Linux: 'pip install triton'. Windows: 'pip install triton-windows'. Auto-disabled if unavailable. |
| use_xformersopt | BOOLEAN | false | Enable xFormers memory-efficient attention for 10-45% speedup. Works with all memory modes (gpu/balanced/lowvram). Auto-fallback to SDPA if xformers not installed or incompatible. Requires: pip install xformers |
| enable_vae_tilingopt | BOOLEAN | false | Enable VAE tiling for very large images (>1536px). Prevents out-of-memory errors on high resolutions. Minimal performance impact. Recommended for images >1536x1536. |
| image1opt | IMAGE | Optional source image for image editing models (Qwen-Image-Edit, ChronoEdit, etc.). Leave unconnected for text-to-image generation. | |
| image2opt | IMAGE | Optional second image for multi-image editing models (Qwen-Image-Edit-2509/2511). Not all models support multiple images. | |
| image3opt | IMAGE | Optional third image for multi-image editing models. | |
| image4opt | IMAGE | Optional fourth image for multi-image editing models. | |
| image_resizeopt | COMBO | No Resize | Resize input images before processing. Smaller = faster inference, less VRAM. 'No Resize' keeps original dimensions. |
| num_framesopt | INT | 11–257 | Number of frames for video models (LTX-2, Wan). Set to 1 for image models. Video models: 161 frames ~= 6 sec at 25fps. Must be divisible by 8+1 for some models. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| latent | LATENT | — |