Extensions/comfyui-scalar-mask-blend
ComfyUI Extension

comfyui-scalar-mask-blend

A lightweight ComfyUI custom node for blending two image batches using a per-frame scalar mask without requiring full resolution mask upscaling.

By Notimefornuts·Created 4 months ago·Updated 3 months ago· 0
Notimefornuts/comfyui-scalar-mask-blend
Nodes1
On cloudLocal install
Categoryvideo
Stars0
Updated3 months ago
Readme

ComfyUI Scalar Mask Blend

A lightweight ComfyUI custom node for blending two image batches using a per-frame scalar mask.

This node is useful when you have a 1x1 mask per frame and do not want to upscale it to full resolution, which can consume a large amount of VRAM.

Node

ScalarMaskBlend

Inputs:

| Input | Type | Description | |---|---|---| | a | IMAGE | First image batch, usually LatentSync output | | b | IMAGE | Second image batch, usually original video frames | | mask | MASK | Per-frame mask. Can be 1x1 or any size. The node uses the mean value of each frame as scalar weight |

Output:

| Output | Type | Description | |---|---|---| | IMAGE | IMAGE | Blended image batch |

Blend formula:

output = a * (1 - w) + b * w