Frequency Combine (MEC)
The other half of the split
- high_frequency
- low_frequency
- mask
- image
- report
What it does
Grafts a detail layer back onto a base image. In practice: you split a plate with Frequency Separate (MEC), sent the low frequency through a relight or an edit model, and now you want the original's texture back on top of the new lighting. That graft is this node.
It's the second half of a pair and it only makes sense described against the first: the split happens in working (linear) space so that a ratio-based recombine is lighting-invariant, which is what lets you take texture from one exposure and land it on another without the detail darkening or blowing out. That's the trick - Multiply-the-ratio, not add-the-difference. Add-the-difference is the naive version and it fails the moment the two images aren't lit identically.
Inputs
- high_frequency - the detail layer from Separate. Wire
high_frequency(the full-strength one), orhigh_frequency_maskedif you already used Separate's mask input. - low_frequency - the base the detail lands on. Typically the relit or re-graded result. The tooltip notes the plumbing: Separate leaves this in display space when
linearis true, and Combine re-linearises it, so you can hand it straight over and even preview it on the way. - mode - Divide or Subtract. Must match the Separate that produced the HF. Divide is the ratio/lighting-invariant one and the default; Subtract is the classic Photoshop linear-dodge-style recombination.
- linear - process in linear light. Default on, which is the correct setting, and it must match Separate. Turn both off only if you deliberately want to work in gamma the way old Photoshop tutorials do.
- detail_strength - 0 to 2, default 1. Attenuate below 1 to keep the relight's own softer texture, boost above 1 to push the original's detail harder. 0.0 restores the base only - useful as an A/B toggle, and a nice way to prove to yourself the node is doing anything.
Optional: mask applies the detail only inside the matte (feathered by its values), and mask_feather blurs the mask edge before it's used. That's the compositing-friendly version of "keep the texture on the product but not on the table".
Outputs are image and report.
The clamp, and why it's stated so loudly
The node's own description warns that the output is clamped to 0–1: values above 1.0 are clipped, and this is an 8-bit-range IMAGE, not a scene-linear plate. Read that twice if you're coming from Nuke. You cannot use this to accumulate highlights; anything over white is gone. If your base already has values at or near 1.0 and you boost detail_strength, you're clipping the bright side of the texture rather than lifting it.
Also stated in the tooltip: negative ratios from the Divide mode are discarded on Combine before recombine. If the HF layer contains negative values (which happens around sharp edges after a Guided split), those pixels get dropped rather than multiplied through, so they can't invert your image.
The workflow
[Load Image] ─→ [Frequency Separate (MEC)]
│ method: Guided, radius: 8–16, mode: Divide, linear: on
├── high_frequency ──────────────┐
├── high_frequency_masked ───┐ │
└── low_frequency ─→ [IC-Light / relight]
│ │
[Frequency Combine (MEC)] ←┘
mode: Divide linear: on
detail_strength: 0.8–1.2
↓
final image
Start at detail_strength 1.0, then pull it back to 0.7–0.8 more often than you'd think. Full-strength original texture on new lighting sometimes reads as dirty rather than detailed, especially where the relight darkened things.
Install
ComfyUI Manager → search "CustomNodePacks", or:
cd ComfyUI/custom_nodes
git clone https://github.com/Code2Collapse/ComfyUI-CustomNodePacks
Restart ComfyUI, check the console for the pack's load line. No model, no download, tier 1. The pack's required dependencies are opencv-python, scipy, safetensors - and per the README, don't run pip install -r requirements.txt without checking what you already have, because it lists packages ComfyUI provides.
Common issues
- Washed-out or haloed result.
modeorlineardoesn't match Separate. Check both. - The detail vanishes. You're at
detail_strength0, or you fedhigh_frequency_maskedwithout connecting a mask on the Separate side (in which case it's the full-strength layer - check the report string). - Blown highlights after boosting. That's the clamp doing its job. Pull the base down slightly, or reduce
detail_strength, or you'll keep trading texture for flat white. - Colour shifted. Use
detail: Luminanceon Separate. A Divide recombine with an RGB detail layer does touch colour.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| high_frequency | IMAGE | Detail layer from Frequency Separate (mode/linear must match). | |
| low_frequency | IMAGE | Base image the detail lands on (e.g. the relit result). Leaves Separate in display space when linear=True; Combine re-linearises it. | |
| mode | COMBO | Divide | Must match the Separate that made the HF. |
| linear | BOOLEAN | true | Process in linear light (correct). Turn off to work in gamma like classic Photoshop. Must match between Separate and Combine. |
| detail_strength | FLOAT | 1.000–2 | Attenuate (<1) or boost (>1) the transferred detail. 0.0 restores the base only. |
| maskopt | MASK | Optional — apply the detail only inside the mask (feathered by its values). | |
| mask_featheropt | FLOAT | 00–64 | Soften the mask edge before applying detail. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| report | STRING | — |