ComfyUI Node

Image Mix

Blend two images together

By jamesWalker55·Created 3 years ago·Updated about a year ago· 215
Image Mix
  • image_a
  • image_b
  • IMAGE
blend_typemix
factor0.50

Two images in, one blended image out. This node combines image_a and image_b using a blend mode and a strength factor - a crossfade, essentially, or a multiply layer if you want one. It's the ComfyUI equivalent of dropping one layer on top of another in Photoshop and sliding the opacity.

You'd use it to composite: overlay a texture or gradient onto a render, crossfade between two generations to find a midpoint, blend an original and a processed version to dial back the strength of an effect (do the effect at full strength, then mix it back toward the original at, say, 60%). It's a small, general-purpose blender, and once you have it you find uses for it constantly.

How it works

For the mix blend type it does a straight linear interpolation between the two images, weighted by the factor - a weighted average, pixel for pixel. For multiply it multiplies the two images together, which darkens and is the classic "multiply layer" look, again scaled by the factor.

Inputs and outputs

  • blend_type - mix (linear crossfade) or multiply (multiply blend). mix is what you want for a plain fade between two images; multiply for darkening or laying one image's tones over another.
  • factor - a float from 0 to 1, default 0.5. Think of it as the blend weight: at 0 you're essentially left with image_a, at 1 you get the full effect of image_b, and 0.5 is an even split.
  • image_a and image_b - the two images to combine.

Output is the blended IMAGE.

Installing it

It's in the pack's comfyui_color_ops file. Install via ComfyUI Manager (search Various ComfyUI Nodes by Type / comfyui-various) or clone:

cd ComfyUI/custom_nodes
git clone https://github.com/jamesWalker55/comfyui-various

Restart ComfyUI. No models, no extra Python packages.

Common issues

The classic failure is a size mismatch. To blend two images pixel-for-pixel they have to be the same dimensions - different sizes will error out. If image_a and image_b don't match, resize one to the other first (the pack's own resize nodes, or read one image's width and height and feed them into a resize on the other).

Second, be clear about which blend you want. mix is a fade - the result is never darker or lighter than a weighted average of the inputs. multiply always darkens, because multiplying two values below 1 gives something smaller. If your blend is coming out muddier than expected, you probably left it on multiply when you wanted mix.

And the factor is a 0-to-1 weight, not a percentage you type as 50 - 0.5 is half, not 50. Small point, but an easy slip if you're used to opacity sliders that run 0–100.

If the node comes up red as missing in a shared workflow, the pack isn't installed yet - Manager's "Install Missing Custom Nodes" or a clone of the repo above fixes it.

CategoryjamesWalker55

Inputs (4)

NameTypeDefaultDescription
blend_typeCOMBOmix2 options: mix, multiply
factorFLOAT0.500–1
image_aIMAGE
image_bIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE