AbdullahAlfaraj / Auto-Photoshop-StableDiffusion-Plugin

A user-friendly plug-in that makes it easy to generate stable diffusion images inside Photoshop using either Automatic or ComfyUI as a backend.
MIT License
6.7k stars 510 forks source link

Photoshop freezes or CTD's after some generations / comfyUI #483

Open madrooky opened 5 months ago

madrooky commented 5 months ago

I am using a simple img2img workflow with one Controlnet module. Photoshop is running as child process from Lightroom. After some generations, not many, around 10, Photoshop either just crashes straight to desktop or freezes. Sometimes before it does, the comfyUI nodes becomes unresponsive and does not generate new images even the command is send to the console: image

When it freezes it keeps using a lot of CPU power, I got an I9 9900k with up to ~5Ghz on 16 threads, 20% is a lot in that context: image

I have updated Photoshop and it keeps crashing using the plugin. I have tried to trace an error but the logs of PS and win event log does not give any hint or meaningfull error code, other than the log that it crashed. When not using the plugin and doing basic PS stuff, PS is actually stable.

Also, I post this here because I had crashes using SD aswell, but it has been a while. So I doubt this is specifically related to using comfyUI.

madrooky commented 5 months ago

A few things that might contribute to the issue, but its not clear to me, not reliably reproducable.

  1. Image loading method - I always use manual, since the other two are not working well for me. When I forget to select an area and press Load Image From Canvas i had it a couple time that the layer froze and CPU was stuck at 20% as seen in the screenshot above.
  2. copying a part or the entire original image to a new canvas in order to generate from a down or upscaled variant had caused the problem as well.

Perhaps there is an issue with the AutoSD buffer. But as said, I can't reproduce the problem reliably. When I try to provoke it, it wont appear.

madrooky commented 5 months ago

After more working I am pretty sure it is the Loading Image From Canvas when no area is selected that messes it up.

Try to do that, and then afterwards select an area and generate an image, Photoshop will not respond anymore.