IAMCCS Ideo Inpaint Prep
Get your image and mask to the exact frame before inpainting
- image
- mask
- image
- mask
- report
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), orstretch(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.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mask | MASK | — | |
| width | INT | 102464–16384 | — |
| height | INT | 102464–16384 | — |
| fit | COMBO | cover | 3 options: cover, contain, stretch |
| mask_grow_px | INT | 00–128 | — |
| mask_blur_px | INT | 00–128 | — |
| invert_mask | BOOLEAN | false | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| report | STRING | — |