Nodes/comfyUI_FrequencySeparation_RGB-HSV/Frequency Combination Node
ComfyUI Node

Frequency Combination Node

Put an image back together after frequency separation — the RGB way

By risunobushi·Created 2 years ago·Updated 2 years ago· 43
Frequency Combination Node
  • high_freq
  • low_freq
  • IMAGE

Frequency separation is the retoucher's oldest trick for editing color and texture separately, and this node is the reconstruction half of the plain-RGB version. Split an image into a blurred low-frequency layer and a high-frequency detail layer, smooth or recolor the low one, keep or swap the high one, and then this node merges them back into a normal image. It's the unglamorous bookend that makes the whole thing usable.

The node ships in the tiny FrequencySeparation pack by Andrea Baioni (u/not5) - the one whose README opens with "probably badly coded." This is the RGB sibling of the more interesting HSV pair: it works straight on the image's three channels with no color-space detour. If your goal is pure detail and texture editing, this is the simpler tool; if you care about keeping color clean while you work on lighting, the HSV version is the one to reach for.

How it works

It's a one-liner under the hood. On every channel it blends the two layers with "linear light":

combined = clip(2 * high_freq + low_freq - 1, 0, 1)

That formula is the classic linear-light recombine from Photoshop-style frequency separation: low_freq carries the broad color and lighting, high_freq carries the fine texture, and the 2×–1 math folds the detail back in around the 0.5 neutral gray the separation node uses. Feed it the outputs of the pack's FrequencySeparation node and a no-edit round trip comes back close to your source - not pixel-perfect, since the detail term comes back a little hot, but close.

Inputs and output

Two inputs, no knobs:

  • high_freq - the detail layer from FrequencySeparation. Note it's a grayscale-looking image: the RGB separator computes detail from the image's luminance and stacks it into three channels.
  • low_freq - the color/blur layer from FrequencySeparation.

The single output is an IMAGE, ready for preview, save, or the next node. In practice you swap in an edited low layer (recolored, smoothed, color-matched against another image) or a blended high layer (say, original detail mixed with relit detail), then recombine. That's the workflow the author uses to keep product and portrait relights from drifting in color.

Install

Shared with the rest of the pack - a clone, a restart, nothing to download:

cd ComfyUI/custom_nodes
git clone https://github.com/risunobushi/comfyUI_FrequencySeparation_RGB-HSV

No requirements.txt and no model files. The only real dependency is OpenCV (cv2), which comes with ComfyUI. Try ComfyUI Manager's search for "FrequencySeparation" if you like, but the clone is the README's official path and this pack may not be in the registry.

Gotchas

  • Match it to the right separator. Use this with the RGB FrequencySeparation node, and keep the HSV pair (FrequencySeparationHSV → FrequencyCombinationHSV) together. The two families encode the detail layer differently; cross-wiring gives washed-out or doubled results.
  • Watch the blur radius upstream. The author admits his nodes oversharpen at high blur_radius - roughly 9+ on the split - because the recombine re-applies the detail layer harder than a true inverse would. Keep the split's radius at 3–5 unless you want crunch.
  • It's batch-friendly - it loops over the batch dimension, so multi-image batches are fine, though the RGB separator spams a "Processing image X/batch" line to the console for every frame.
Categoryimage/filters

Inputs (2)

NameTypeDefaultDescription
high_freqIMAGE
low_freqIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE