PixelLockDecodeComposite
The convenience node that fuses decode and restore into one
- samples
- vae
- original_image
- pixel_lock_mask
- image
PixelLockDecodeComposite is the pack's shortcut. Where the "proper" workflow runs VAEDecode into PixelLockComposite as two separate nodes, this one decodes the sampled latent and applies the pixel lock composite in a single step. One node in, final image out. That's the entire pitch - and honestly it's a good one, because the step it collapses is exactly the step people forget.
The skipped-composite problem is the single most common mistake in masked inpainting. Every VAE encode/decode cycle is lossy, so if you decode a sampled latent and save without pasting the original pixels back, the regions you never meant to touch drift - subtly at first, worse on every subsequent pass. By fusing the decode and the composite, this node makes the correct behavior the only behavior. You can't forget to composite if there's no separate composite step to skip.
The inputs
- samples - the
LATENTcoming out of PixelLockSampler. - vae - the same VAE you'd use in a normal decode.
- original_image - the untouched source, used as the pixel-lock reference.
- pixel_lock_mask - the
PIXEL_LOCK_MASKfrom MaskBuilder. - boundary_strength (default 0.35) - keep it matching the sampler's value.
One output: image, ready for preview or save.
How it works
Under the hood it's exactly what you'd build by hand: decode samples with the VAE, then hand the result to the same composite routine PixelLockComposite uses - the alpha blend in soft_keep plus the hard, bit-for-bit paste of the original in hard_keep. The source literally calls PixelLockComposite's composite function on the decoded tensor. There's no separate magic; the value is that the wiring can't come apart.
When to use it versus doing it manually
If you're building a Pixel Locker workflow from scratch, just use this node - it's the tidy path, and the README's recommended workflow ends here: MaskBuilder → PixelLockSampler → PixelLockDecodeComposite. If you already have a VAEDecode in your graph for some other reason, or you want to preview the raw decode before compositing, then keep the two-node version. The math is identical either way.
Same geometry constraint as the composite node applies in spirit: the decoded latent has to come back at the original image's resolution for the pixel lock to mean anything. Run the sampler at the source image's native size and you're fine; if the latent is a different shape, the composite inside will reject the mismatch, so resize before sampling rather than after.
Install
Install the whole pack once: ComfyUI Manager → search ComfyUI-Pixel-Locker, or git clone https://github.com/Bogyie/ComfyUI-Pixel-Locker into ComfyUI/custom_nodes/ and restart ComfyUI. No weights to fetch, no requirements to wrestle - this is one of the few custom node packs you can install and trust to just work.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | — | |
| vae | VAE | — | |
| original_image | IMAGE | — | |
| pixel_lock_mask | PIXEL_LOCK_MASK | — | |
| boundary_strength | FLOAT | 0.350–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |