Nodes/IAMCCS-nodes/IAMCCS Ideo Inpaint Prep
ComfyUI Node

IAMCCS Ideo Inpaint Prep

Get your image and mask to the exact frame before inpainting

By IAMCCS·Created 11 months ago·Updated 7 days ago· 113
IAMCCS Ideo Inpaint Prep
  • image
  • mask
  • image
  • mask
  • report
width1024
height1024
fitcover
mask_grow_px0
mask_blur_px0
invert_maskfalse

Inpainting in a multi-resolution pipeline has a boring but brutal failure mode: your image and mask aren't the same size, or neither matches what the model expects, and the whole inpaint silently goes wrong - blurry patches, offset masks, edges that don't line up. IAMCCS IdeoInpaintPrep exists so that never has to be you. It takes an image + mask pair, resizes both to a target frame, and hands you back a matched set ready for InpaintModelConditioning.

The author's docstring names the target precisely: "Resize an image+mask pair to the Ideogram frame before InpaintModelConditioning." So think of it as the front-end plumbing of the Ideogram inpaint branch - the node that makes sure the geometry is right before the conditioning math runs.

The inputs that matter

  • width / height - the target frame (64–16384, step 8). Match these to your latent dimensions.
  • fit - how the source gets squeezed: cover (fills the frame, crops overflow - the usual choice), contain (fits inside, letterboxes), or stretch (distorts to fill).
  • mask_grow_px / mask_blur_px - the two classic mask fixes. Growing expands the masked region so the model has room to blend at the edges; blurring softens the boundary so you don't get a hard seam. Start at 0 and only bump when you see edge artifacts.
  • invert_mask - flip what's protected and what's editable, for the cases where your mask came out backwards.

Outputs are image, mask, and a report string describing what was done (per-frame sizes, grow/blur applied). Wire the resized pair straight into InpaintModelConditioning.

Why not the built-in resize nodes?

You can chain stock nodes to do this, and the pack authors clearly know it - the value here is that it's one node that keeps image and mask in lockstep. A mask resized independently of its image is a classic source of subtle inpaint bugs, and this removes that class of mistake entirely. It also runs per-frame across a batch and reports what it did, which makes it easier to spot when a frame came in at an unexpected size.

Install

Part of IAMCCS-nodes. ComfyUI Manager → search IAMCCS, or:

cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git

Restart and you're done. No dependencies beyond torch/PIL/numpy.

The one thing to check

If your inpaint results look soft or the edit area drifts, it's usually the fit mode disagreeing with how the rest of your graph crops. If the rest of the pipeline uses cover-crop semantics, keep fit on cover and make sure width/height match the latent you encode into - a mismatch between prep resolution and latent resolution is where the blur creeps in.

CategoryIAMCCS/Cine/Ideogram

Inputs (8)

NameTypeDefaultDescription
imageIMAGE
maskMASK
widthINT102464–16384
heightINT102464–16384
fitCOMBOcover3 options: cover, contain, stretch
mask_grow_pxINT00–128
mask_blur_pxINT00–128
invert_maskBOOLEANfalse

Outputs (3)

NameTypeDescription
imageIMAGE
maskMASK
reportSTRING