⚠️ Archived — use ComfyUI core instead.PiD (and PixelDiT base T2I) now have official ComfyUI core support via kijai's PR. It ships native nodes, auto model detection, proper VRAM management, and uses Comfy-Org's repackaged weights. That's the version you should use.
This repo predates the upstream support and is kept around as a learning artifact / reference implementation. Don't install it for production use.
NVIDIA PiD (Pixel Diffusion Decoder) as native ComfyUI nodes. Decodes latents straight to 4× resolution in a single 4-step pass. Works with Flux, Flux2, and Z-Image. No new pip dependencies.
- PiD Decoder Loader — loads a PiD checkpoint + Gemma text encoder.
- PiD Decode —
LATENT → IMAGE. Drop-in forVAE Decode, but 4× larger. - PiD Super-Resolve —
IMAGE → IMAGE. 4× upscale an existing image.
cd ComfyUI/custom_nodes
git clone https://github.com/nynxz/ComfyUI-PiD.gitGrab two files:
| Model | Source | Goes in |
|---|---|---|
| Gemma-2-2b-it text encoder (~5GB) | https://huggingface.co/nynxz/PiD | ComfyUI/models/text_encoders/ |
| PiD decoder checkpoint (~2.7GB each) | https://huggingface.co/nvidia/PiD | ComfyUI/models/pid/ |
Pick the decoder for your generation resolution:
| KSampler at | Output | Checkpoint |
|---|---|---|
| 512px (Flux / Z-Image) | 2048px | PiD_res2k_sr4x_official_flux_distill_4step |
| 1024px (Flux / Z-Image) | 4K | PiD_res2kto4k_sr4x_official_flux_distill_4step |
| Flux2 | 2K / 4K | swap _flux_ → _flux2_ |
Filename matters — the loader auto-picks the backbone from _flux_ / _flux2_ substrings. Z-Image uses the Flux checkpoint (shared VAE).
Replace VAE Decode with PiD Decode after your KSampler. Wire PiD Decoder Loader into the decoder input. Feed PiD Decode the same prompt you fed the KSampler — it uses it for guidance.
Example workflow: examples/PiD_flux2.json. Same prompt + seed, only the decoder changes:
| Flux2 VAE Decode (512×512) | PiD Decode (2048×2048) |
|---|---|
![]() |
![]() |
Click through to see the fine texture (hair, fabric weave, skin pores) PiD reconstructs.
Apache 2.0 — see LICENSE and NOTICE. Portions derived from nvidia/PiD. Bundled tokenizer is Google's official Gemma-2-2b SentencePiece model (sha256 61a7b147… — same as in google/gemma-2-2b-it).


