MX_Blend
18 compositing modes for fusing two images the way Photoshop does
- image1
- image2
- IMAGE
MX_Blend is the two-image compositing workhorse of the MX pack. It takes two images, runs them through one of 18 blend modes (multiply, screen, overlay, soft light, color dodge, difference - the full Photoshop-style list), and lets you fade the result in with a blend_factor. If you've ever wanted to composite a texture onto a render, mix a lighting pass into a base image, or just experiment with "what if these two images were multiplied," this is the node.
It's part of Intersection98/ComfyUI-MX-post-processing-nodes, and it's the more capable cousin of the pack's MX_AlphaBlend - that one is mask-driven compositing, this one is mode-driven compositing. Different jobs, same neighborhood.
How it works
The math is straightforward and per-pixel: for your chosen mode it applies the standard formula to image1 and image2 (multiply is a*b, screen is 1-(1-a)*(1-b), color dodge is a/(1-b), difference is abs(a-b), and so on). Then it blends the result with image1 by the factor: image1 * (1-factor) + blended * factor, clamped to 0–1. So blend_factor isn't opacity of image2 - it's how far you slide between the original and the mode result. That's worth internalizing: with multiply at factor 1.0 you get pure multiply, at 0.5 you get half-multiplied.
One genuinely nice touch: if image1 and image2 have different dimensions, the node center-crops and resizes image2 to match image1 automatically. No manual resize node needed for the common case.
The inputs that matter
image1- the base image. Its dimensions win if they mismatch.image2- the layer being applied. Auto-fit toimage1.blend_mode- the full list:normal,multiply,screen,overlay,soft_light,hard_light,darken,lighten,color_dodge,color_burn,linear_dodge,linear_burn,linear_light,vivid_light,pin_light,difference,exclusion,divide. Overlay is the usual texture-composite winner;soft_lightis gentler;differenceis great for finding what changed between two frames.blend_factor-0to1, default0.5. The dial between original and mode result.
Output is a single IMAGE matching image1's shape.
Install
Standard MX pack install. ComfyUI Manager (search MX or ComfyUI-MX-post-processing-nodes), or:
cd ComfyUI/custom_nodes
git clone https://github.com/Intersection98/ComfyUI_MX_post_processing-nodes
cd ComfyUI_MX_post_processing-nodes
pip install -r requirements.txt
Restart ComfyUI. The node appears under postprocessing/Blends. No models or downloads - just the usual numpy/torch stack plus opencv-python (the pack's other nonstandard dependency, color-matcher, is only used by MX_ColorMatch, so it's not required here).
Where people get burned
The "blend factor is not opacity" confusion is the classic one - people expect factor 0.5 to make image2 half-transparent, and instead they get half of the blend formula. If you want an actual opacity crossfade, that's MX_AlphaBlend with a white mask, not this node. Second gotcha: some modes clip hard. color_dodge, linear_dodge, and divide blow out to pure white fast, and there's no per-channel tolerance to rescue you - if your composite is blown, that's the mode's personality, so back off the factor or switch modes. Everything runs on the CPU-side torch ops here, which is fast enough for single images and fine for re-running while you dial in a look.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image1 | IMAGE | — | |
| image2 | IMAGE | — | |
| blend_factor | FLOAT | 0.500–1 | — |
| blend_mode | COMBO | 18 options: normal, multiply, screen, overlay, soft_light, hard_light, +12 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |