Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Colab (free plan) Web-UI breaks if file response is bigger than 2MB #588

Closed
giy-debug opened this issue Sep 16, 2022 · 6 comments
Closed

Comments

@giy-debug
Copy link

giy-debug commented Sep 16, 2022

The Google Colab https://colab.research.google.com/drive/1Iy-xW9t1-OQWhb0hNxueGij8phCyluOh) doesn't work with a batch count higher than two because requests fail when the file response is bigger than 2MB. This also applies to upscales or anything where the file response is bigger than 2MB.

I don't know if this is a limitation of Colab or Gradio but there seems to be no exception handling, that's why all buttons become unresponsive afterwards and you have to reload the page, losing all your inputs.

colab

Any way to fix this with a config parameter or so?

@Puncia
Copy link

Puncia commented Sep 16, 2022

I've been having the same problems with colab, but I don't think it's strictly related to the size. It's something else. Sometimes it works, sometimes it doesn't.
image
image

@Puncia
Copy link

Puncia commented Sep 16, 2022

gradio-app/gradio#2260

@Extraltodeus
Copy link
Contributor

Extraltodeus commented Sep 17, 2022

Even pro has the same issue but I also don't think that this is related to the size.

Note : you can add this :

from time import sleep
from IPython.display import clear_output 

while True:
  clear_output(wait=True)
  sleep(0.1)

At the end of your colab to be able to visualize the terminal's output and see more easily if anything is still running.
I think that the whole issue is more related to how the UI reacts to the end of a job. Since opening a new tab, starting a new job and interrupting it can unlock your first tab. Sometimes it also takes a bit of time and waiting a bit more in between each new batch helps a lot!

@Puncia
Copy link

Puncia commented Sep 17, 2022

You don't need to loop, you can just add "--gradio-debug" to sys.argv when you launch the webui and the cell will stay looping, while displaying the output of SD

@C43H66N12O12S2
Copy link
Collaborator

upstream

@giy-debug
Copy link
Author

giy-debug commented Oct 7, 2022

I found a simple workaround as long as Gradio is not working properly.

Using the latest Colab from https://colab.research.google.com/drive/1kw3egmSn-KgWsikYvOMjJkVDsPLjEMzl

In cell 5 add the installation of ngrok

%cd /content/stable-diffusion-webui
!pip install pyngrok
!git pull

In cell 6

%cd /content/stable-diffusion-webui

ngrok_token = "XXXXXXXXX" #@param {type:"string"}
ngrok_auth = "me:qwerty" #@param {type:"string"}

!ngrok authtoken {ngrok_token}
!nohup ngrok http 7860 -auth={ngrok_auth} -log=stdout >ngrok.log &
!sleep 2
!cat ngrok.log

!COMMANDLINE_ARGS="--listen" REQS_FILE="requirements.txt" python launch.py

you need an account from https://ngrok.com/ and the auth token (see ngrok_token)

nne998 pushed a commit to fjteam/stable-diffusion-webui that referenced this issue Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants