{"id":50563345,"url":"https://github.com/Merserk/ComfyUI-PiD","last_synced_at":"2026-06-21T08:00:46.446Z","repository":{"id":360165785,"uuid":"1248981027","full_name":"Merserk/ComfyUI-PiD","owner":"Merserk","description":"ComfyUI custom node for NVIDIA PiD pixel diffusion decoding and upscale workflows","archived":false,"fork":false,"pushed_at":"2026-06-12T20:13:19.000Z","size":512,"stargazers_count":85,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-06-12T22:11:43.871Z","etag":null,"topics":["comfyui","comfyui-custom-node","comfyui-node","diffusion-models","flux","flux2","latent-decoder","nvidia-pid","pid","pixel-diffusion","sd3","vae-decoder","z-image"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Merserk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-25T08:27:25.000Z","updated_at":"2026-06-12T20:13:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Merserk/ComfyUI-PiD","commit_stats":null,"previous_names":["merserk/comfyui-pid"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Merserk/ComfyUI-PiD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Merserk%2FComfyUI-PiD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Merserk%2FComfyUI-PiD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Merserk%2FComfyUI-PiD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Merserk%2FComfyUI-PiD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Merserk","download_url":"https://codeload.github.com/Merserk/ComfyUI-PiD/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Merserk%2FComfyUI-PiD/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34601662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["comfyui","comfyui-custom-node","comfyui-node","diffusion-models","flux","flux2","latent-decoder","nvidia-pid","pid","pixel-diffusion","sd3","vae-decoder","z-image"],"created_at":"2026-06-04T13:00:25.176Z","updated_at":"2026-06-21T08:00:46.430Z","avatar_url":"https://github.com/Merserk.png","language":"Python","funding_links":[],"categories":["Workflows trending today"],"sub_categories":[],"readme":"# ComfyUI-PiD\n\nCompact ComfyUI nodes for **NVIDIA PiD / PixelDiT** using ComfyUI-native `Comfy-Org/PixelDiT` model loading.\n\n\u003cimg width=\"1058\" height=\"604\" alt=\"ComfyUI-PiD workflow screenshot\" src=\"https://github.com/user-attachments/assets/cc5a9da3-94c6-4546-9574-c8387d5dffdb\" /\u003e\n\n\u003cimg width=\"4096\" height=\"2048\" alt=\"ComfyUI-PiD example output\" src=\"https://github.com/user-attachments/assets/7ccd55ee-e571-4996-9c9c-4b5cecbb4418\" /\u003e\n\nPiD is a latent-conditioned pixel diffusion decoder/upscaler:\n\n```text\nLATENT + caption + sigma -\u003e PiD -\u003e IMAGE\n```\n\n## Install\n\n```bash\ncd ComfyUI/custom_nodes\ngit clone https://github.com/Merserk/ComfyUI-PiD.git\ncd ComfyUI-PiD\npython -m pip install -r requirements.txt\n```\n\nRestart ComfyUI.\n\nRequirements: recent ComfyUI with native PixelDiT/PiD support, Python `\u003e=3.10`, NVIDIA CUDA GPU recommended.\n\n## Models\n\nMost nodes can download required files automatically when `auto_download=true`.\n\n| Use | Source | Local folder |\n| --- | --- | --- |\n| PiD diffusion + Gemma text encoder | `Comfy-Org/PixelDiT` | `ComfyUI/models/diffusion_models/nvidia_pid/` and `ComfyUI/models/text_encoders/nvidia_pid/` |\n| Caption Creator | `Qwen/Qwen3.5-0.8B` | `ComfyUI/models/text_encoders/nvidia_pid/qwen35_caption/` |\n| Upscale VAEs | Flux/Z-Image, Flux2, SD3 VAE files | `ComfyUI/models/vae/nvidia_pid/` |\n\nUse `model_precision=bf16` for best quality. `fp8` is available only for Flux1-family `2k/2kto4k` and Flux2-family `2k`; Flux2 `2kto4k`, SD3, SDXL, and Qwen-Image must use `bf16`.\n\n## Nodes\n\n| Node | Output | Purpose |\n| --- | --- | --- |\n| **PiD Decode** | `IMAGE` | One-node PiD decode from latent + caption + sigma. |\n| **PiD Text Prompt** | `text`, `caption` | One prompt for normal text encoding and PiD caption input. |\n| **PiD Caption Creator** | `text`, `caption` | Creates a caption from an input image with local Qwen. |\n| **PiD Empty Latent Image** | `LATENT` | Backbone-aware empty latent with correct channels/downscale. |\n| **PiD KSampler Capture** | `final_latent`, `pid_latent`, `pid_sigma` | KSampler-compatible sampler that captures the PiD latent and sigma. |\n| **PiD Prepare** | `PID_PREP` | Moves/validates latent data and resolves PiD model assets. |\n| **PiD Sample** | `PID_SAMPLES` | Runs native PiD sampling. |\n| **PiD Finalize** | `IMAGE` | Converts PiD samples to a ComfyUI image. |\n| **PiD Upscale** | `IMAGE` | Image-only tiled PiD upscaler with `2x/4x/6x/8x` output. |\n\nRecommended PiD sampling: `pid_steps=4`, `cfg_scale=1.0`, `scale=0` or `4`.\n\n## Supported Backbones\n\n| Backbone value | PiD family | Checkpoints | Latent | PiD Upscale |\n| --- | --- | --- | --- | --- |\n| `zimage` | Flux1 | `2k`, `2kto4k` | 16ch / 8x | yes |\n| `zimage-turbo` | Flux1 | `2k`, `2kto4k` | 16ch / 8x | yes |\n| `flux` | Flux1 | `2k`, `2kto4k` | 16ch / 8x | yes |\n| `flux2` | Flux2 | `2k`, `2kto4k` | 128ch / 16x | yes |\n| `flux2-klein-4b` | Flux2 | `2k`, `2kto4k` | 128ch / 16x | yes |\n| `flux2-klein-9b` | Flux2 | `2k`, `2kto4k` | 128ch / 16x | yes |\n| `sd3` | SD3 | `2k`, `2kto4k` | 16ch / 8x | yes |\n| `sdxl` | SDXL | `2kto4k` only | 4ch / 8x | no |\n| `qwenimage` | Qwen-Image | `2kto4k` only | 16ch / 8x | no |\n| `qwenimage-2512` | Qwen-Image | `2kto4k` only | 16ch / 8x | no |\n\n`dinov2` and `siglip` are not supported by the native Comfy-Org PiD model set.\n\n## Output Size Guide\n\nReleased PiD checkpoints use native `4x` scale.\n\n| `pid_ckpt_type` | Base latent/image size | Final PiD output | Valid base presets |\n| --- | --- | --- | --- |\n| `2k` | 512-class | base × 4, e.g. `512x512 -\u003e 2048x2048` | `512x512`, `576x432`, `432x576`, `624x416`, `416x624`, `672x384`, `384x672`, `784x336`, `336x784` |\n| `2kto4k` | 1024-class | base × 4, e.g. `1024x1024 -\u003e 4096x4096` | `1024x1024`, `1024x768`, `768x1024`, `1008x672`, `672x1008`, `1024x576`, `576x1024`, `1008x432`, `432x1008` |\n\nLatent size depends on backbone downscale. Example: Flux2 `1024x1024` uses a `128 × 64 × 64` latent.\n\n## PiD Upscale\n\n`PiD Upscale` accepts `IMAGE` and returns `IMAGE`. It is separate from latent decode: the node cuts the image into tiles, encodes each tile with the matching VAE, runs native 4-step PiD, blends tiles, then resizes to the selected final factor.\n\n| Setting | Values / behavior |\n| --- | --- |\n| `pid_ckpt_type` | `2k` uses 512px tiles; `2kto4k` uses 1024px tiles. |\n| `backbone` | `zimage`, `zimage-turbo`, `flux`, `flux2`, `flux2-klein-4b`, `flux2-klein-9b`, `sd3`. |\n| `model_precision` | Same limits as PiD decode; use `bf16` for best quality. |\n| `upscale_factor` | Final output size: `2x`, `4x`, `6x`, or `8x`. |\n| `strength` | PiD detail regeneration sigma, `0.0` to `1.0`; default `0.4`. |\n| `caption` | Optional string input; connect `PiD Caption Creator` or `PiD Text Prompt`. |\n\n| Profile | Tile size | Overlap | Small-image prepass |\n| --- | ---: | ---: | ---: |\n| `2k` | 512 | 64 | Resize long edge to 512, PiD once, then tiled upscale. |\n| `2kto4k` | 1024 | 128 | Resize long edge to 1024, PiD once, then tiled upscale. |\n\nUpscale VAEs are required because image tiles must be encoded into each backbone latent format:\n\n| Backbone family | Accepted VAE names |\n| --- | --- |\n| Flux1 / Z-Image | `ae.safetensors` |\n| Flux2 / Flux2-Klein | `flux2_ae.safetensors`, `flux2-vae.safetensors` |\n| SD3 | `sd3_vae.safetensors`, `diffusion_pytorch_model.safetensors` |\n\nFinal upscale size is always based on the original input image: `width × factor`, `height × factor`. SDXL and Qwen-Image are not available in `PiD Upscale` because this implementation only maps image VAEs for Flux1/Z-Image, Flux2/Flux2-Klein, and SD3.\n\n## Recommended Capture Settings\n\n| Backbone | LDM steps | Capture step | Sampler / scheduler |\n| --- | ---: | ---: | --- |\n| `flux`, `sd3` | 28 | 24 | `euler` / `flowmatch_euler_discrete` |\n| `sdxl` | 30 | 26 | `euler` / `normal` |\n| `flux2` | 50 | 46 | `euler` / `flowmatch_euler_discrete` |\n| `flux2-klein-4b`, `flux2-klein-9b` | 4 | 4 | `euler` / `flowmatch_euler_discrete` |\n| `qwenimage`, `qwenimage-2512` | 50 | 44 | `euler` / `flowmatch_euler_discrete` |\n| `zimage` | 50 | 46 | `euler` / `flowmatch_euler_discrete`, `flowmatch_shift=3.0` |\n| `zimage-turbo` | 9 | 9 | `euler` / `flowmatch_euler_discrete`, `flowmatch_shift=3.0` |\n\n## Main Workflows\n\n### Text-to-image / generation\n\n```text\nPiD Text Prompt -\u003e normal text encode + PiD caption\nPiD Empty Latent Image -\u003e model sampler\nPiD KSampler Capture pid_latent + pid_sigma -\u003e PiD Prepare\nPiD Prepare -\u003e PiD Sample -\u003e PiD Finalize -\u003e Save Image\n```\n\n### Direct decode\n\n```text\nLATENT + caption + sigma -\u003e PiD Decode -\u003e Save Image\n```\n\n### Image-to-image clean decode\n\n```text\nLoad Image -\u003e Resize -\u003e VAE Encode -\u003e PiD Prepare -\u003e PiD Sample -\u003e PiD Finalize -\u003e Save Image\n```\n\n### Tiled upscale\n\n```text\nLoad Image -\u003e PiD Caption Creator -\u003e PiD Upscale -\u003e Save Image\n```\n\n## Example Workflows\n\nIncluded in `example_workflows/`:\n\n```text\npid_flux_complete.json\npid_flux2_complete.json\npid_flux2_klein_4b_complete.json\npid_flux2_klein_9b_complete.json\npid_qwenimage_complete.json\npid_qwenimage_2512_complete.json\npid_sd3_complete.json\npid_sdxl_complete.json\npid_zimage_complete.json\npid_zimage_turbo_complete.json\npid_image_to_image_2k_complete.json\npid_image_to_image_2kto4k_complete.json\npid_upscale_complete.json\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMerserk%2FComfyUI-PiD","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMerserk%2FComfyUI-PiD","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMerserk%2FComfyUI-PiD/lists"}