Nodes/ComfyUI-IcyHider/Icy InpaintModelConditioning
ComfyUI Node

Icy InpaintModelConditioning

The bridge that turns a mask into an inpaint

By icekiub-ai·Created 9 months ago·Updated 9 months ago· 31
Icy InpaintModelConditioning
  • positive
  • negative
  • vae
  • pixels
  • mask
  • positive
  • negative
  • latent
noise_masktrue

IcyInpaintModelConditioning is the ComfyUI-IcyHider wrapper of core InpaintModelConditioning - same node, renamed class so the privacy extension can hide it. And this one is genuinely important: it's the piece that makes mask-based inpainting work in a standard ComfyUI graph.

Here's the problem this node solves. You have an image and a mask marking "regenerate this part, leave the rest alone." But the sampler doesn't work on pixels - it works on latents. Something has to encode your image into latent space and tell the sampler where it's allowed to change things. That's this node's whole job: it takes the image, encodes it with the VAE, and attaches your mask to the latent as a noise mask so the sampler only denoises inside the masked region and keeps the rest of the image frozen. The KB's inpainting doc calls this the defining property of mask-based inpainting: unmasked pixels stay bit-identical, which is the one thing edit models still can't guarantee.

Inputs

  • positive / negative (CONDITIONING) - your prompt conditioning, passed through unchanged.
  • vae (VAE) - the encoder used to turn pixels into latents. Use the VAE matching your checkpoint.
  • pixels (IMAGE) - the image you're inpainting into.
  • mask (MASK) - the region to regenerate. White = regenerated, black = kept, typically drawn with a mask/brush node or loaded with an image-as-mask loader.
  • noise_mask (BOOLEAN, default true) - and here's the author's own warning, straight from the schema tooltip: "Add a noise mask to the latent so sampling will only happen within the mask. Might improve results or completely break things depending on the model." Leave it on for standard checkpoints; some models genuinely dislike it, and it's the first thing to flip if your inpaint comes out wrong.

Outputs

Three: positive and negative CONDITIONING (the prompts you fed in, ready for the sampler) and latent (LATENT) - the masked, VAE-encoded image. Wire all three into a KSampler, and its latent output goes to VAEDecode to get your fixed image back.

The workflow shape

LoadImage → InpaintModelConditioning (pixels, mask, vae, positive, negative)
                                   ├─ positive → KSampler
                                   ├─ negative → KSampler
                                   └─ latent   → KSampler → VAEDecode → output

Don't forget the denoise on the sampler: the KB's inpainting guidance says 0.3–0.6 for moderate changes, 0.8+ for full regeneration. Too-high denoise on a small fix changes the whole mask region; too-low does nothing.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/icekiub-ai/ComfyUI-IcyHider

Restart, or use ComfyUI Manager (search "IcyHider"). No pip dependencies, no models.

Common issues

  • Missing node in shared workflows - install the pack or swap in core InpaintModelConditioning.
  • Nothing changed outside the mask, everything changed inside. Working as designed. If it changed too much inside, lower denoise.
  • Seams or color mismatch. The KB's inpainting notes blame the VAE encode/decode cycle - make sure you're using the matching VAE and consider mask feathering on the mask before it reaches this node.
  • The whole image regenerated. Your mask was probably all-white (or the noise_mask toggle disagreed with your model). Check the mask values first.
CategoryIcyHider Comfy Core

Inputs (6)

NameTypeDefaultDescription
positiveCONDITIONING
negativeCONDITIONING
vaeVAE
pixelsIMAGE
maskMASK
noise_maskBOOLEANtrueAdd a noise mask to the latent so sampling will only happen within the mask. Might improve results or completely break things depending on the model.

Outputs (3)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING
latentLATENT