Linaqruf / sd-notebook-collection

209 stars 42 forks source link

Generate button freeze after (few generation/ first generation) #30

Open ankithjoseph opened 1 year ago

ankithjoseph commented 1 year ago

I am using cagliostro-colab-ui.ipynb, I am facing this after recent anapnoe commits. not sure if it has something to do with this repo (please feel free to close this issue, if not). Please take a look, If anyone else is facing the same kindly report.

No errors found in console or log. all other ui elements are working fine

ReEnMikki commented 1 year ago

Common problem across multiple webui notebooks I've tried, it's recommended to wait several seconds after the output image is finished and fully loaded before clicking Generate button again.

Linaqruf commented 1 year ago

Hi, thank you for the report. It is a well-known problem since the update of Gradio to version 3.29. Some generations may get stuck due to a queue problem, or the generate button may not respond after a few attempts.

Here's my take on this:

  1. The problem is likely caused by Gradio 3.29, so we may need to wait for the 3.31 update to finally fix the bug.
  2. Cloudflared is currently very slow.
  3. The problem may be caused by generating images with higher resolution or using a higher upscale factor. Sometimes, it gets stuck at 95%, and then the server is killed.
  4. It's also possible that the issue is due to the limitations of the Colab free tier. The free tier only provides 15GB of VRAM, which may not be enough for generating high-resolution fixes.

I can provide some solutions, but I don't think they will be effective:

  1. I have added the 'latest_gradio' option in the first cell, below the 'Experimental Config' section. Enabling this option will force the update of Gradio to version 3.31.0.
  2. You can try disabling the 'colab_optimization' and 'ram_alloc_patch' features.
  3. For now, it's best to avoid using 'cloudflared' tunnels and instead use 'ngrok' or 'gradio.live'.