Tech12 min read

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

IkesanContents

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

ItemDetails
MachineMacBook Pro, Apple M1 Max, 64GB memory
OSmacOS 27.0
ComfyUI0.47.1 (separate from my daily setup), Python 3.12.12, PyTorch 2.15.0, MPS (Apple GPU compute backend)
Base modelQwen-Image 2.1 Turbo (qwen_image_2.1_turbo_bf16, BF16 16-bit floating point)
Text encoderQwen3-VL 8B (qwen3vl_8b_bf16)
DWD headp_q_image_2.1_dwd_comfyui_bf16 (1.95GB)
BaselineRunning the final step (step 8) of the same 8-step Turbo generation normally and decoding via VAE
Common settings8 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

ItemDetails
PublisherPrunaAI (Hugging Face)
Release dateNovember 24, 2026 (JST)
Target modelQwen-Image 2.1 Turbo (8-step distilled variant); does not work with the base model
Base methodReproduction of Decoding Without a Decoder (Chen et al., November 2026)
Supported tasksText-to-image generation, image editing with a reference image
ResolutionWidth and height multiples of 32, roughly 1MP to 2K
LicenseQwen 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:

StepOperation
Steps 1–7Run with the original Turbo model
Step 8Run blocks (layers) 0–27 of the original model, followed by blocks 28–31 retrained for the DWD head
OutputA 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.

FileDirectorySize
qwen_image_2.1_turbo_bf16.safetensorsmodels/diffusion_models/14.23GB
qwen3vl_8b_bf16.safetensorsmodels/text_encoders/17.53GB
qwen_image_2.1_vae_bf16.safetensorsmodels/vae/0.68GB
p_q_image_2.1_dwd_comfyui_bf16.safetensorsmodels/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.

PromptSeedPSNR (DWD vs. VAE)Mean pixel diff
Bakery sign (official workflow default)035.71 dB2.68
Bakery sign129.29 dB5.81
Fox in snow (model card example)036.38 dB1.67
Watercolor edit (official edit workflow)038.08 dB2.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.

Sign · VAE (seed 1)
Wooden door with glass panels and a FRESH BREAD sign decoded with VAE
Sign · DWD (seed 1)
The same FRESH BREAD sign and door decoded with DWD
Fox · VAE
Red fox standing in snow decoded with VAE
Fox · DWD
Red fox standing in snow decoded with DWD
Input
Rough drawing of a blonde girl with arms outstretched bundled with ComfyUI
Watercolor · VAE
Watercolor-style edit of the girl decoded with VAE
Watercolor · DWD
Watercolor-style edit of the girl decoded with DWD

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.

Fox face · VAE
1:1 crop of the fox face decoded with VAE
Fox face · DWD
1:1 crop of the fox face decoded with DWD
Pillar & stone wall · VAE
1:1 crop of the wooden pillar and stone wall decoded with VAE
Pillar & stone wall · DWD
1:1 crop of the wooden pillar and stone wall decoded with DWD
CropDifference vs. VAE
Fox faceFur texture is slightly softer; eye and nose shapes are identical
Pillar & stone wallStone 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.

TaskOutput sizePSNR (DWD vs. VAE)Mean pixel diff
White robe standing832×121634.71 dB2.15
Running past sunset castle832×121632.97 dB3.21
Kana-chan overhead edit832×124839.04 dB1.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).

Standing · VAE
Blonde girl in a white and gold robe standing, decoded with VAE
Standing · DWD
Blonde girl in a white and gold robe standing, decoded with DWD
Running · VAE
Blonde girl running across grass with a sunset castle behind her, decoded with VAE
Running · DWD
Blonde girl running across grass with a sunset castle behind her, decoded with DWD
Kana-chan overhead · VAE
Overhead view of Kana-chan looking up, decoded with VAE
Kana-chan overhead · DWD
Overhead view of Kana-chan looking up, decoded with DWD

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.

VAE
1:1 crop of the standing girl's face and chest brooch decoded with VAE
DWD
1:1 crop of the standing girl's face and chest brooch decoded with DWD

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.

SeedDWDTurbo + VAE
101121.98s122.52s
102118.46s122.37s
103118.41s122.38s
Average119.62s122.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 stageRun 1Run 2Run 3
DWD Decode (pixel output via head)14.59s14.60s14.59s
Step 8 + VAE decode18.98s18.93s18.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.

SeedDWDTurbo + VAE
101216.94s162.58s
102170.65s155.90s
103170.50s199.48s
104170.52s159.35s
105170.45s159.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.

TaskDWDTurbo + VAEDifference
Text-to-image (832×1216)119.62s122.42sDWD ~2.8s faster
Single-image edit (832×1248)170.5s155.9–162.6sDWD ~11s slower
Peak memory (text-to-image)20.5–20.6GB20.47GBNo difference
Peak memory (single-image edit)28.1–28.3GB28.1–28.3GBNo 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 stageRun 1Run 2
DWD Decode32.90s32.91s
Step 8 + VAE decode37.20s37.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.

References