Frequency Separation Hard Light node in comfyui uses and examples?
I noticed the Frequency Separation Hard Light in comfyui https://comfy.icu/node/Frequency-Separation-Hard-Light I was curious how this might be used to help image quality. I don't quite understand it, and the LLM that was helping me just ran me in circles doing nothing and confusing me.
I guess it's supposed to extract detail from images and recombine them, but I don't get what the point is, and how I might use it in a tangible workflow. I would love some insight from the community. Thanks
About this post
- Posted
- Archived
- Score
- 1 · 100% up
- Kind
- Text
- ID
- 1yd0c2c
11 comments
the part nobody mentions is that this node doesn't blur anything itself. going off the RES4LYF source (images.py), to split you have to feed it both
originalAND alow_pass, and the low pass is just a blurred copy of the image you make yourself. plug in only original and it has nothing to subtractso the split is image -> Image Gaussian Blur (also in RES4LYF) -> low_pass input same image -> original input high_pass comes out, that's the fine texture/detail on a mostly gray image
to recombine you wire high_pass + low_pass in and leave original empty, it rebuilds the image with a hard light blend. bigger blur size means more of the image ends up counted as "detail" in the high pass
what you actually edit is the same idea as photoshop skin retouching
in a gen workflow the main use is detail transfer. say an img2img or upscale pass got the colors and lighting you wanted but smeared skin or fabric. split both, take low_pass from the new image and high_pass from your original, recombine. the math is per pixel so both images need the same size and framing or you get ghosting
fwiw the pack has a prewired version, Image Sharpen FS. it blurs, splits, then puts the high pass back over the unblurred image, which is basically a sharpen. dropping that in and comparing is the quickest way to see what the node is doing
one gotcha from the code, the blur nodes subtract 1 from size before handing it to opencv, and opencv wants odd kernel sizes, so stick to even numbers (6, 8, 10)
Thanks this helped a lot, appreciate this. I might try wiring it like you said with the img2img low psas and combine with the original's high pass, might get some cool results. Neat
It is for very specific use cases, very precise edits. You probably don't need it. Most people don't use it.
It splits the signal so you can alter either high frequencies or low frequencies without altering the other. Then the same node can recombine the signals.
I was hoping people that do those precise edits using it might share a workflow using it.
Saying I don't need it while probably accurate doesn't really elevate my position. I would like to know how to use it for a specific edit, any edit lol
I've used it in the past for some very specific workflows. One of them was with IC-Light. IC-Light was great at changing the lighting in a picture, but it altered fine details. So what I did was to replace the high-frequency of the edited photo with the original. It mostly worked, but I consider that use of freq-sep obsolete at this point with the quality of editing models.
I can't help you more but others have gone that path.
https://www.adobe.com/products/photoshop/frequency-separation.html
https://www.affinity.studio/blog/frequency-separation-explained
I've never seen this node used anywhere in a comfy workflow though.
after, and on a separate branch. going off the node code again, high_pass gets built from whatever low_pass you feed the split, so if you colour correct before the blur and split against that, the high pass picks up the opposite of your correction and the recombine cancels most of it out
so keep the plain blurred image going into the split, then branch that low pass, colour correct the branch, and feed it into the recombine. on that branch the order only matters a bit, simple gain stuff like exposure or white balance comes out about the same either way since a gaussian blur is just a weighted average, but curves or contrast before the blur will look slightly different around edges