Nodes/image_control/abyz22_blendimages
ComfyUI Node

abyz22_blendimages

Two images, one mask, zero fuss

By abyz22·Created 3 years ago·Updated 2 years ago· 17
abyz22_blendimages
  • imageA
  • imageB
  • mask
  • image
blend_percentage0.50

Blending two images through a mask is one of those operations ComfyUI makes oddly annoying to find. You want the face from A, the hair from B, and a soft boundary between them - that's a per-pixel blend, and abyz22_blendimages does exactly that with three wires and a slider. It's the batch-safe version of WAS Node Suite's "Image Blend by Mask" wrapped so you can drop it into a workflow that's already iterating over a batch of images.

The pack context matters here: abyz22/image_control is a fork of Impact Pack with adult-body-editing tooling bolted on, and this node is one of the generic utilities riding along. Blend + mask is how you composite an inpainted region back onto a source image - the "keep what the model didn't touch" step that mask-based inpainting lives on.

What you feed it

The three inputs are straightforward:

  • imageA - the base image (IMAGE).
  • imageB - the image you're blending in (IMAGE).
  • mask - an IMAGE, not a MASK, even though the name says mask. This is the gotcha. It's treated as a grayscale weight map: white pulls imageB, black keeps imageA, grey makes a soft mix.
  • blend_percentage (0–1, default 0.5) - how much of imageB wins everywhere the mask allows. 0 keeps A, 1 keeps B, values between are the classic cross-fade.

Output is a single image with the same batch count as your inputs, so it slots right back into whatever you were feeding downstream.

How the mechanism works

Under the hood it instantiates WAS's "Image Blend by Mask" node and calls it once per frame in your batch, then concatenates the results. That's the whole thing - it's a compatibility shim with a batch loop. The practical consequences are two: you need WAS Node Suite installed for it to run (the mapping is looked up at execution time, so a missing WAS pack shows up as a crash, not a friendly warning), and every frame in the batch gets its own blend using the corresponding frame of the mask.

Install and gotchas

ComfyUI Manager → "image_control", or:

cd ComfyUI/custom_nodes
git clone https://github.com/abyz22/image_control

Restart, and make sure you've also got WAS Node Suite installed - this node is a wrapper around it. The pack's own requirements (openpyxl, pytorch-lightning, kornia) don't include WAS, so it's easy to end up with the wrapper and not the thing it wraps.

Two practical notes. First, mask sizing: the blend doesn't resize anything, so if your mask is a different resolution than your images you'll get silently wrong results - resize it to match. Second, if the boundary is harsh, the mask needs feathering before this node, not after; you can't un-seam a hard cut with the blend slider. For the intended workflow - inpaint a region, blend it back over the original with a feathered mask at 0.5 - this is the node to reach for.

Categoryabyz22

Inputs (4)

NameTypeDefaultDescription
imageAIMAGE
imageBIMAGE
maskIMAGE
blend_percentageFLOAT0.500–1

Outputs (1)

NameTypeDescription
imageIMAGE