ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Optional method to visualize and replay the denoising process step by step

Open jffaust opened this issue 1 year ago • 0 comments

Feature Idea

I think one feature that would really elevate ComfyUI is the ability to visualize and replay the results of denoising in a step by step manner with high quality previews. This would be very helpful in seeing the impacts of enabling/bypassing certain nodes in the workflow. Say for example I'm changing the start_at of a kohya deep shrink, I would like to be able to see how it impacts the denoising process compared to a previous generation.

Obviously this would have a considerable impact on generation performance but when working on specific images with a locked seed, it could be very useful. There is so much going on in the backend when models generate images, with all the custom nodes tweaking so many parameters. Having the ability to see the model working to bring the image to life would really help and allow better understanding of the impact of changes in workflows. It's basically the only thing we have to get a better understanding of what is going on under the hood.

Existing Solutions

I know the KSampler nodes already provide preview but there are several problems with it:

  • Having the previews directly in the KSampler node makes sense to give a small preview of what is happening, but here I'm thinking about a new interface/panel that would really bring this step-by-step denoising visualization to the center stage. Maybe kind of a gallery/history of the samplings that happened.
  • The previews are not saved so there is no ability to check it after a generation or to compare the denoising to a previous generation
  • The previews shown don't seem to include the last couple steps of the generation.

Other

The Invoke application does not have all the features requested here but they show this denoising process a bit better. See the following video: https://youtu.be/QT6mGsbJ42A?t=676

I tried saving the previews of the denoising process on my fork here: https://github.com/jffaust/ComfyUI/commits/comfyui-replay/ However, I'm getting weird results where the preview of the last step is not fully denoised. It was interesting to dive into the code of ComfyUI and this little modification helped me but I feel like this deserves to be a core feature implemented by ComfyUI experts.

jffaust avatar Aug 08 '24 16:08 jffaust