Qwen-Image-2.1-PixelHead

pocis/Qwen-Image-2.1-PixelHead

作者
pocis
任务
图像生成
下载量
0
点赞数
34
趋势分
18
许可证
mit
收录时间
2026/11/24

license: mit base_model:

  • Qwen/Qwen-Image-2.1 pipeline_tag: text-to-image library_name: comfyui language:
  • en
  • zh tags:
  • qwen-image
  • qwen-image-2.1
  • pixel-head
  • pixel-decoder
  • super-resolution
  • fastframes
  • vae
  • comfyui
  • rgba

Qwen-Image 2.1 Direct Pixel Head (1x & 2x RGBA)

English | 简体中文 | ComfyUI Node (GitHub) | Comfy Registry

1:1 held-out comparison against official Qwen-Image 2.1 VAE

Related Repositories

ModelComfyUI NodeWeightsNotes
Qwen-Image 2.1 (this repo)Wither033/ComfyUI-QwenImage21-PixelHeadpocis/Qwen-Image-2.1-PixelHead48.8 MiB (1x) / 52.1 MiB (1x+2x), 4-ch RGBA, 5.55 ms (67.1×), 33.91 dB
Krea-2Wither033/ComfyUI-Krea2-PixelHeadpocis/Krea-2-PixelHead52.6 MiB BF16, 6144d bridged RGB, 59.55 ms (24.7×), 33.33 dB
MiniMax-H3 (preview)Wither033/ComfyUI-MiniMaxH3-PixelHeadpocis/MiniMax-H3-Video-PixelHeadExperimental preview (not recommended for production yet; high-frequency textures are soft)
Training Code & NotesWither033/FastFrames-PixelHead-TrainerHF CollectionTraining toolkit, DiT hook notes, and Colab L4 scripts

English

Qwen-Image-2.1-PixelHead is a direct pixel readout head (1x native and 2x upscaling) for Qwen-Image 2.1 (Qwen/Qwen-Image-2.1, Comfy-Org/Qwen-Image-2.1, 8-step distilled LoRAs, and quantized/fine-tuned variants), replacing the 644.2 MiB 64-channel WanVAE decoder at the end of sampling.

Following FastFrames (arXiv:2611.23226), it reads the DiT's 4096-dim hidden states right before proj_out together with the denoised 64-channel latent x0_hat on the final sampling step, decoding directly to 4-channel RGBA in 5.55 ms (1x) or 1024 → 2048 in ~12 ms (2x).

Files

FileSizeScaleNotes
qwen_image_2.1_pixel_head_bf16.safetensors48.8 MiB1xNative resolution (5.55 ms), BF16 trunk + FP32 output layer.
qwen_image_2.1_pixel_head_x2_bf16.safetensors52.1 MiB1x + 2xIncludes frozen 1x trunk + 2x stage (1024 → 2048 in ~12 ms); selectable via output_scale.
qwen_image_2.1_pixel_head.safetensors97.0 MiB1xFull FP32 checkpoint (25.4M params).
qwen_image_2.1_pixel_head_x2.safetensors103.3 MiB1x + 2xFull FP32 2x checkpoint (27.1M params).
workflows/01_QwenImage21_PixelHead_ZeroVAE_EN.json10 KB1x1x workflow + optional side-by-side stock VAE check (EN & ZH included).
workflows/02_QwenImage21_PixelHead_X2_2048_ZeroVAE_EN.json10 KB2x1024 → 2048 single-pass 2x workflow (EN & ZH included).

Benchmark (768×768 Held-Out Split, NVIDIA L4)

DecoderSizeMedian LatencySpeedupPSNR (↑)LPIPS-VGG (↓)Extra VRAMRGBA
Official Qwen-Image 2.1 VAE (1x)644.2 MiB372.30 ms1.0×(ref)0.0000~1.9–7.5 GBYes
QwenImage21 PixelHead (1x)48.8 MiB5.55 ms67.1×33.91 dB0.1524< 0.2 GBYes
QwenImage21 PixelHead X2 (2x)52.1 MiB~12 ms—Dual 1x (33.91 dB) + 2x—< 0.35 GBYes
  • Typography & posters: 38.57 dB PSNR (0.0653 LPIPS)
  • 2D anime & cel shading: 34.69 dB PSNR (0.1363 LPIPS)
  • Portraits & paintings: 33.76 dB mean PSNR (37.4–41.3 dB on dark portraits)

1:1 Crops (Left: Official 644 MB VAE · Right: 48.8 MB PixelHead)

Classical Portrait (37.4 dB)Dark Velvet (39.3 dB)
Portrait 1:1Velvet 1:1
Ink & Paper Grain (36.9 dB)Woodcut Cross-Hatching
Ink Grain 1:1Woodcut 1:1

Setup in ComfyUI

  1. Install ComfyUI-QwenImage21-PixelHead via ComfyUI Manager or git clone.
  2. Put the .safetensors file in ComfyUI/models/pixel_heads/ (or ComfyUI/models/vae/).
  3. Insert Qwen-Image 2.1 Pixel Head Tap on the MODEL wire before KSampler, and replace VAEDecode with Qwen-Image 2.1 Pixel Decode (Zero VAE).

简体中文

Qwen-Image-2.1-PixelHead 是适配 Qwen-Image 2.1(含官方原版、8 步加速 LoRA 及各类量化/微调版本)的免 VAE 像素直出头,提供 1x 原生尺寸(48.8 MiB)与 1x + 2x 超分版(52.1 MiB)。

参考 FastFrames (arXiv:2611.23226),模型在采样最后一步读取 DiT proj_out 前的 4096 维特征与去噪潜变量 x0_hat:

  • 1x 模式:在 L4 上解码 768×768 中位耗时 5.55 ms(官方 644.2 MiB VAE 为 372.3 ms),测试集均值 33.91 dB PSNR(文字排版 38.57 dB);
  • 2x 模式:1024×1024 采样结束后约 12 ms 直接输出 2048×2048 4 通道 RGBA 图像,同一个权重内保留了 1x 分支,可在节点上用 output_scale 切换 1x 或 2x。

文件说明

  • qwen_image_2.1_pixel_head_bf16.safetensors(48.8 MiB):仅需 1x 原生分辨率时使用(BF16 主干 + FP32 输出层)。
  • qwen_image_2.1_pixel_head_x2_bf16.safetensors(52.1 MiB):同时包含 1x 与 2x 输出分支。
  • qwen_image_2.1_pixel_head.safetensors(97.0 MiB)/ qwen_image_2.1_pixel_head_x2.safetensors(103.3 MiB):FP32 完整权重。
  • workflows/:包含 1x 与 2x 中英文示例工作流。

注意事项

  • 训练覆盖 ModelSamplingFlux(shift=0.69) 末步 $\sigma \in [0.038, 0.300]$(8 步加速 LoRA 与 18~35 步常规采样)。
  • 解码依赖采样最后一步实时截获的 4096 维 DiT 特征,无法脱离采样流程单独解码外部保存的 .latent 文件。
  • 开源协议:MIT License。

内容来源:Hugging Face 模型卡

在 Hugging Face 查看