AE Alpha Over RGBA
Stack RGBA layers like a Photoshop layer panel, and keep the alpha
- background
- foreground
- rgba
AE Alpha Over RGBA is the compositor at the end of the transparent-pipeline in ComfyUI-GiftHelperSuite. You hand it two RGBA layers - say, a background and a particle glow - and it stacks them like layers in Photoshop or After Effects: a blend mode, per-layer opacity, and proper alpha compositing. Crucially, what comes out is another RGBA image, so you can chain one of these after another and keep stacking effects without ever flattening the transparency. For livestream overlay and gift-animation work where you're assembling five translucent layers, that's the whole game.
The "Alpha Over" name is the giveaway - it's source-over compositing: the foreground is drawn on top, and its alpha decides how much of it replaces the background, with the union of the two alphas surviving in the output.
How it works
Internally it does the standard thing, in a slightly fancier order. Both inputs are normalized to RGBA (a plain RGB image just gets an opaque alpha). The foreground can be resized to the background's size. Then the RGB channels are blended using your selected blend mode - one of 16 Photoshop-style formulas, from multiply, screen, and overlay through color_dodge, linear_dodge_add, subtract, and divide. The blended color is then composited with opacity and the alphas are merged source-over. Non-normal blend modes are handled with a subtlety worth respecting: they only affect pixels where the background is actually opaque, so a multiply-blended glow doesn't darken your background through its transparent holes.
The part that takes a second to get: the two rgb mode dropdowns. foreground_rgb_mode defaults to premultiply_by_alpha_ps_like, which weights the foreground color by its alpha before blending. That sounds redundant, but it exists for a specific reason - the low-alpha, high-RGB haze you get out of an UnMult glow layer (the AEUnmultRGBA node in the same pack) will wash out your solid subject under plain straight-alpha stacking. This mode kills that wash. output_rgb_mode defaults to premultiplied too, which matches how PS/AE previews look and stops those same pixels from appearing dirty-bright in ComfyUI previews and exports.
The inputs that matter
background/foreground- IMAGE in, RGB or RGBA.blend_mode- the 16-mode dropdown.normalfor plain stacking,screen/addfor light effects over a backdrop.foreground_opacity/background_opacity- 0–1 sliders, exactly the layer-opacity you'd expect.resize_foreground_to_background-none,bilinear, ornearest. Set this tobilinearunless your two inputs are already the same resolution, becausenonewith mismatched sizes throws an error.foreground_rgb_mode/output_rgb_mode- leave on the defaults until you have a reason not to; they're the PS-compatibility shims described above.
Output is rgba, a single RGBA IMAGE you can feed straight into a Preview node, a VAE encode, or the next AEAlphaOverRGBA in the chain.
Typical chain
black-background glow
↓
AEUnmultRGBA (remove black → alpha)
↓
AEAlphaOverRGBA (stack with other layers)
↓
final RGBA out
Install
This node lives in lingziwyh/ComfyUI-GiftHelperSuite - a lightweight, pure-torch pack with no requirements.txt and no model downloads. Install via ComfyUI Manager (search ComfyUI-GiftHelperSuite) or:
cd ComfyUI/custom_nodes
git clone https://github.com/lingziwyh/ComfyUI-GiftHelperSuite
then restart ComfyUI. One real gotcha, straight from the README: if you previously installed the standalone ComfyUI_Unmult_AE package, delete it - otherwise the duplicate node names fight over registration and ComfyUI may refuse to load both.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| background | IMAGE | — | |
| foreground | IMAGE | — | |
| blend_mode | COMBO | normal | 16 options: normal, multiply, screen, overlay, soft_light, hard_light, +10 |
| foreground_opacity | FLOAT | 1.000–1 | — |
| background_opacity | FLOAT | 1.000–1 | — |
| resize_foreground_to_background | COMBO | none | 3 options: none, bilinear, nearest |
| foreground_rgb_mode | COMBO | premultiply_by_alpha_ps_like | 2 options: premultiply_by_alpha_ps_like, straight_rgb_standard |
| output_rgb_mode | COMBO | premultiplied_rgb_ps_like | 2 options: premultiplied_rgb_ps_like, straight_alpha_standard |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| rgba | IMAGE | — |