Frequency Separate
Pull the detail layer out of an image, by hand
- original
- low_frequency
- high_frequency
If you've ever done retouching in Photoshop, you already know frequency separation: split an image into a "low frequency" layer (soft color and lighting, no texture) and a "high frequency" layer (all the fine detail - skin pores, fabric weave, grain), edit them independently, then merge them back. This node does the splitting half of that, inside ComfyUI, with math instead of layer blend modes.
Why you'd actually reach for this
The classic use case in the ComfyUI world is fixing what a relighting or img2img pass wrecks. IC-Light, for instance, is great at re-lighting a subject but has a well-known habit of shifting skin tone toward orange - and the standard fix the community landed on is frequency separation: take the low frequency (lighting, color) from the relit output, and keep the high frequency (actual skin detail) from your original photo. You get the new lighting without losing the texture that made the photo look real. Same trick works for restoring detail lost to any heavy img2img/inpaint pass - this pack's own README calls this pattern out directly under "Restore Detail."
How it works
You don't hand this node two finished images and let it guess which is which. You do the blur yourself first - with Blur Image (Fast) or Guided Filter Image from this same pack, or whatever blur node you like - to make your own low-frequency layer, then feed both into this node. It computes high_frequency = original - low_frequency (subtract mode) or original / low_frequency (divide mode). Divide mode is the more "physically correct" version for multiplicative lighting information, but it needs the eps value to keep from dividing by near-zero in dark regions.
Inputs and outputs
original(IMAGE) - the source image, at full detail.low_frequency(IMAGE) - your pre-blurred version of the same image. This node doesn't blur anything itself; you supply this.mode-subtractordivide. Whichever you pick here, use the same mode onFrequency Combinelater, since they're inverse operations of each other.eps(default 0.1, range 0.01–0.99) - only matters in divide mode, where it's a floor added to the denominator so pitch-black pixels don't blow up into noise.
Output is a single high_frequency IMAGE - the detail residual. That's the thing you carry forward untouched while you replace or edit the low-frequency layer, then hand both back to Frequency Combine to reassemble the final image.
Installing it
Through ComfyUI Manager: search "ComfyUI-Image-Filters," install, restart. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/spacepxl/ComfyUI-Image-Filters
Then install requirements (pip install -r requirements.txt, or run install.bat on Windows) and restart. No model downloads - this is pure tensor math, so the install is fast and light compared to anything that pulls weights.
The one dependency headache worth knowing about ahead of time: the pack leans on OpenCV, and if you've got another custom node pack that installed a different opencv variant, you can hit import errors referencing cv2. The author ships a second batch file, import_error_install.bat, specifically to uninstall every opencv variant and reinstall the one that actually covers everything (opencv-contrib-python). If nodes from this pack fail to load with an opencv-related traceback in the console, that's almost certainly it.
Where people get tripped up
The most common mistake is expecting this node to do the blur for you - it won't, and if you wire a sharp image into both original and low_frequency, you'll get a flat gray or black high_frequency output because there's no difference to extract. Blur first, separate second. The other trap is mode mismatch: separate with subtract and combine with divide (or vice versa) and you'll get a badly wrong reconstruction - the two nodes have to agree.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| original | IMAGE | — | |
| low_frequency | IMAGE | — | |
| mode | COMBO | 2 options: subtract, divide | |
| eps | FLOAT | 0.100.01–0.99 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| high_frequency | IMAGE | — |