Nodes/ComfyUI-WaterMark-Detector/Combine Enhancements
ComfyUI Node

Combine Enhancements

Blend up to three enhancement layers back onto the original

By hotpizzatactics·Created 2 years ago·Updated 2 years ago· 0
Combine Enhancements
  • original
  • enhanced1
  • enhanced2
  • enhanced3
  • IMAGE
weight10.25
weight20.25
weight30.25

Combine Enhancements is the pack's blender. You feed it your original image plus up to three enhanced versions of it - say a CLAHE pass, a texture boost, and a denoise - and it merges them all back into one IMAGE with three per-layer weights. In a pack full of nodes that each produce one extreme output (binary edge maps, thresholded masks, oversharpened detail), this is the node that makes the results composable instead of terminal.

It's a small idea that earns its place: the individual enhancement nodes in ComfyUI-WaterMark-Detector each give you a version of the truth, and no single one is the whole picture. A watermark usually needs contrast lifted and noise settled and texture emphasized at the same time. That's what this node is for - three passes in, one balanced image out.

How it works

The math is exactly as simple as it looks. From the source:

combined = original * (1 - weight1 - weight2 - weight3)
           + enhanced1 * weight1 + enhanced2 * weight2 + enhanced3 * weight3

The original's share isn't a fourth slider - it's whatever's left over after your three weights. Keep the sum at 1 and you get a clean weighted average. The result is clamped to 0–1 on output.

The inputs

  • original, enhanced1, enhanced2, enhanced3 - all IMAGE tensors. Same size, same batch count; the node zips them pairwise.
  • weight1 / weight2 / weight3 - 0–1, default 0.25 each. These are the three sliders you actually tune.

Output is a single IMAGE tensor, ready for preview, Save Image, or further processing.

The trap to avoid

Don't let the three weights sum past 1. If they do, 1 - (w1+w2+w3) goes negative and your original gets subtracted rather than blended - the clamp hides it on output, but you're effectively pushing contrast into the enhanced layers at the original's expense and wondering why the result looks wrong. Sum to exactly 1 and you can't go wrong. Also note every connected input must be the same resolution; a mismatch shows up as a batch/zip error rather than a friendly warning.

If you need more than three enhanced inputs, the pack's FlexibleCombineEnhancements takes up to five - but read its article first, because its weights are hidden from the UI, which is its own gotcha. CombineEnhancements here is the one where you actually get control.

Installing

Standard custom-node install, no models:

cd ComfyUI/custom_nodes
git clone https://github.com/hotpizzatactics/ComfyUI-WaterMark-Detector

or find ComfyUI-WaterMark-Detector in ComfyUI Manager. The pack's install.py pip-installs torch, numpy, opencv-python, scipy, and PyWavelets; opencv is almost certainly already in your ComfyUI environment. Restart ComfyUI after installing.

Categoryimage/watermark

Inputs (7)

NameTypeDefaultDescription
originalIMAGE
enhanced1IMAGE
enhanced2IMAGE
enhanced3IMAGE
weight1FLOAT0.250–1
weight2FLOAT0.250–1
weight3FLOAT0.250–1

Outputs (1)

NameTypeDescription
IMAGEIMAGE