ComfyUI Extension
ComfyUI-PiD
ComfyUI custom node for NVIDIA PiD final latent decoding
npiriou/ComfyUI-PiD
Nodes2
On cloudLocal install
Categorylatent/PiD
Stars1
Updated3 months ago
Readme
ComfyUI PiD
ComfyUI custom nodes for NVIDIA PiD.
PiD is not a VAE file. It is a separate diffusion decoder used after sampling. The native VAE is still required internally to produce the low-resolution conditioning image.
Supported
- Flux 1 dev
512 -> 2048 - Flux 1 dev
1024 -> 3840 - Z-Image with Flux-compatible 16-channel latents
- Final clean latents only
- Batch size
1 - CUDA only
Install
- Put this repo in
ComfyUI/custom_nodes/. - Install dependencies:
pip install -r requirements.txt
- Put the PiD files here:
ComfyUI/models/pid/checkpoints/ae.safetensors
ComfyUI/models/pid/checkpoints/PiD_res2k_sr4x_official_flux_distill_4step/model_ema_bf16.pth
ComfyUI/models/pid/checkpoints/PiD_res2kto4k_sr4x_official_flux_distill_4step/model_ema_bf16.pth
Official downloads:
- PiD model hub
- ae.safetensors
- PiD_res2k_sr4x_official_flux_distill_4step/model_ema_bf16.pth
- PiD_res2kto4k_sr4x_official_flux_distill_4step/model_ema_bf16.pth
- Restart ComfyUI.
Workflow
Flux/Z-Image sampler
-> latent
-> PiD Model Loader
-> PiD Decode
-> image
Use:
PiD_res2k_sr4x_official_flux_distill_4stepfor512 -> 2048PiD_res2kto4k_sr4x_official_flux_distill_4stepfor1024 -> 3840
If the latent resolution does not match the selected checkpoint family, the node raises an explicit error.
Example Graphs
examples/api_flux1_pid_2k.jsonexamples/api_flux1_pid_2kto4k.json
Notes
- PiD is much heavier than normal VAE decode.
- The first PiD load may download upstream text-encoder assets through
transformers.
Upstream
The repo vendors NVIDIA's pid package under third_party/PiD. See third_party/PiD/LICENSE for the upstream license.