comfyanonymous / ComfyUI_experiments

Some experimental custom nodes.
GNU General Public License v3.0
164 stars 16 forks source link

sampler_tonemap.py #1

Closed WASasquatch closed 1 year ago

WASasquatch commented 1 year ago

This sounded like a great idea, but when I look at your code, you are not actually tone mapping from a range. You're just normalizing the noise prediction. Shouldn't you be clipping between a range?

comfyanonymous commented 1 year ago

It's named "tonemap" because the algorithm is based on the simple reinhard tone mapping algorithm. I just treat the magnitude of the latent vectors as the "luminance".

In the future I might try to implement this but with a local tonemapping algorithm instead to see what the effect is.

WASasquatch commented 1 year ago

I just treat the magnitude of the latent vectors as the "luminance"

Oh! Ok, I see what you're doing. Yeah that makes sense.