ComfyUI Node Runs on cloud

IMG_blender

Crossfade two images with one slider β€” simple, batch-friendly blending

By edenartlabΒ·Created 3 years agoΒ·Updated 6 months agoΒ· 119
IMG_blender
  • image1
  • image2
  • IMAGE
β—„image1_weight0.50β–Ί

IMG_blender is the "mix these two images" node, and it does exactly what the name says: takes image1 and image2, blends them by a weight, and returns the result. One slider, two images, done. It's the kind of node you don't think about until you realize you've been doing crossfades and before/after composites by hand.

It's part of eden_comfy_pipelines, Eden.art's 70+ node suite, filed under Eden 🌱/Image.

The three things you set

  • image1 - the first image.
  • image2 - the second image.
  • image1_weight - 0 to 1, default 0.5. This is the fraction of image1 in the output: 0 gives you pure image2, 1 gives you pure image1, 0.5 is a perfect 50/50 crossfade.

One output, IMAGE, the blended result.

The math and the details

It's a per-pixel weighted average: result = image1 * weight + image2 * (1 - weight). Nothing exotic, which is exactly right for a node whose whole job is predictability.

Two behaviors matter. First, size handling: if the two images have different dimensions, it crops both down to the smaller one's size before blending - no stretching, no padding, just center-crop-to-fit. That saves you from a class of dimension-mismatch errors, but it also means you silently lose the edges of the larger image, so if exact framing matters, normalize sizes upstream. Second, batch handling: both images must have the same batch size or it raises an error. If you feed it two single images it's a no-brainer; if you're blending frame stacks, they have to be equal-length stacks.

Where you'll actually use it

  • Crossfading between two looks - blending a base render with a style-transferred version to find the sweet spot.
  • IP-adapter image mixing - IP-Adapter pipelines often want a blended reference image, and this gives you a single weight to dial it in.
  • Before/after and comparison work - wire the two images, sweep the weight, and you've got an instant morph.
  • Animation keyframing - blend two keyframes with a changing weight over a sequence to build transition frames.

The honest note: the image1_weight is a widget, so animating it over time means driving it from another node or manually stepping it per frame. If you need per-frame weight control across a video, the pack's KeyframeBlender is the purpose-built tool for that; this node is for the simple case.

Installing it

Standard pack install - ComfyUI Manager (search "eden"), or:

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

Restart ComfyUI. Pure tensor arithmetic - no models, no downloads, runs on whatever device your images live on. It's a tiny node with a clear job, and it does it without fuss.

CategoryEden 🌱/Image

Inputs (3)

NameTypeDefaultDescription
image1IMAGEβ€”
image2IMAGEβ€”
image1_weightFLOAT0.500–1β€”

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”