Run this model with HF Jobs
Run PrunaAI/P-Q-Image-2.1-DWD-Comfy on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/PrunaAI/P-Q-Image-2.1-DWD-Comfy. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/PrunaAI/P-Q-Image-2.1-DWD-Comfy on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use PrunaAI/P-Q-Image-2.1-DWD-Comfy with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Pruna AI
How to use PrunaAI/P-Q-Image-2.1-DWD-Comfy with Pruna AI:
from pruna import PrunaModel model = PrunaModel.from_pretrained("PrunaAI/P-Q-Image-2.1-DWD-Comfy") - Notebooks
- Google Colab
- Kaggle
Download README.md from PrunaAI/P-Q-Image-2.1-DWD-Comfy: direct link, hf CLI and curl.
- Browser
- Download file 20.2 kB
-
https://huggingface.co/PrunaAI/P-Q-Image-2.1-DWD-Comfy/resolve/main/README.md
- Command line
-
hf download hf://PrunaAI/P-Q-Image-2.1-DWD-Comfy/README.md
-
curl -L -o README.md https://huggingface.co/PrunaAI/P-Q-Image-2.1-DWD-Comfy/resolve/main/README.md
license: other
license_name: qwen-research
license_link: LICENSE
base_model: PrunaAI/P-Q-Image-2.1-DWD
pipeline_tag: text-to-image
language:
- en
tags:
- comfyui
- qwen
- qwen-image
- text-to-image
- image-generation
- image-editing
- decoder-free
- vae-free
- dwd
- pruna-ai
β‘ P-Q-Image-2.1-DWD
Qwen-Image-2.1-Turbo without the VAE decode β ComfyUI
8 steps Β· No VAE decode Β· No CFG Β· Text-to-image and image editing
Built with Qwen.
P-Q-Image-2.1-DWD is a DWD head for
Qwen/Qwen-Image-2.1-Turbo. At the last of the 8 Turbo steps,
it writes the image's pixels straight out of the transformer, so the VAE decode is skipped. Steps 1 to 7 are the stock
Turbo model, unchanged. It is a replication of Decoding Without a Decoder (Chen et al.,
arXiv 2611.22287).
This repository is the ComfyUI export of
PrunaAI/P-Q-Image-2.1-DWD: the head in bf16, a
small custom node (pruna_dwd/) and ready-to-use workflows for text-to-image and image editing. For the diffusers
pipeline, the full evaluation and the training details, see the original repo.
| Tasks | Text-to-image, image editing |
| Sampling | 8 Turbo steps, euler, cfg 1: steps 1-7 stock, step 8 through the DWD head |
| Resolution | Width and height multiples of 32, about 1 MP to 2K |
| Head file | p_q_image_2.1_dwd_comfyui_bf16.safetensors, 1.95 GB (bf16) |
| Needs | ComfyUI 0.46 or newer; the Qwen-Image-2.1 Turbo checkpoint and text encoder; the VAE only for editing |
Quickstart
Update ComfyUI to 0.46 or newer.
Download the models. The base files come from Comfy-Org/Qwen-Image-2.1. Use the Turbo checkpoint, not the base one. The DWD head goes into a new
models/dwd/folder:hf download Comfy-Org/Qwen-Image-2.1 \ diffusion_models/qwen_image_2.1_turbo_bf16.safetensors \ text_encoders/qwen3vl_8b_bf16.safetensors \ vae/qwen_image_2.1_vae_bf16.safetensors \ --local-dir ComfyUI/models hf download PrunaAI/P-Q-Image-2.1-DWD-Comfy p_q_image_2.1_dwd_comfyui_bf16.safetensors \ --local-dir ComfyUI/models/dwdπ ComfyUI/ βββ π custom_nodes/ β βββ π pruna_dwd/ (this repo) βββ π models/ βββ π diffusion_models/ β βββ qwen_image_2.1_turbo_bf16.safetensors (14.23 GB) βββ π dwd/ β βββ p_q_image_2.1_dwd_comfyui_bf16.safetensors (this repo, 1.95 GB) βββ π text_encoders/ β βββ qwen3vl_8b_bf16.safetensors (17.53 GB) βββ π vae/ βββ qwen_image_2.1_vae_bf16.safetensors (0.68 GB, editing only)Text-to-image needs no VAE. The edit workflow uses it only to encode the input image; the result is not VAE-decoded.
Install the custom node: copy
pruna_dwd/intoComfyUI/custom_nodes/and restart ComfyUI. It needs no extra Python packages. It adds the Load DWD Head and DWD Decode nodes (category Pruna).hf download PrunaAI/P-Q-Image-2.1-DWD-Comfy --include "pruna_dwd/*" "workflows/*" --local-dir P-Q-Image-2.1-DWD-Comfy cp -r P-Q-Image-2.1-DWD-Comfy/pruna_dwd ComfyUI/custom_nodes/Open a workflow: drag a file from
workflows/onto ComfyUI and press Run. The edit workflow opens on ComfyUI's bundledexample.png, so it runs without any extra file. Each workflow's Model links note has the direct download links.
Workflows
| Workflow | Task | Models |
|---|---|---|
workflows/p_q_image_2.1_dwd_t2i.json |
Text-to-image | Turbo checkpoint, text encoder, DWD head |
workflows/p_q_image_2.1_dwd_image_edit.json |
Image editing | the same, plus the VAE to encode the input |
workflows/api/*_api.json |
The same two graphs in API format, for scripting through ComfyUI's /prompt endpoint |
Both workflows use core ComfyUI nodes plus the two Pruna nodes. Load Diffusion Model feeds Load DWD Head, which
attaches the head to the model. A Basic Guider (cfg 1) with TextEncodeQwenImage21 drives both samplers.
ManualSigmas holds the 8-step Turbo schedule and SplitSigmas (step 7) splits it:
SamplerCustomAdvanced runs steps 1 to 7 on the stock model with its high_sigmas, and DWD Decode runs step 8 with
its low_sigmas and returns the image. There is no VAE Decode node. Editing uses the native
TextEncodeQwenImage21 image inputs, and the edit workflow shows the input next to the result in Image Compare.
Both UI workflows, loaded in the ComfyUI frontend (1.59.11), convert to exactly the shipped API files and give the identical images.
Sampling settings
| Setting | Value |
|---|---|
| ManualSigmas | 1.0, 0.978453, 0.95418, 0.926626, 0.89508, 0.845148, 0.704534, 0.414568, 0 |
SplitSigmas step |
7 (the number of steps minus 1) |
| Sampler | euler |
| Guider | Basic Guider, cfg 1, no negative prompt |
| Size | Width and height multiples of 32; the edit workflow encodes at resolution 1024 (about 1 MP) |
- Keep the 8-step Turbo schedule. The head is trained at the last sigma, 0.414568. DWD Decode warns when the last sigma differs, and quality drops.
- cfg 1 only. DWD Decode refuses any other value. A CFGGuider at cfg 1 gives the identical image.
- Use the Turbo checkpoint in bf16. Quantized (int8) base checkpoints are untested with the head.
- Batches work. In a batch of 2, each image differs from the same image rendered alone about as much as it does with the stock model in ComfyUI.
Examples
Rendered in ComfyUI with the shipped workflows, on one NVIDIA B200. Left: the VAE decode of the same ComfyUI run. Right: P-Q-Image-2.1-DWD, with no VAE.
"a red fox standing in fresh snow at sunrise, professional wildlife photograph", 1024 Γ 1024. VAE | DWD, 34.1 dB PSNR between the two.
The same image at 100%, a 400 Γ 400 crop. VAE | DWD.
"Turn this drawing into a soft watercolor painting with visible paper texture." The edit workflow as shipped, on
ComfyUI's example.png. Input | VAE | DWD, 36.9 dB PSNR between VAE and DWD.
More examples at 2K, with 1:1 crops, are in the original repo.
Benchmark
Fidelity in ComfyUI
One NVIDIA B200, ComfyUI 0.46.0, bf16, batch size 1, the shipped workflows. Text-to-image: 4 prompts at 1024 Γ 1024, 1344 Γ 768, 1152 Γ 896 and 896 Γ 1152. Editing: 2 inputs at about 1 MP. The diffusers runs got the same starting noise as ComfyUI. Mean PSNR, higher is closer.
| Comparison | Text-to-image | Editing |
|---|---|---|
| DWD image vs the VAE image of the same ComfyUI run | 34.1 dB | 36.9 dB |
| ComfyUI vs diffusers, DWD | 35.0 dB | 42.0 dB |
| ComfyUI vs diffusers, stock model with VAE decode (for comparison) | 35.3 dB | 46.1 dB |
| ComfyUI vs diffusers, last step only from the same step-7 latent, DWD | 55.0 dB | 54.3 dB |
| ComfyUI vs diffusers, last step only from the same step-7 latent, stock (for comparison) | 47.6 dB | 50.5 dB |
- Close to the VAE image. In ComfyUI the DWD image stays as close to the VAE image as in diffusers (33.7 dB text-to-image and 35.9 dB editing on the same cases). This matches the original repo's evaluation over 64 cases per set: 34.8 dB for text-to-image at 1 MP and 35.3 dB for edits of real photos at 1 MP.
- ComfyUI is not diffusers. ComfyUI and diffusers do not give identical images, for the stock model either (different kernels and text encoder implementation). From the same step-7 latent, DWD Decode matches the diffusers head to 54-55 dB, closer than ComfyUI's own stock last step matches diffusers. End to end, edits drift a little more than the stock model, because the head is more sensitive to the small differences in steps 1 to 7.
Speed and memory (diffusers pipeline)
ComfyUI itself was not timed. These numbers come from the diffusers pipeline of the original repo, which runs the same computation: one NVIDIA B200, bf16, batch size 1, 8 steps, text-to-image, end to end including the prompt encode, uint8 image on the host. ComfyUI's own scheduling and memory management differ, so expect other absolute numbers.
| Mode | Size | With VAE decode | DWD | Speedup | Peak activation memory, VAE β DWD |
|---|---|---|---|---|---|
| eager | 1024 Γ 1024 | 767 ms | 696 ms | 1.10x | 7.06 β 0.69 GB |
| eager | 2048 Γ 2048 | 3500 ms | 3213 ms | 1.09x | 28.19 β 2.71 GB |
torch.compile |
1024 Γ 1024 | 597 ms | 513 ms | 1.16x | 9.21 β 2.53 GB |
torch.compile |
2048 Γ 2048 | 2797 ms | 2500 ms | 1.12x | 36.78 β 10.09 GB |
The head replaces the stock last step plus the VAE decode (160 ms at 1024 Γ 1024 and 691 ms at 2048 Γ 2048, eager) with one head step (87 ms and 407 ms). The head file adds 1.95 GB of weights; text-to-image needs no VAE file.
How it works
DWD (Decoding Without a Decoder, Chen et al.) trains the end of a diffusion transformer to output pixels instead of a latent. For Qwen-Image-2.1-Turbo:
- Steps 1 to 7 run the stock Turbo model, unchanged.
- Step 8 runs the stock blocks 0-27, then the head's own copy of the last 4 blocks (28-31), fine-tuned, with its own time embedding, modulation and output norm (0.98B parameters). A linear head (4096 β 768) turns each image token into a 16 Γ 16 pixel patch in normalized Oklab, converted to RGB. There is no last Euler step and no VAE decode.
The head was trained on runs of the stock Turbo model at about 1 MP, text-to-image and edits, to match the stock VAE decode of the same run. The ComfyUI file holds the released head weights in bf16, laid out for ComfyUI's model code.
Limitations
- Close to, not the same as, the VAE image. The finest texture (fur, foliage, stone) is slightly softer than the VAE decode, and heavily re-textured edits drift further from it.
- Not identical to the diffusers pipeline. ComfyUI's kernels and text encoder differ, so the same seed gives a close but different image (see the Benchmark).
- 8-step Turbo schedule and cfg 1 only. The negative prompt is unused.
- RGB only. No transparency (alpha) output.
- Sizes: width and height must be multiples of 32. The head was trained at about 1 MP and evaluated at about 1 MP (1024 Γ 1024, 1152 Γ 896, 896 Γ 1152, 1344 Γ 768, 768 Γ 1344) and 2K (2048 Γ 2048, 2528 Γ 1696, 1696 Γ 2528, 2752 Γ 1536, 1536 Γ 2752).
- Untested: quantized base checkpoints and LoRAs.
- Not supported: inpainting (a latent with a noise mask) and combined, area or masked conditioning are refused with an error.
License
P-Q-Image-2.1-DWD is a derivative of Qwen-Image-2.1-Turbo. The DWD head weights are distributed under the
Qwen RESEARCH LICENSE AGREEMENT. Review its use restrictions before using or redistributing the weights.
The ComfyUI node (pruna_dwd/) and the workflows are by Pruna AI, under the
Apache License 2.0. See NOTICE for which files are under which license.
Qwen is licensed under the Qwen RESEARCH LICENSE AGREEMENT, Copyright (c) 2026 Hangzhou Tongyi Laboratory Technology Co., Ltd. All Rights Reserved.
Citation
If you use this model, please cite the DWD paper and this release.
@article{chen2026dwd,
title = {Decoding Without a Decoder: Direct Pixel Prediction from Diffusion Transformers},
author = {Chen, Hansheng and Cai, Shengqu and Ackermann, Jan and Zirvi, Rayhan and Wetzstein, Gordon
and Yan, Xinchen and Guibas, Leonidas},
journal = {arXiv preprint arXiv:2611.22287},
year = {2026}
}
@software{pruna2026pqimagedwd,
title = {P-Q-Image-2.1-DWD: Decoding Without a Decoder for Qwen-Image-2.1-Turbo},
author = {{Pruna AI}},
year = {2026},
version = {0.1.0},
url = {https://huggingface.co/PrunaAI/P-Q-Image-2.1-DWD}
}
What's next?
- Use P-Q-Image-2.1-DWD to generate and edit images with Qwen-Image-2.1-Turbo in ComfyUI, without the VAE decode.
- Compress your own models with Pruna and give us a βοΈ for more efficiency!
- Want to use our optimized image models right away? Check P-Image-Ideogram and P-Image-Edit.