Image Blend Resize
Place, scale, rotate, and blend one image onto another — with the mask to show it
- background_image
- layer_image
- layer_mask
- image
- mask
Putting one image on top of another sounds like a two-second job, and in ComfyUI it's a four-node chain of resize, position, rotate, and blend - every step its own node, every step another place for the graph to disagree about dimensions. ImageBlendResize collapses the whole thing into one node: feed it a background and a layer, tell it how to fit, where to put it, how much to rotate, and which blend mode to use, and it returns the composited image plus the mask of exactly where the layer landed. That mask output is the sleeper feature - it's what lets you chain a second operation or a blur onto the pasted region without re-deriving its location.
How it works
The layer is resized per resize_mode, positioned, and rotated, then blended onto the background with your blend_mode at opacity. Positioning uses percentages (x_pos/y_pos, 0–100) rather than pixels, which is friendlier when you're swapping in different-sized backgrounds. The four resize modes are:
- contain - fit the whole layer inside, preserving aspect.
- cover - fill the background with the layer, cropping overflow (classic "fill the screen" behavior).
- fix_width / fix_height - lock one dimension to
fixed_width/fixed_heightand scale the other freely.
If the layer has an alpha channel, that becomes its mask automatically; if you pass a layer_mask explicitly it's used instead (with invert_mask to flip it). Batches work - it steps through background/layer/mask pairs and repeats the last of any that runs short.
The inputs that matter
- background_image / layer_image - the base and the overlay.
- resize_mode -
contain,cover,fix_width,fix_height; the single most important choice, since it decides whether the layer is cropped or letterboxed. - x_pos / y_pos - placement as percentages (50 = center).
- scale - extra scaling on top, 1–400%.
- rotation - ±180°.
- blend_mode / opacity - 16 modes; opacity 0–100.
- layer_mask / invert_mask / fixed_width / fixed_height - optional refinements.
Outputs are image and mask (the pasted region, ready for downstream compositing or masking).
Where you'd use it
Watermarks and logos are the obvious case - place, scale to taste, screen or overlay blend so it sits in the image instead of on it. Textures on surfaces, vignettes, and stylized frames all work the same way. And because it hands back the placement mask, you can do "paste the thing, then blur exactly the thing" or feed the mask into an inpaint to keep the pasted region consistent with the scene. It's a workhorse - the WAS-Node-Suite-style utility that just lives in your toolbox.
Installing it
Part of ComfyUI-YCNodes. ComfyUI Manager → search ComfyUI-YCNodes → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/yichengup/ComfyUI-YCNodes
Restart, then look under YCNode/Image. Uses PIL (Image.LANCZOS resizing) - covered by the pack's standard dependencies.
Gotchas
The percentage positioning is relative to the available space, so with contain a small image placed at 50,50 lands centered in the canvas, but with cover the math feels different because the layer is being cropped - expect to re-tune x/y when you switch resize modes. Rotation expands the layer's bounding box before placement, so a 45°-rotated layer can visually overflow its fix_width/fix_height slot; that's normal, just don't panic-blend at the edges. And remember the mask output is the pasted footprint - it does not include the background, so if you want "everything except the layer" you'll invert it yourself.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| background_image | IMAGE | — | |
| layer_image | IMAGE | — | |
| blend_mode | COMBO | 16 options: normal, multiply, screen, overlay, soft_light, hard_light, +10 | |
| resize_mode | COMBO | 4 options: contain, cover, fix_width, fix_height | |
| scale | FLOAT | 100.01–400 | — |
| x_pos | FLOAT | 50.00–100 | — |
| y_pos | FLOAT | 50.00–100 | — |
| rotation | FLOAT | 0.0-180–180 | — |
| opacity | INT | 1000–100 | — |
| invert_mask | BOOLEAN | false | — |
| layer_maskopt | MASK | — | |
| fixed_widthopt | INT | 5121–4096 | — |
| fixed_heightopt | INT | 5121–4096 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |