Does VAE-Free DWD Speed Up Qwen-Image 2.1 Turbo on M1 Max ComfyUI
Contents

PrunaAI released P-Q-Image-2.1-DWD for the Turbo variant of Qwen-Image 2.1. Short for Decoding Without a Decoder, it consists of extra weights (a DWD head) that skip the final VAE decoding step (converting intermediate latent data into pixels, while leaving the VAE encoder intact for editing) and predict pixels directly from the Transformer, along with ComfyUI nodes and workflows.
The speeds listed on the model card were measured on an NVIDIA B200 data-center GPU, and the card notes that ComfyUI timings have not been benchmarked. I ran it in ComfyUI on my M1 Max 64GB MacBook Pro to see how much replacing VAE decoding changes speed, memory, and output quality.
Test environment
| Item | Details |
|---|---|
| Machine | MacBook Pro, Apple M1 Max, 64GB memory |
| OS | macOS 27.0 |
| ComfyUI | 0.47.1 (separate from my daily setup), Python 3.12.12, PyTorch 2.15.0, MPS (Apple GPU compute backend) |
| Base model | Qwen-Image 2.1 Turbo (qwen_image_2.1_turbo_bf16, BF16 16-bit floating point) |
| Text encoder | Qwen3-VL 8B (qwen3vl_8b_bf16) |
| DWD head | p_q_image_2.1_dwd_comfyui_bf16 (1.95GB) |
| Baseline | Running the final step (step 8) of the same 8-step Turbo generation normally and decoding via VAE |
| Common settings | 8 steps, euler sampler, CFG 1, no negative prompt, sigma schedule from the official workflow |
Elapsed time was measured from when ComfyUI started a single execution until it finished. Models were already loaded, and repeated runs with the same text prompt reuse the cached text encoding.
Memory usage was recorded every 0.2 seconds inside the ComfyUI process via torch.mps.driver_allocated_memory(), taking the peak value during each run.
How P-Q-Image-2.1-DWD works
| Item | Details |
|---|---|
| Publisher | PrunaAI (Hugging Face) |
| Release date | November 24, 2026 (JST) |
| Target model | Qwen-Image 2.1 Turbo (8-step distilled variant); does not work with the base model |
| Base method | Reproduction of Decoding Without a Decoder (Chen et al., November 2026) |
| Supported tasks | Text-to-image generation, image editing with a reference image |
| Resolution | Width and height multiples of 32, roughly 1MP to 2K |
| License | Qwen Research License for the head weights; Apache 2.0 for the nodes and workflows |
In standard diffusion models, iterative denoising starts from random noise and refines an image in a compressed intermediate representation (a latent) rather than full-resolution pixels, before a VAE decoder converts that latent into pixels. DWD replaces both step 8 and the VAE decoder with a single pass through the DWD head inside the Transformer. Here, a step is one denoising iteration, while blocks are the Transformer layers executed inside each step. According to the model card, Qwen-Image 2.1 Turbo runs in the following sequence:
| Step | Operation |
|---|---|
| Steps 1–7 | Run with the original Turbo model |
| Step 8 | Run blocks (layers) 0–27 of the original model, followed by blocks 28–31 retrained for the DWD head |
| Output | A final linear layer maps each image patch token directly to 16×16 pixels, predicting Oklab color values and converting them to RGB |
The final sampling step and VAE decode are replaced by a single pass through the head.
In the official B200 Diffusers (a Python image-generation library) benchmark at 1024×1024, the last step plus VAE decode dropped from 160 ms to 87 ms with the head. Overall generation went from 767 ms to 696 ms (1.10x faster), and peak temporary memory dropped from 7.06GB to 0.69GB. Those numbers are from a B200, so I wanted to check what happens on an M1 Max in ComfyUI, where each sampling step takes much longer.
Because the DWD head was trained for a fixed configuration, the sampler must be euler, CFG must be 1, and the 8-step sigma schedule (how much noise remains at each step) cannot be changed from the official workflow’s values, which end at sigma 0.414568.
The model card also notes that quantized base models and LoRAs are untested, and mask-based inpainting is not supported.
Setting up a separate ComfyUI 0.46+ environment
The custom nodes require ComfyUI 0.46 or newer, while all of my existing local setups were 0.45.2 or older.
To avoid disrupting my daily environment, I cloned v0.47.1 into a separate folder and created a Python environment with uv.
git clone --depth 1 --branch v0.47.1 https://github.com/comfyanonymous/ComfyUI.git ComfyUI-dwd
cd ComfyUI-dwd
uv venv --python 3.12 .venv
uv pip install --python .venv/bin/python -r requirements.txt
I downloaded the base model, text encoder, and VAE from Comfy-Org/Qwen-Image-2.1, and the DWD head from the PrunaAI repository. The four files total about 34.4GB.
| File | Directory | Size |
|---|---|---|
qwen_image_2.1_turbo_bf16.safetensors | models/diffusion_models/ | 14.23GB |
qwen3vl_8b_bf16.safetensors | models/text_encoders/ | 17.53GB |
qwen_image_2.1_vae_bf16.safetensors | models/vae/ | 0.68GB |
p_q_image_2.1_dwd_comfyui_bf16.safetensors | models/dwd/ | 1.95GB |
Text-to-image generation does not need the VAE decoder at all, though editing still uses the VAE encoder to turn the input image into latents.
Copying the pruna_dwd/ folder into custom_nodes/ adds two nodes, Load DWD Head and DWD Decode, with no extra Python packages required.
Quality comparison on official examples
The official DWD workflow runs steps 1–7 in a standard sampler and hands step 8 to DWD Decode, without a VAE Decode node.
To compare output quality fairly, I split the latent output after step 7 into two branches: one went to DWD Decode, and the other ran step 8 on the original model followed by VAE Decode. Because both images come from the exact same step-7 latent in the same run, any difference comes solely from the final step.
First, I ran the default bakery sign prompt from the official workflow (random noise seeds 0 and 1), the fox prompt from the model card, and the official editing workflow (turning ComfyUI’s bundled example.png into a watercolor painting) at 1024×1024. The first run, including model loading, took 217.43 seconds.
PSNR measures how close two images are, with higher values meaning smaller differences; above 30 dB, differences are usually hard to spot side by side.
Mean pixel difference is the average absolute difference across all RGB channel values (0–255), where smaller values mean closer images.
| Prompt | Seed | PSNR (DWD vs. VAE) | Mean pixel diff |
|---|---|---|---|
| Bakery sign (official workflow default) | 0 | 35.71 dB | 2.68 |
| Bakery sign | 1 | 29.29 dB | 5.81 |
| Fox in snow (model card example) | 0 | 36.38 dB | 1.67 |
| Watercolor edit (official edit workflow) | 0 | 38.08 dB | 2.14 |
The model card reports ComfyUI quality averages (PSNR) of 34.1 dB for text-to-image and 36.9 dB for editing, and my M1 Max results fell in the same range.
For seed 0 of the bakery sign, the DWD and VAE outputs also looked virtually identical at normal size, so only seed 1 (the lowest PSNR) is shown below.







At normal viewing size, none of the pairs showed a visible difference. Even on the seed 1 sign with the lowest PSNR, both the lettering and the wood door matched.
Because the metrics still showed numerical differences, I located the 64×64 region with the largest pixel difference in the seed 1 sign and the fox image and cropped around it at 1:1 scale.




| Crop | Difference vs. VAE |
|---|---|
| Fox face | Fur texture is slightly softer; eye and nose shapes are identical |
| Pillar & stone wall | Stone grain has slightly lower contrast; wood grain lines sit in the same places |
The model card notes that fine textures such as fur, leaves, and stone tend to look slightly softer than with VAE decoding, and the crops here showed the same behavior.
Because DWD outputs pixels in 16×16 blocks, I also checked for visible seams along block boundaries.
Across these test images, the ratio of brightness change across 16×16 boundaries to brightness change elsewhere was 0.95–1.08 for DWD and 0.94–1.05 for VAE (values near 1 mean no extra jump appears at block edges). Within this test, DWD did not introduce extra jumps at block edges.
Anime illustrations and editing Kana-chan
Next, I generated two 832×1216 portrait prompts used in my earlier model tests: the white-and-gold robe character standing and running past a sunset castle. Because Qwen-Image 2.1 uses a language model as its text encoder, I rewrote the Danbooru tag lists from earlier articles into English sentences.
For editing, I used a front-facing standing illustration of my original character Kana-chan as the reference image and asked for an overhead camera angle. The reference image is the same one used in my local Qwen-Image 2.1 test, with seed 42 for all runs.
| Task | Output size | PSNR (DWD vs. VAE) | Mean pixel diff |
|---|---|---|---|
| White robe standing | 832×1216 | 34.71 dB | 2.15 |
| Running past sunset castle | 832×1216 | 32.97 dB | 3.21 |
| Kana-chan overhead edit | 832×1248 | 39.04 dB | 1.33 |
The edit output came out at 832×1248, 32 pixels taller than the 832×1216 input, because the editing node resizes the reference image to roughly 1MP (resolution 1024).






At scaled display size, neither the standing image nor the running scene showed any noticeable difference, and Kana-chan’s side ponytail, blue scrunchie, necktie, and shoes all matched.
Cropping around the face of the standing illustration at 1:1 scale, however, revealed small differences.


DWD produced slightly thinner outlines, with softer rendering on the eye highlights and the chest brooch—the same smoothing of fine detail seen on the fox fur and stone wall.
Generation time and memory
For the speed benchmark, the baseline was the default Qwen-Image 2.1 Turbo workflow running all 8 steps normally followed by VAE decoding.
Using the white robe standing prompt at 832×1216, I alternated between DWD and Turbo+VAE across three seeds.
| Seed | DWD | Turbo + VAE |
|---|---|---|
| 101 | 121.98s | 122.52s |
| 102 | 118.46s | 122.37s |
| 103 | 118.41s | 122.38s |
| Average | 119.62s | 122.42s |
DWD was about 2.8 seconds faster on average (1.02x), a smaller gain than the 1.10x reported on the B200.
Peak memory was 20.5–20.6GB for DWD and 20.47GB for VAE, with no meaningful difference. At this resolution, the ~14GB base model dominates memory usage, and temporary memory during VAE decoding did not push the peak higher.
To isolate why the overall difference was small, I timed only the final stage.
By running steps 1–7 in a prior execution so ComfyUI caches and reuses the step-7 latent, I measured just step 8 onward.
| Final stage | Run 1 | Run 2 | Run 3 |
|---|---|---|---|
| DWD Decode (pixel output via head) | 14.59s | 14.60s | 14.59s |
| Step 8 + VAE decode | 18.98s | 18.93s | 18.90s |
Looking only at the final stage, DWD was about 4.3 seconds faster (1.30x).
On the M1 Max, however, each sampling step takes roughly 14 seconds, so the ~100 seconds spent on steps 1–7 remain unchanged. Shaving ~4 seconds off a ~120-second run only comes out to a 2–3% difference overall.
Generation time for reference-image editing
I ran the same alternating timing test for the Kana-chan overhead edit across five seeds.
| Seed | DWD | Turbo + VAE |
|---|---|---|
| 101 | 216.94s | 162.58s |
| 102 | 170.65s | 155.90s |
| 103 | 170.50s | 199.48s |
| 104 | 170.52s | 159.35s |
| 105 | 170.45s | 159.26s |
One DWD run (216.94s) and one VAE run (199.48s) took around 40 seconds longer than the others for unknown reasons.
Excluding those outliers, DWD clustered around 170.5s while VAE ran in 155.9–162.6s—making DWD roughly 11 seconds slower for editing. Peak memory was 28.1–28.3GB for both.
| Task | DWD | Turbo + VAE | Difference |
|---|---|---|---|
| Text-to-image (832×1216) | 119.62s | 122.42s | DWD ~2.8s faster |
| Single-image edit (832×1248) | 170.5s | 155.9–162.6s | DWD ~11s slower |
| Peak memory (text-to-image) | 20.5–20.6GB | 20.47GB | No difference |
| Peak memory (single-image edit) | 28.1–28.3GB | 28.1–28.3GB | No difference |
To check the final stage for editing as well, I split the baseline at step 7 and timed step 8 + VAE decode against DWD Decode twice each.
| Final stage | Run 1 | Run 2 |
|---|---|---|
| DWD Decode | 32.90s | 32.91s |
| Step 8 + VAE decode | 37.20s | 37.20s |
Comparing the isolated final stages, DWD was still about 4.3 seconds faster in editing, so the head itself is not slow.
What changed was the duration of the final stage itself, rising from 14–19s in text-to-image to 32–37s in editing.
Qwen-Image 2.1 caches the computed keys and values for the text and reference-image tokens on step 1 (a prefix K/V cache) and only computes the generated image tokens from step 2 onward. The Turbo model card notes that this cache reuses the text and reference-image conditioning across steps.
The DWD workflow runs steps 1–7 and step 8 in separate nodes.
According to comments in pruna_dwd/nodes.py, DWD Decode disables this prefix cache because blocks 28–31 of the head have different weights and need to recompute attention over the text and reference-image tokens.
For text-to-image, that only means recomputing a few hundred text tokens, whereas for editing it also recomputes roughly 4,000 reference-image tokens (an 832×1216 image divided into 16×16 patches) at step 8.
In the default single-node 8-step run, step 8 still uses the prefix cache, which likely explains why DWD (with step 8 split out and cache disabled) ended up about 11 seconds slower overall.
Splitting the baseline at step 7 also pushed its final stage to 37.20s, suggesting that splitting the sampling loop across nodes itself adds overhead in editing.
Related articles
- Qwen-Image 2.1 Local on M1 Max vs Anima: 10 min/Image, Faces Kept in i2i — Running the base open weights with Diffusers on M1 Max 64GB, taking ~10 minutes per image at 40 steps
- Qwen-Image 2.1 on M1 Max: TaylorSeer Cache Cut 10 min/Image to 3.5 min — Cutting Transformer step compute on the base model using a training-free cache