Skip to main content
PiD (Pixel Diffusion Decoder) turns a diffusion latent into a 4x super-resolved image in 4 distilled pixel-space steps. No separate VAE decode needed. This workflow demonstrates using PiD to upscale a Z-Image-Turbo latent from 1024px to 4096px. Related Links: PiD Latent Upscale workflow
Make sure your ComfyUI is updated.Workflows in this guide can be found in the Workflow Templates. If you can’t find them in the template, your ComfyUI may be outdated.If nodes are missing when loading a workflow, possible reasons:
  1. You are not using the latest ComfyUI version (Nightly version)
  2. Some nodes failed to import at startup

Download Workflow

Download JSON or search “Image Upscale: PiD Latent Decode” in Template Library

How PiD works

PiD matches checkpoints by the VAE / latent space of the upstream model (the encoder side), not the diffusion model name alone. You need to select the PiD checkpoint that corresponds to the latent space of the model used for initial generation. This workflow uses Z-Image-Turbo (1024px latent to 4096px output) which shares Flux.1’s 16-ch VAE.

Learn about Subgraph

This workflow uses Subgraph nodes for modular processing. Check out the Subgraph documentation to learn how to customize and extend the workflow.

Available PiD checkpoints

All checkpoints are downloaded from Comfy-Org/PixelDiT to models/diffusion_models/.

Subgraph settings

Configure these on the Latent Upscale Decode (PiD) subgraph:

Steps to run

  1. Generate a latent. Use a T2I workflow (e.g., Z-Image-Turbo) to produce a latent image.
  2. Connect to PiD. Feed the latent into the Latent Upscale Decode (PiD) subgraph node.
  3. Select checkpoint. Choose the PiD checkpoint matching your upstream model’s VAE latent space.
  4. Set output size. Set PiD output size to 4x the input latent resolution.
  5. Run. The subgraph decodes and upscales in a single 4-step pass.

Model downloads

PiD is part of the PixelDiT model family. This workflow also requires the Z-Image-Turbo model for initial generation.

PiD Flux.1 1024 to 4096

pid_flux1_1024_to_4096_4step_bf16.safetensors: PiD checkpoint for Flux.1 / Z-Image latent space

Z-Image-Turbo diffusion

z_image_turbo_bf16.safetensors: used for initial generation before PiD upscale

Text Encoder (Z-Image)

qwen_3_4b.safetensors: text encoder for Z-Image-Turbo

VAE (Z-Image)

ae.safetensors: VAE for Z-Image-Turbo

Text Encoder (PiD)

gemma_2_2b_it_elm_fp8_scaled.safetensors: text encoder for PiD subgraph CLIPLoader (type: pixeldit)
PiD uses a built-in pixel_space VAE. No separate VAE file is needed for PiD itself.

Model storage location

Sample output

PiD sample output