Nodes/ComfyUI Layer Style/LayerUtility: ImageOpacity
ComfyUI Node Runs on cloud

LayerUtility: ImageOpacity

Image Opacity (Layer Style)

By chflame163·Created 3 years ago·Updated 4 days ago· 3,113
LayerUtility: ImageOpacity
  • image
  • mask
  • image
  • mask
â—„opacity100â–º
â—„invert_masktrueâ–º

Image Opacity does the Photoshop layer-opacity slider: it makes an image partially transparent so you can fade it over whatever's behind it. Drop a watermark on at 30%, ghost a texture over a photo, blend two layers at half strength - anywhere you'd reach for the opacity control in an image editor, this is the ComfyUI equivalent. It's a small node, but layered compositing lives and dies on being able to dial a layer's strength, and this is that dial.

Mechanically it sets the image's alpha to the opacity you choose. Give it a mask and the fade only applies where the mask allows, so you can make part of an image transparent while leaving the rest solid - a gradient watermark, a feathered blend, a selective ghost.

Three inputs, and two of them are the ones you touch:

  • opacity - 0 to 100, where 100 is fully opaque and 0 is invisible. This is the main control.
  • mask (optional) - restrict the opacity change to the masked region instead of the whole image. No mask means the whole picture gets the opacity uniformly.
  • invert_mask - flips which side of the mask the effect applies to. If the wrong region ends up transparent, this is the toggle to flip.

Outputs are the image (now carrying the applied opacity/alpha) and the mask. Wire the image into a composite or blend node to stack it over a background - this node produces the see-through layer; a composite node does the actual stacking.

Typical uses: watermarking (Text Image → Image Opacity at ~40% → composite over your render), softly overlaying a texture or grain, or fading between two versions of an image. Combined with a mask it does gradient transparency, which is how you get a watermark that fades toward an edge or a layer that dissolves across the frame.

A couple of practical notes. Opacity here means alpha, so the result is meant to be composited over something - view it on its own and a semi-transparent image may just look dimmer against whatever your viewer shows behind it. And mind invert_mask: the pack defaults it on, so if a masked fade hits the opposite region from what you intended, flip it first before second-guessing the mask itself.

Install is via the ComfyUI Layer Style pack, which is where this node ships. ComfyUI Manager: search "ComfyUI Layer Style," install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/chflame163/ComfyUI_LayerStyle, then pip install -r requirements.txt in the ComfyUI environment and restart. No model.

The failure you're most likely to see is the pack-level one shared by every node here: Layer Style is large and dependency-heavy, and its most common problem is the whole pack showing "import failed" in the Manager (usually a transformers version clash), which makes every node it contains - Image Opacity included - vanish from your menu at once. If it's missing, that's why: reinstall the pack, use the Manager's "Try Fix," and reinstall the requirements into ComfyUI's real Python environment if it doesn't clear.

Category😺dzNodes/LayerUtility

Inputs (4)

NameTypeDefaultDescription
imageIMAGE—
opacityINT1000–100—
invert_maskBOOLEANtrue—
maskoptMASK—

Outputs (2)

NameTypeDescription
imageIMAGE—
maskMASK—