Nodes/ComfyUI Layer Style/LayerUtility: ImageBlendAdvance V2
ComfyUI Node Runs on cloud

LayerUtility: ImageBlendAdvance V2

ImageBlendAdvance V2 — composite with position, scale, rotate and 30 blend modes

By chflame163·Created 3 years ago·Updated 8 days ago· 3,118
LayerUtility: ImageBlendAdvance V2
  • background_image
  • layer_image
  • layer_mask
  • image
  • mask
â—„invert_masktrueâ–º
◄blend_mode▾►
â—„opacity100â–º
â—„x_percent50.00â–º
â—„y_percent50.00â–º
◄mirror▾►
â—„scale1.00â–º
â—„aspect_ratio1.00â–º
â—„rotate0.00â–º
◄transform_method▾►
â—„anti_aliasing0â–º

This is ImageBlend with a full transform stage bolted on. Instead of "the layer has to already be aligned," you get to place it, scale it, rotate it, mirror it, and pick from the whole Photoshop blend-mode set - all in the same node that does the merge. When you're dropping a smaller foreground onto a bigger background and it needs to land in a specific spot at a specific size, this is the one.

It's the node you actually reach for in most composites. Cutout onto a scene, logo onto a mockup, character onto a plate - anything where the top layer isn't already the right size and position. The V2 is the current iteration and it returns a mask alongside the image, which the plain ImageBlend doesn't.

How it works

You position the layer by percentage of the canvas, not pixels: x_percent and y_percent place the layer's center, where 50/50 is dead center. You can go past 0 or 100 to slide it partly off-frame. The node scales and rotates the layer, resamples it with your chosen filter, blends it onto the background using the selected mode and opacity, and clips to the optional mask. Then it hands back both the composite and the resulting mask so you can keep working the layer's shape downstream.

The inputs and outputs that matter

  • x_percent / y_percent (default 50/50) - where the layer's center sits, as a percentage of the canvas. This is the placement control, and it's the thing people miss: it's percent, not pixels.
  • scale and aspect_ratio - resize the layer. scale is uniform; aspect_ratio stretches it.
  • rotate, mirror (None / horizontal / vertical) - orientation.
  • blend_mode - the full 30-mode set (normal, dissolve, multiply, color burn, linear dodge(add), and on down), built on a proper blend-modes library.
  • transform_method - lanczos for clean scaling, nearest for hard pixels.
  • opacity, invert_mask (default true), optional layer_mask.

Outputs: the composited image and a mask.

How to install it

It's in the LayerStyle pack. ComfyUI Manager → search LayerStyle → install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_LayerStyle
pip install -r ComfyUI_LayerStyle/requirements.txt

then restart. Under 😺dzNodes → LayerUtility. No model download, but let the pack's dependency install finish.

Common issues & troubleshooting

The layer jumps to the middle. x_percent/y_percent default to 50/50 (center). If you expected top-left-pixel placement like the basic node, that's the difference - set the percentages for where you actually want the center.

Scaling looks soft or crunchy. That's transform_method. Use lanczos or bicubic for photographic layers; only use nearest if you genuinely want hard pixel edges. Bump anti_aliasing if edges look jagged after rotation.

Mask is backwards. invert_mask - the LayerStyle polarity thing. Flip it.

Node's missing entirely. The pack failed to import. LayerStyle's usual culprit is a broken transformers install (a stray TensorFlow is the classic), which drops the whole pack on load. Read the traceback, "Try Fix" in Manager, or repair the offending dependency.

Category😺dzNodes/LayerUtility

Inputs (14)

NameTypeDefaultDescription
background_imageIMAGE—
layer_imageIMAGE—
invert_maskBOOLEANtrue—
blend_modeCOMBO30 options: normal, dissolve, darken, multiply, color burn, linear burn, +24
opacityINT1000–100—
x_percentFLOAT50.00-999–999—
y_percentFLOAT50.00-999–999—
mirrorCOMBO3 options: None, horizontal, vertical
scaleFLOAT1.000.01–100—
aspect_ratioFLOAT1.000.01–100—
rotateFLOAT0.00-999999–999999—
transform_methodCOMBO6 options: lanczos, bicubic, hamming, bilinear, box, nearest
anti_aliasingINT00–16—
layer_maskoptMASK—

Outputs (2)

NameTypeDescription
imageIMAGE—
maskMASK—