fast-stable-diffusion icon indicating copy to clipboard operation
fast-stable-diffusion copied to clipboard

Immediate Termination of 'Start Stable-Diffusion' and Unavailable UI in Google Colab.

Open hamoumiKen opened this issue 11 months ago • 11 comments

Hi Ben,

Since last night, I've suddenly been unable to generate images on Google Colab. Even after deleting the SD files from my drive and copying new code to start from scratch, the result remains unchanged. Except for the very last piece of code, everything works as before without any errors. However, when I execute "Start Stable-Diffusion," the following output is generated, and the code execution ends. Also, when I try to open the UI, I get a message saying "No interface is running right now."

Downloading: "https://github.com/DagnyT/hardnet/raw/master/pretrained/train_liberty_with_aug/checkpoint_liberty_with_aug.pth" to /content/gdrive/MyDrive/sd/stable-diffusion-webui/cache/hub/checkpoints/checkpoint_liberty_with_aug.pth 100% 5.10M/5.10M [00:00<00:00, 20.1MB/s] Calculating sha256 for /content/gdrive/MyDrive/sd/stable-diffusion-webui/models/Stable-diffusion/sd_xl_base_1.0.safetensors: Running on public URL: https://b88b51689fe408c6f3.gradio.live/ ✔ Connected Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 162, in webui() File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 109, in webui ui.setup_ui_api(app) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui.py", line 1242, in setup_ui_api app.mount("/webui-assets", fastapi.staticfiles.StaticFiles(directory=launch_utils.repo_dir('stable-diffusion-webui-assets')), name="webui-assets") File "/usr/local/lib/python3.10/dist-packages/starlette/staticfiles.py", line 57, in init raise RuntimeError(f"Directory '{directory}' does not exist") RuntimeError: Directory '/content/gdrive/MyDrive/sd/stable-diffusion-webui/repositories/stable-diffusion-webui-assets' does not exist 31e35c80fc4829d14f90153f4c74cd59c90b779f6afe05a74cd6120b893f7e5b Loading weights [31e35c80fc] from /content/gdrive/MyDrive/sd/stable-diffusion-webui/models/Stable-diffusion/sd_xl_base_1.0.safetensors Creating model from config: /content/gdrive/MyDrive/sd/stablediffusion/generative-models/configs/inference/sd_xl_base.yaml Downloading vocab.json100% 961k/961k [00:00<00:00, 4.61MB/s] Downloading merges.txt100% 525k/525k [00:00<00:00, 7.17MB/s] Downloading (…)cial_tokens_map.json100% 389/389 [00:00<00:00, 2.04MB/s] Downloading tokenizer_config.json100% 905/905 [00:00<00:00, 4.78MB/s] Downloading config.json100% 4.52k/4.52k [00:00<00:00, 20.2MB/s] Applying attention optimization: xformers... done. Model loaded in 70.1s (calculate hash: 46.4s, load weights from disk: 3.1s, create model: 3.8s, apply weights to model: 14.8s, move model to device: 0.1s, hijack: 0.1s, load textual inversion embeddings: 0.5s, calculate empty prompt: 1.0s). Killing tunnel 127.0.0.1:7860 <> https://b88b51689fe408c6f3.gradio.live/

hamoumiKen avatar Mar 02 '24 23:03 hamoumiKen

I'm having this exact same problem. Google Colab Pro account.

Running on public URL: https://3babbdfa2501717c61.gradio.live/
✔ Connected
Traceback (most recent call last):
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 162, in <module>
    webui()
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 109, in webui
    ui.setup_ui_api(app)
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui.py", line 1242, in setup_ui_api
    app.mount("/webui-assets", fastapi.staticfiles.StaticFiles(directory=launch_utils.repo_dir('stable-diffusion-webui-assets')), name="webui-assets")
  File "/usr/local/lib/python3.10/dist-packages/starlette/staticfiles.py", line 57, in __init__
    raise RuntimeError(f"Directory '{directory}' does not exist")
RuntimeError: Directory '/content/gdrive/MyDrive/sd/stable-diffusion-webui/repositories/stable-diffusion-webui-assets' does not exist
Applying attention optimization: xformers... done.
Model loaded in 41.7s (load weights from disk: 7.5s, create model: 1.4s, apply weights to model: 30.4s, move model to device: 0.1s, hijack: 0.2s, load textual inversion embeddings: 0.7s, calculate empty prompt: 1.0s).
Killing tunnel 127.0.0.1:7860 <> https://3babbdfa2501717c61.gradio.live/

``

mcanerin avatar Mar 03 '24 05:03 mcanerin

me too.

A3734 avatar Mar 03 '24 05:03 A3734

Fixed it - I manually created an empty folder called: sd/stable-diffusion-webui/repositories/stable-diffusion-webui-assets and it worked perfectly

mcanerin avatar Mar 03 '24 05:03 mcanerin

I created an empty folder, I created an empty folder, but controlnet gives me the following error FileNotFoundError: [Errno 2] No such file or directory: '/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/ models'. What should I do?

momoci0704 avatar Mar 03 '24 07:03 momoci0704

I created an empty folder, I created an empty folder, but controlnet gives me the following error FileNotFoundError: [Errno 2] No such file or directory: '/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/ models'. What should I do?

In my case, hires.fix not work normally.

junwoochoi2 avatar Mar 03 '24 08:03 junwoochoi2

You would add the following code snippet somewhere after the [Requirements] cell. This should suffice for the time being. An updated version of the notebook will likely be provided soon. !mkdir -p /content/gdrive/MyDrive/sd/stable-diffusion-webui/repositories/stable-diffusion-webui-assets %cd /content/gdrive/MyDrive/sd/stable-diffusion-webui/repositories/stable-diffusion-webui-assets !git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui-assets.git %cd /content/gdrive/MyDrive/sd/stable-diffusion-webui

A3734 avatar Mar 03 '24 09:03 A3734

Thank you very much. It worked!

momoci0704 avatar Mar 03 '24 09:03 momoci0704

You would add the following code snippet somewhere after the [Requirements] cell. This should suffice for the time being. An updated version of the notebook will likely be provided soon. !mkdir -p /content/gdrive/MyDrive/sd/stable-diffusion-webui/repositories/stable-diffusion-webui-assets %cd /content/gdrive/MyDrive/sd/stable-diffusion-webui/repositories/stable-diffusion-webui-assets !git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui-assets.git %cd /content/gdrive/MyDrive/sd/stable-diffusion-webui

Is there a way to add to this to make the various modules work? Right now everything from hi res to face enhancement is still broken with this fix.

jodono avatar Mar 03 '24 12:03 jodono

I created an empty folder, I created an empty folder, but controlnet gives me the following error FileNotFoundError: [Errno 2] No such file or directory: '/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/ models'. What should I do?

In my case, hires.fix not work normally.

Had the same problem and it was because Spandrel was missing. installing it :

!pip install spandrel

helped in my case.

ahs1711 avatar Mar 03 '24 14:03 ahs1711

adding this code after connecting to the drive fixed it for me

!mkdir -p /content/gdrive/MyDrive/sd/stable-diffusion-webui/repositories/stable-diffusion-webui-assets

!cd /content/gdrive/MyDrive/sd/stable-diffusion-webui/repositories/stable-diffusion-webui-assets
!git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui-assets.gi

Screenshot 2024-03-03 at 7 58 09 PM

VedanthB avatar Mar 03 '24 14:03 VedanthB

It seems fixed in this commit and it seems woking in my Google Colab! Hooray!!

https://github.com/TheLastBen/fast-stable-diffusion/commit/3f39e515b0b6efae1455c57866cc3ac6e22bf40c

kaitas avatar Mar 10 '24 15:03 kaitas