ssitu / ComfyUI_restart_sampling

ComfyUI nodes for restart sampling based on the paper "Restart Sampling for Improving Generative Processes"
GNU General Public License v3.0
83 stars 6 forks source link

Restart sampler custom advanced? #16

Closed blepping closed 6 months ago

blepping commented 7 months ago

currently there isn't a way to use restart with the new Guider and Noise stuff. i haven't looked at it too closely yet so i'm not sure how big of a change it will be, but would you be interested in a pull adding that feature?

ssitu commented 7 months ago

Are those new additions to comfyui?

blepping commented 6 months ago

Are those new additions to comfyui?

yes, that's correct. the SamplerCustomAdvanced node was added on the 3rd i think, so pretty recent. a bit more than a week ago:

image

aside from the guider replacing conditioning and the noise input addition it works like the SamplerCustom node.

ssitu commented 6 months ago

Looks like it is to support more advanced sampling schemes. The dual cfg guider sounds interesting. I think it'll be good to support the sampler custom advanced node.

I wonder if we can just have a schedule-related node and a guider node to support this, where the schedule node inserts the restarts and the guider node adds noise back when the restarts occur. I haven't looked into the new code too much, so it is just a thought. I forgot how hard it was to follow the sampling code.

blepping commented 6 months ago

i looked at it more closely the other day. for reference the class ComfyUI defines: https://github.com/comfyanonymous/ComfyUI/blob/58812ab8ca601cc2dd9dbe64c1f3ffd4929fd0ca/comfy/samplers.py#L592

from that, it looks like making a custom advanced version sampler wouldn't really be too useful (and possibly would be difficult/impossible). also making a restart guider that takes stuff like the restart segments/schedulers could work but might be kind of pointless because you couldn't use another guider. so it's kind of back to doing what you already can do, except for the noise input i guess.

what might be possible is to make a restart guider that takes another guider. then you could actually do stuff with it that's not possible currently. doing it that way there would be a restart guider that takes another guider and also a node that takes the restart params like segments/schedules creates the restart sigmas.

(maybe this should be moved to a discussion)