PiD Finalize
The last hop from PiD samples to a saveable image
- sampled
- image
The unglamorous closer. In the staged PiD path - PiD Prepare → PiD Sample → PiD Finalize - this node takes the PID_SAMPLES object that PiD Sample produced and converts it into a normal ComfyUI IMAGE you can feed to Save Image, a preview, or anything else downstream. It's the last hop, it does almost nothing, and that's the whole job.
You'll rarely touch it, and that's a sign it's working. One input, one output, no settings. It exists because the staged pipeline keeps the decoded pixel tensor in its own internal container through sampling (mostly to keep memory handling predictable on low-VRAM machines), and something has to pop that container open at the end.
The one input
sampled- thePID_SAMPLESobject fromPiD Sample. Nothing else feeds this port. If you try to wire in something else, ComfyUI just won't let you.
Output: image, an IMAGE tensor ready for Save Image.
How it works
PiD Finalize validates that it actually received a PID_SAMPLES object (it raises a clear "expected a PID_SAMPLES object from PiD Sample" error otherwise), converts the pixel-space tensor to ComfyUI's image format, and returns it. That's the mechanism - there's no resizing, no quality knob, no secret sauce. The heavy lifting all happened in PiD Sample.
The workflow
PiD KSampler Capture -> pid_latent -> PiD Prepare -> PiD Sample -> PiD Finalize -> Save Image
Or the decode-only variant:
LATENT (e.g. PiD Empty Latent Image) -> PiD Prepare -> PiD Sample -> PiD Finalize -> Save Image
Setup and gotchas
Part of the ComfyUI-PiD pack, so one install covers it: ComfyUI Manager → "ComfyUI-PiD", or
cd ComfyUI/custom_nodes
git clone https://github.com/Merserk/ComfyUI-PiD.git
cd ComfyUI-PiD
python -m pip install -r requirements.txt
then restart. Needs recent ComfyUI with native PiD support (0.28.0+) and Python 3.10+.
Honestly, the only way to get burned here is to forget the node exists - people wire PiD Sample straight into Save Image and get a type error, because PID_SAMPLES is not an image. If you hit that, you haven't broken anything; just insert PiD Finalize in between. The good news: since it has no settings, there's nothing to misconfigure, and if the earlier stages worked, this one just works.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| sampled | PID_SAMPLES | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |