[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80852":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":40,"readmeContent":41,"aiSummary":42,"trendingCount":16,"starSnapshotCount":16,"syncStatus":14,"lastSyncTime":43,"discoverSource":44},80852,"ComfyUI-PiD","Merserk\u002FComfyUI-PiD","Merserk","ComfyUI custom node for NVIDIA PiD pixel diffusion decoding and upscale workflows","",null,"Python",84,6,2,3,0,1,18,48,5,58.34,"MIT License",false,"main",[26,27,28,29,30,31,32,33,34,35,36,37,38,39],"comfyui","comfyui-custom-node","comfyui-node","diffusion-models","dinov2","flux","flux2","latent-decoder","nvidia-pid","pid","pixel-diffusion","sd3","vae-decoder","z-image","2026-06-12 04:01:30","# ComfyUI-PiD\n\n**ComfyUI custom nodes** for using NVIDIA **PiD** as a pixel diffusion decoder.\n\n\u003Cimg width=\"1058\" height=\"604\" alt=\"image\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fcc5a9da3-94c6-4546-9574-c8387d5dffdb\" \u002F>\n\n\u003Cimg width=\"4096\" height=\"2048\" alt=\"1111111111111111\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F7ccd55ee-e571-4996-9c9c-4b5cecbb4418\" \u002F>\n\nPiD is not a normal ComfyUI `VAE`. It needs a latent, a prompt\u002Fcaption, a sigma value, and optionally a native decoder baseline image:\n\n```text\nLATENT + caption + sigma + optional baseline IMAGE -> PiD -> IMAGE\n```\n\nFor the official latent-conditioned PiD checkpoints, this node can infer the baseline size from the latent and skip the extra VAE\u002Fbaseline image path to reduce VRAM use.\n\n## Features\n\n- Direct **PiD Decode** node that returns a ComfyUI `IMAGE`.\n- Staged low-VRAM workflow: **PiD Prepare → PiD Sample → PiD Finalize**.\n- **PiD Sample** runs in a subprocess so CUDA memory is released after sampling.\n- **PiD KSampler Capture** for grabbing an intermediate latent and matching sigma.\n- Lazy setup: PiD source, checkpoints, and required assets are prepared on first run when `auto_download=true`.\n- Optional sequential block offload for lower VRAM at the cost of speed.\n\n## Install\n\nClone into `ComfyUI\u002Fcustom_nodes`:\n\n```bash\ncd ComfyUI\u002Fcustom_nodes\ngit clone https:\u002F\u002Fgithub.com\u002FMerserk\u002FComfyUI-PiD.git\ncd ComfyUI-PiD\npython -m pip install -r requirements.txt\n```\n\nRestart ComfyUI.\n\nRequirements:\n- Python `>=3.10`\n- NVIDIA CUDA GPU\n- Working ComfyUI install\n- Enough VRAM for PiD, especially for `2kto4k` or large output scales\n\n`requirements.txt` does not install PyTorch because ComfyUI usually provides it.\n\n## Nodes\n\n| Node | Purpose |\n| --- | --- |\n| **PiD Decode** | One-node PiD decode from latent to image. |\n| **PiD Text Prompt** | One prompt box with `text` for CLIP and `caption` for PiD. |\n| **PiD KSampler Capture** | KSampler-compatible sampler that returns final latent, captured PiD latent, and sigma. |\n| **PiD Prepare** | Prepares latent, caption, checkpoint, assets, and metadata on CPU. |\n| **PiD Sample** | Runs the heavy PiD sampling step in a subprocess. |\n| **PiD Finalize** | Converts sampled PiD output back to ComfyUI `IMAGE`. |\n| **PiD Decode (Staged)** | Convenience wrapper around the staged path. |\n\n## Supported backbones\n\n| Value | Backbone | Latent channels | Checkpoints |\n| --- | --- | ---: | --- |\n| `zimage` | Z-Image \u002F Flux-compatible | 16 | `2k`, `2kto4k` |\n| `flux` | Flux | 16 | `2k`, `2kto4k` |\n| `flux2` | Flux2 | 128 | `2k`, `2kto4k` |\n| `sd3` | Stable Diffusion 3 | 16 | `2k`, `2kto4k` |\n| `dinov2` | DINOv2 RAE | 768 | `2k` |\n| `siglip` | SigLIP Scale-RAE | 1152 | `2k` |\n\n`scale=0` uses NVIDIA's default scale for the selected checkpoint: usually `4x`, or `8x` for SigLIP Scale-RAE.\n\n## Basic workflow\n\nFor Z-Image \u002F Flux-style workflows:\n\n```text\nPiD Text Prompt text    -> CLIP Text Encode\nPiD Text Prompt caption -> PiD Decode caption\nKSampler latent         -> PiD Decode latent\nPiD Decode image        -> Save Image\n```\n\nRecommended first test settings:\n\n```text\nbackbone = zimage\npid_ckpt_type = 2k\npid_steps = 4\nscale = 1 or 2\ncfg_scale = 1.0\nsigma = 0.0\nauto_download = true\nunload_comfy_before_pid = true\naggressive_cleanup = true\nsequential_offload = disabled\n```\n\nFor official latent-conditioned checkpoints, leave `vae` and `baseline_image` disconnected unless you specifically need an external baseline size.\n\n## Lowest-VRAM staged workflow\n\nUse the staged nodes when VRAM is tight:\n\n```text\nPiD KSampler Capture pid_latent -> PiD Prepare latent\nPiD Text Prompt caption         -> PiD Prepare caption\nPiD Prepare                     -> PiD Sample\nPiD Sample                      -> PiD Finalize\nPiD Finalize image              -> Save Image\n```\n\nRecommended Z-Image capture settings:\n\n```text\nsteps = 50\nsampler_name = euler\nscheduler = beta\ncapture_step = 46\n```\n\n`PiD Sample` runs in a separate Python process, so its CUDA context is destroyed after the sample is finished.\n\n## Output size guide\n\n```text\n512x512 base  + 2k     + scale 4 -> 2048x2048\n1024x1024 base + 2kto4k + scale 4 -> 4096x4096\n```\n\nLarge outputs can require a lot of VRAM. If a run fails, try:\n1. Lower `scale`.\n2. Use a smaller base latent.\n3. Keep cleanup options enabled.\n4. Try `sequential_blocks`, then `sequential_blocks_aggressive`.\n5. Restart ComfyUI after CUDA allocator crashes.\n\n## PiD source and weights\n\nBy default, the node uses:\n\n```text\nComfyUI\u002Fcustom_nodes\u002FComfyUI-PiD\u002Fvendor\u002FPiD\n```\n\nYou can override the PiD source location with:\n- the `pid_source_dir` node input\n- `PID_REPO_DIR`\n- `COMFYUI_PID_REPO_DIR`\n\nWhen `auto_download=true`, the node downloads missing PiD source\u002Fcheckpoints\u002Fassets as needed.\n\n## Example workflow\n\nA template workflow is included in:\n\n```text\nexample_workflows\u002Fimage_z_image_pid.json\n```\n\nAfter restart, open it from ComfyUI workflow templates or load the JSON manually.\n\n## Notes\n\n- This is a community wrapper around NVIDIA's public PiD code, not an official NVIDIA or ComfyUI project.\n- PiD outputs `IMAGE`, not a ComfyUI `VAE`.\n- NVIDIA's PiD weights may have separate license\u002Fusage terms. Check the model card before commercial use.\n- Final latents with `sigma=0.0` can work, but captured intermediate latents usually better match the official PiD recipe.\n\n## License\n\nThis project is released under the MIT License.\n","ComfyUI-PiD 是一个为 NVIDIA PiD 像素扩散解码器设计的 ComfyUI 自定义节点项目。其核心功能包括直接从潜变量生成图像的 PiD Decode 节点、分阶段低显存使用的工作流程（PiD Prepare → PiD Sample → PiD Finalize），以及通过子进程运行采样步骤以释放 CUDA 内存。该项目支持多种骨干网络如 Z-Image\u002FFlux、Stable Diffusion 3 等，适用于需要高质量图像生成与放大处理但受限于显存资源的场景。安装简便，只需将代码克隆至指定目录并安装依赖即可开始使用。","2026-06-11 04:02:33","CREATED_QUERY"]