Skip to content

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

1 points0 comments
Open on Reddit
About this post
Posted
Archived
Score
1 · 100% up
Kind
Text
ID
1yd0c2c

Author

1
posts
15
comments
0
media
View profile

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 original AND a low_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 subtract

so 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

  • low_pass is color, tone, lighting. color correct it, blur it harder, or swap in the low pass from a different image, the texture stays put
  • high_pass is texture. leave it alone, or swap in texture from another image

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)

3 points

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

1 points

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.

1 points

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

2 points

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.

3 points

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

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.