Nodes/ComfyUI-LTXVideo/πŸ…›πŸ…£πŸ…§ LTX Laplacian Pyramid Blend
ComfyUI Node Runs on cloud

πŸ…›πŸ…£πŸ…§ LTX Laplacian Pyramid Blend

Seamless masked image blends with no visible seam

By LightricksΒ·Created 2 years agoΒ·Updated about a month agoΒ· 3,956
πŸ…›πŸ…£πŸ…§ LTX Laplacian Pyramid Blend
  • image_a
  • image_b
  • mask
  • image
β—„trim_to_shortesttrueβ–Ί
β—„mask_low_res_dilation5β–Ί

If you've ever composited two images with a plain mask and gotten that ugly hard line where they meet, this is the fix. LTXVLaplacianPyramidBlend merges image_a and image_b through a mask using multi-band (Laplacian pyramid) blending, so the transition is genuinely seamless instead of a feathered-but-still-obvious edge. It's a utility node - nothing LTX-specific about the math - but it's a real one to keep in your back pocket for stitching, region replacement, and cleaning up upscale seams.

The reason it beats a normal masked composite is what it does with frequencies. A regular alpha blend mixes everything at the mask edge equally, which is why sharp textures ghost and lighting doesn't quite match. Laplacian blending splits both images into a stack of frequency bands, blends the low frequencies (broad color and lighting) over a wide, soft region and the high frequencies (fine detail, edges) only right at the seam, then reassembles. The result: color and light flow across the boundary while detail stays crisp. It's the classic Burt-Adelson trick, and it's still the gold standard for "make this join invisible."

How it works

You give it two images and a mask that says where each one wins. The node builds Gaussian pyramids of the mask and Laplacian pyramids of both images, blends band by band, and collapses the pyramid back to a single picture. Because each frequency band is blended at its own scale, low-frequency mismatches get smoothed over a large area while edges don't smear.

The inputs and outputs that matter

Five inputs, and the first three are the whole job:

  • image_a and image_b (IMAGE) - the two pictures to merge. Where the mask is white you get one, where it's black you get the other.
  • mask (MASK) - the blend region. A soft-edged mask gives you the most control over where the hand-off happens.
  • trim_to_shortest (BOOLEAN, default true) - if your inputs are batches of different lengths, this trims to the shorter one so the shapes line up instead of erroring.
  • mask_low_res_dilation (INT, default 5, range 0–15) - how much the mask gets expanded at the coarse pyramid levels. Nudge it up if low-frequency color bleeds across the seam; drop it toward 0 for a tighter blend.

Output is a single image - the blended result, ready to save or feed downstream.

How to install it

Grab the pack through ComfyUI Manager (Ctrl+M β†’ Install Custom Nodes β†’ search LTXVideo β†’ Install β†’ restart), which is what the README recommends. Or clone it manually:

cd ComfyUI/custom_nodes
git clone https://github.com/Lightricks/ComfyUI-LTXVideo

and restart. The node lives under the LTXVideo β†’ utility menu. This node has no model dependency of its own and runs fine regardless of your GPU - it's the surrounding LTX-2 video model that wants 32GB+ VRAM and 100GB+ disk, not this.

Common issues & troubleshooting

Shape mismatch errors. The two images (and the mask) need compatible dimensions. If you're blending batches of different frame counts, leave trim_to_shortest on. If a single-image and a batch collide, resize or repeat upstream so the counts agree.

Faint halo or color bleed at the boundary. That's the low-frequency band reaching too far. Lower mask_low_res_dilation. Conversely, if the seam still reads as a line, a slightly larger dilation plus a softer mask edge usually erases it.

It's not doing anything special versus a normal composite. Make sure your mask actually has a gradient region. With a perfectly hard 0/1 mask and a tiny dilation you're basically forcing a hard cut and throwing away the benefit - the whole point is a soft hand-off, so give it some room to work.

CategoryLightricks/utility

Inputs (5)

NameTypeDefaultDescription
image_aIMAGEFirst source image.
image_bIMAGESecond source image.
maskMASKBlend mask (white = image_a, black = image_b).
trim_to_shortestBOOLEANtrueTrim image_a, image_b, and mask to the shortest sequence length before blending.
mask_low_res_dilationINT50–15Downscale the mask to long side 64, dilate it spatially, then resize it back before blending.

Outputs (1)

NameTypeDescription
imageIMAGEβ€”