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
Related Repositories
| Model | ComfyUI Node | Weights | Notes |
|---|---|---|---|
| Qwen-Image 2.1 (this repo) | Wither033/ComfyUI-QwenImage21-PixelHead | pocis/Qwen-Image-2.1-PixelHead | 48.8 MiB (1x) / 52.1 MiB (1x+2x), 4-ch RGBA, 5.55 ms (67.1×), 33.91 dB |
| Krea-2 | Wither033/ComfyUI-Krea2-PixelHead | pocis/Krea-2-PixelHead | 52.6 MiB BF16, 6144d bridged RGB, 59.55 ms (24.7×), 33.33 dB |
| MiniMax-H3 (preview) | Wither033/ComfyUI-MiniMaxH3-PixelHead | pocis/MiniMax-H3-Video-PixelHead | Experimental preview (not recommended for production yet; high-frequency textures are soft) |
| Training Code & Notes | Wither033/FastFrames-PixelHead-Trainer | HF Collection | Training 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
| File | Size | Scale | Notes |
|---|---|---|---|
qwen_image_2.1_pixel_head_bf16.safetensors | 48.8 MiB | 1x | Native resolution (5.55 ms), BF16 trunk + FP32 output layer. |
qwen_image_2.1_pixel_head_x2_bf16.safetensors | 52.1 MiB | 1x + 2x | Includes frozen 1x trunk + 2x stage (1024 → 2048 in ~12 ms); selectable via output_scale. |
qwen_image_2.1_pixel_head.safetensors | 97.0 MiB | 1x | Full FP32 checkpoint (25.4M params). |
qwen_image_2.1_pixel_head_x2.safetensors | 103.3 MiB | 1x + 2x | Full FP32 2x checkpoint (27.1M params). |
workflows/01_QwenImage21_PixelHead_ZeroVAE_EN.json | 10 KB | 1x | 1x workflow + optional side-by-side stock VAE check (EN & ZH included). |
workflows/02_QwenImage21_PixelHead_X2_2048_ZeroVAE_EN.json | 10 KB | 2x | 1024 → 2048 single-pass 2x workflow (EN & ZH included). |
Benchmark (768×768 Held-Out Split, NVIDIA L4)
| Decoder | Size | Median Latency | Speedup | PSNR (↑) | LPIPS-VGG (↓) | Extra VRAM | RGBA |
|---|---|---|---|---|---|---|---|
Official Qwen-Image 2.1 VAE (1x) | 644.2 MiB | 372.30 ms | 1.0× | (ref) | 0.0000 | ~1.9–7.5 GB | Yes |
QwenImage21 PixelHead (1x) | 48.8 MiB | 5.55 ms | 67.1× | 33.91 dB | 0.1524 | < 0.2 GB | Yes |
QwenImage21 PixelHead X2 (2x) | 52.1 MiB | ~12 ms | — | Dual 1x (33.91 dB) + 2x | — | < 0.35 GB | Yes |
- Typography & posters:
38.57 dBPSNR (0.0653LPIPS) - 2D anime & cel shading:
34.69 dBPSNR (0.1363LPIPS) - Portraits & paintings:
33.76 dBmean PSNR (37.4–41.3 dBon 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) |
|---|---|
Ink & Paper Grain (36.9 dB) | Woodcut Cross-Hatching |
Setup in ComfyUI
- Install ComfyUI-QwenImage21-PixelHead via ComfyUI Manager or
git clone. - Put the
.safetensorsfile inComfyUI/models/pixel_heads/(orComfyUI/models/vae/). - Insert
Qwen-Image 2.1 Pixel Head Tapon theMODELwire beforeKSampler, and replaceVAEDecodewithQwen-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 MiBVAE 为372.3 ms),测试集均值33.91 dBPSNR(文字排版38.57 dB);2x模式:1024×1024采样结束后约12 ms直接输出2048×20484 通道 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 查看