blepping / ComfyUI-bleh

ComfyUI nodes collection: better TAESD previews (including batch previews), improved HyperTile and Deep Shrink nodes
Apache License 2.0
51 stars 3 forks source link

Setting BlehDisableNoise seed the same as original seed produces strange results #10

Closed CosmicElement closed 1 month ago

CosmicElement commented 1 month ago

These images were generated with a base seed of 2, then a seed of 1, 2 and 3 for the BlehDisableNoise node. This also seems to affect BlehForceSeedSampler. Workflows included, only requires Use Everywhere (UE Nodes). ComfyUI_05762_ ComfyUI_05763_ ComfyUI_05764_

blepping commented 1 month ago

i think this probably makes sense. your second sampler with the same seed is starting at a very early step, so in effect you're reusing the same noise as the initial noise at a point where a lot of it is still in the latent. re-using the same noise tends to have a very strong effect. if you have ComfyUI-Sonar installed, you can try something like this:

image

that just reuses the exact same noise for every step. i had to set s_noise all the way down to 0.32 to get something that was starting to resemble an actual image.

image

blepping commented 1 month ago

thinking about this a bit more, it's a really easy trap to fall into if you do something like use a seed everywhere node. pretty sure i have workflows with that issue (though i usually use varied noise types so it's not as much of a problem). what i will probably do is add a rng_offset parameter to those nodes which defaults to 1 and have them generate (unused) noise that many times. it will change seeds compared to the current implementation but in a deterministic way and people who want to can set it to 0 to reproduce the current behavior.

i wouldn't call this a bug but making it harder to shoot oneself in the foot is a good thing. anyway, thanks for bringing this to my attention!

blepping commented 1 month ago

https://github.com/blepping/ComfyUI-bleh/commit/92610163f07b42f3ec923ea703810b4ec4c57933 should resolve this problem - it adds a seed_offset parameter to the two add_noise workaround nodes which defaults to 1. the parameter is optional so it should break existing workflows but it will changes (you set seed_offset to 0 to get the same noise as before).

closing this for now, please let me know if you still have any issues.