AlUlkesh / sd_save_intermediate_images

Save intermediate images during the sampling process
The Unlicense
110 stars 17 forks source link

Show saved intermediate images as preview? #23

Open XeonG opened 1 year ago

XeonG commented 1 year ago

So webui has the option to disable showing the preview images it generates, which I disabled not sure it made much of a difference to performance,.. however if this addon is enabled it will save and denoise the steps.. so it would be nice if somehow the preview could be switched to use the saved preview images this creates as it generates in replace of the webui version.. would be a nice feature instead of checking the folder as it generates the images.

AlUlkesh commented 1 year ago

I can't imagine that's noticeably faster than showing the preview.

Can you first check, how much time you actually save by disabling?

XeonG commented 1 year ago

No live previews Time taken: 1m 18.25sTorch active/reserved: 7118/9398 MiB, Sys VRAM: 12084/24564 MiB (49.19%)

live previews Time taken: 1m 23.81sTorch active/reserved: 11728/14008 MiB, Sys VRAM: 16694/24564 MiB (67.96%)

that was "hires on" and "Save every N images: 1" I dunno maybe not such a big difference on time.. but I'll do some more tests later

LanceGao97 commented 1 year ago

No live previews Time taken: 1m 18.25sTorch active/reserved: 7118/9398 MiB, Sys VRAM: 12084/24564 MiB (49.19%)

live previews Time taken: 1m 23.81sTorch active/reserved: 11728/14008 MiB, Sys VRAM: 16694/24564 MiB (67.96%)

that was "hires on" and "Save every N images: 1" I dunno maybe not such a big difference on time.. but I'll do some more tests later

This is true, 800*1200 base image, no high res fix, 4070Ti GPU,
Setting---LivePreview options Full 11G GPUram ( from begin to the end) Approx NN 5G GPUram Approx Cheap 5G GPUram

I don't even dare to move my mouse when Full, but I can play video games when APProx NN is on.

the default live preview has some problem, just save preview images shouldnt have those problems for RAM. your script , not matter on or OFF, GPU RAM is 5G, it looks OK, and it can still record the intermediate images.