Nodes/ComfyUI-RMBG/Image Combiner (RMBG) 🖼️
ComfyUI Node Runs on cloud

Image Combiner (RMBG) 🖼️

Paste a cutout onto a background, with blend modes

By 1038lab·Created 2 years ago·Updated 8 days ago· 2,051
Image Combiner (RMBG) 🖼️
  • foreground
  • background
  • foreground_mask
  • IMAGE
  • WIDTH
  • HEIGHT
modenormal
foreground_opacity1.00
foreground_scale1.00
position_x50
position_y50

This is the "now stick the two together" node. You've cut a subject out with a background remover, you've got a new backdrop, and you need to drop the first onto the second at the right size and place. Image Combiner does exactly that, and nothing more - it's the compositing step at the end of a product-photo or character workflow, not a magic tool.

If you've ever done the cut-out-then-composite dance, you already know the shape of it: BiRefNet or rembg extracts the subject with a clean alpha, then you place it into a generated scene. Image Combiner is the placement half. It's deliberately dumb and fast, which is the right call - the hard part (the mask) happened upstream.

What it does

You feed it a foreground image and a background image. It scales the foreground, positions it, blends it, and hands you back one flattened image plus the final width and height. That's the whole node. The one thing that makes it more than a paste is the optional foreground_mask input: connect the MASK from your background remover and only the masked region composites, so the background shows through everywhere else. Without a mask it treats the whole foreground as opaque (respecting its alpha if it has one).

The inputs that actually matter

  • foreground_mask (optional MASK) - the important one. This is where the alpha from your RMBG node goes. Skip it and you're pasting a full rectangle; connect it and you get a real cutout composite.
  • foreground_scale (0.1–5.0) and position_x / position_y (0–100) - size and place. Position is a percentage, so 50/50 is dead center, 0/0 is top-left. Intuitive once you stop thinking in pixels.
  • mode - the blend mode: normal, multiply, screen, overlay, add, subtract. For a straight composite, leave it on normal. The others are for effects - multiply for shadows, screen for glows, that kind of thing. Most of the time you want normal.
  • foreground_opacity (0–1) - fade the foreground. Handy for watermarks or ghosted overlays, otherwise leave it at 1.

Outputs are IMAGE, WIDTH, and HEIGHT. The width/height ints are convenient to wire into a downstream resize or save node so everything stays in sync.

How to install it

It ships in the ComfyUI-RMBG pack, so you get it alongside the background removers and mask tools.

  • ComfyUI Manager: search Comfyui-RMBG, install, restart.
  • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/1038lab/ComfyUI-RMBG, then install the requirements (./ComfyUI/python_embeded/python -m pip install -r requirements.txt) and restart.

This particular node is a pure tensor operation - no model download, no heavy weights. It's ready the moment the pack loads. One thing worth knowing about the pack as a whole: it's GPL-3.0, which matters only if you're distributing a commercial product built around it. For personal and workflow use, ignore it.

Where people get tripped up

The number-one mistake is forgetting the mask. If your composite looks like a hard rectangle glued onto the scene, you didn't connect foreground_mask - Image Combiner has no idea which pixels are "subject" unless the mask or a real alpha channel tells it.

The second is expecting it to relight. It won't. A cutout dropped onto a new background looks pasted-on until the lighting matches, and Image Combiner does zero lighting work - that's what IC-Light is for, one step later in the pipeline. Combine here, relight after, and the seam disappears. Combine and stop, and you've got the classic "sticker on a photo" look that no blend mode fixes.

Category🧪AILab/🖼️IMAGE

Inputs (8)

NameTypeDefaultDescription
foregroundIMAGE
backgroundIMAGE
modeCOMBOnormal6 options: normal, multiply, screen, overlay, add, subtract
foreground_opacityFLOAT1.000–1
foreground_scaleFLOAT1.000.1–5
position_xINT500–100
position_yINT500–100
foreground_maskoptMASK

Outputs (3)

NameTypeDescription
IMAGEIMAGE
WIDTHINT
HEIGHTINT