LayerUtility: ImageBlendAdvance
ImageBlendAdvance — composite a layer with full position, scale and rotate control
- background_image
- layer_image
- layer_mask
- image
- mask
This is the compositing workhorse of the Layer Style pack. ImageBlendAdvance places one image (a layer) over another (a background) and gives you the full transform kit - position, scale, rotation, mirror, aspect ratio, blend mode, opacity - plus a mask input so it respects a cutout. If you've removed a subject's background and now need to drop it onto a scene exactly where you want it, at the right size and angle, this is the node that does it in one shot.
How it works
It's a layer composite with a transform baked in. The layer image gets positioned, scaled, rotated, and optionally mirrored, then blended onto the background according to the blend mode and opacity, with the mask deciding which parts of the layer actually show. Position is expressed as a percentage of the frame, so the placement is resolution-independent - 50/50 is centered regardless of image size.
The inputs that matter
background_imageandlayer_image- the scene and the thing you're placing on it.layer_mask(optional MASK) +invert_mask- the layer's cutout shape. Toggleinvert_maskif the wrong region shows through.x_percent/y_percent(default 50/50) - where the layer's center sits, as a percent of the background. This is your main positioning control.scale(default 1.0) - resize the layer.aspect_ratio(default 1.0) stretches it non-uniformly if you need to.rotate(default 0) - rotation in degrees.mirrorflips it horizontal or vertical.blend_mode- 19 Photoshop-style modes (normalfor a straight paste, plusmultiply,screen, and the rest - note the enum'smultplytypo is the node's, not a mistake here).opacity(default 100) - layer transparency.transform_method(resampler,lanczosdefault) andanti_aliasing- edge quality of the transformed layer.
Outputs are image (the composite) and mask (the layer's mask after the same transform, so you can chain further).
How to install it
ComfyUI Manager: search ComfyUI Layer Style, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_LayerStyle
install requirements.txt, restart. It's under 😺dzNodes → LayerUtility.
Common issues
The most frequent one is the layer showing up inverted or with the wrong part cut out - that's invert_mask, flip it. Second: the layer lands off-center or off-screen. Remember x_percent/y_percent position the layer's center as a percent of the background, so 0/0 puts the center in the top-left corner (half the layer off-frame). If a hard-edged transformed layer looks jagged, bump anti_aliasing and keep transform_method on lanczos. The natural pairing is a cutout node upstream - run RmBgUltra V2 or a Segformer mask to isolate the subject, then feed the image and its mask straight into this node to place it on a new background. For a shadow behind that placed layer, DropShadow from the same pack picks up where this leaves off.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| background_image | IMAGE | — | |
| layer_image | IMAGE | — | |
| invert_mask | BOOLEAN | true | — |
| blend_mode | COMBO | 19 options: normal, multply, screen, add, subtract, difference, +13 | |
| opacity | INT | 1000–100 | — |
| x_percent | FLOAT | 50.00-999–999 | — |
| y_percent | FLOAT | 50.00-999–999 | — |
| mirror | COMBO | 3 options: None, horizontal, vertical | |
| scale | FLOAT | 1.000.01–100 | — |
| aspect_ratio | FLOAT | 1.000.01–100 | — |
| rotate | FLOAT | 0.00-999999–999999 | — |
| transform_method | COMBO | 6 options: lanczos, bicubic, hamming, bilinear, box, nearest | |
| anti_aliasing | INT | 00–16 | — |
| layer_maskopt | MASK | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |