ComfyUI Node

Image Blend

A mini Photoshop comp that lives inside ComfyUI

By wenchengxiang·Created about a month ago·Updated a day ago· 1
Image Blend
  • background_image
  • layer_image
  • layer_mask
  • image
  • mask
x_percent50.00
y_percent50.00
scale1.00
rotate0.0
opacity100
transform_method

This is the node in the pack that actually feels like a tool rather than plumbing. Image Blend is a small compositor: take a background image, take a layer image, position the layer over the background, scale it, rotate it, fade it, and get a composited image plus the mask it used. It's the "put the logo on the render" node, the "composite the subject into the scene" node, and the "I need a watermark and I refuse to open GIMP" node.

The mechanics are worth understanding because they explain every input. Positions are given as percentages, not pixels: x_percent and y_percent default to 50, meaning the layer's center lands at the canvas center - so 50/50 always centers, regardless of how big either image is. scale multiplies the layer size (1 = as-is), rotate spins it in degrees (and expands the layer's canvas to fit, so it won't clip at 45°), and opacity fades it from 100 down to 0. The transform_method dropdown (lanczos, bicubic, hamming, bilinear, box, nearest) picks the resampling quality for that scale/rotate step - lanczos is the default and the one to leave alone unless you have a reason.

The optional layer_mask is the interesting one. Without it, the node uses the layer's own alpha channel if it's RGBA, or treats the layer as fully opaque. With it, the mask defines where the layer actually shows. The node outputs both the composited image and the mask it built, so you can reuse that mask downstream - for a follow-up edit or to know exactly which pixels changed. It also loops over batches, so it'll blend a batch of backgrounds against a batch of layers pairwise.

Inputs and outputs that matter

  • background_image, layer_image - the two images to composite.
  • x_percent / y_percent, scale, rotate, opacity - position, size, spin, and fade of the layer.
  • layer_mask (optional) - where the layer shows; defaults to the layer's alpha or full opacity.
  • image (out) - the composite. mask (out) - the mask it used, ready to wire elsewhere.

Installing it

Part of wenchengxiang/ComfyUI-Practical-Tools. ComfyUI Manager → Custom Nodes Manager → search "ComfyUI-Practical-Tools" → Install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/wenchengxiang/ComfyUI-Practical-Tools

then restart. No pip dependencies, no model downloads - pure Python on PIL and torch, both already in ComfyUI.

Issues and gotchas

Where people get burned: forgetting that position is center-based percentages - a x_percent of 0 parks the layer's left edge at the canvas center, not at the left edge. And the composite is a hard paste governed by the mask; there's no blur/feather built in, so a sharp mask edge will look pasted unless you blur it first. If your layer comes out full-strength when you expected it faded, check that you actually set opacity (default is 100). For a quick logo-over-image job this is the node you'll reach for; for serious feathered compositing you'll want a dedicated mask-blur step feeding the layer_mask input.

CategoryPractical-Tools/Image

Inputs (9)

NameTypeDefaultDescription
background_imageIMAGE
layer_imageIMAGE
x_percentFLOAT50.00-999–999
y_percentFLOAT50.00-999–999
scaleFLOAT1.000.01–100
rotateFLOAT0.0-360–360
opacityINT1000–100
transform_methodCOMBO6 options: lanczos, bicubic, hamming, bilinear, box, nearest
layer_maskoptMASK

Outputs (2)

NameTypeDescription
imageIMAGE
maskMASK