TheLastBen / fast-stable-diffusion

fast-stable-diffusion + DreamBooth
MIT License
7.47k stars 1.3k forks source link

Cant get a ui running with a fresh notebook #2402

Open dankchocolate opened 1 year ago

dankchocolate commented 1 year ago

fast_stable_diffusion_AUTOMATIC1111.ipynb fast_stable_diffusionAUTOMATIC1111.ipynb Colab Pro notebook from https://github.com/TheLastBen/fast-stable-diffusion Alternatives : RunPod | Paperspace Support [1] 13s

@markdown # Connect Google Drive

from google.colab import drive from IPython.display import clear_output import ipywidgets as widgets import os

def inf(msg, style, wdth): inf = widgets.Button(description=msg, disabled=True, button_style=style, layout=widgets.Layout(min_width=wdth));display(inf) Shared_Drive = "" #@param {type:"string"}

@markdown - Leave empty if you're not using a shared drive

print("Connecting...") drive.mount('/content/gdrive')

if Shared_Drive!="" and os.path.exists("/content/gdrive/Shareddrives"): mainpth="Shareddrives/"+Shared_Drive else: mainpth="MyDrive"

clear_output() inf('\u2714 Done','success', '50px') Connect Google Drive Shared_Drive: Insert text here Leave empty if you're not using a shared drive

[2] 8s Install/Update AUTOMATIC1111 repo

[3] 1m Requirements

[4] 55s Model Download/Load Model_Version:

1.5 Redownload_the_original_model:

Or

Path_to_MODEL: Insert text here Insert the full path of your trained model or to a folder containing multiple models Or

MODEL_LINK: Insert text here safetensors:

Use_temp_storage:

[5] 23s ControlNet Model:

None v2_Model:

None Download/update ControlNet extension and its models

[7] Start Stable-Diffusion Use_Cloudflare_Tunnel:

Offers better gradio responsivity Ngrok_token: Insert text here Input your ngrok token if you want to use ngrok server User: Insert text here Password: Insert text here Add credentials to your Gradio interface (optional) /usr/local/lib/python3.10/dist-packages/basicsr/metrics/niqe.py:5: DeprecationWarning: Please use convolve from the scipy.ndimage namespace, the scipy.ndimage.filters namespace is deprecated. from scipy.ndimage.filters import convolve

:283: DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead 2023-07-28 04:50:11,757 - ControlNet - INFO - ControlNet v1.1.233 /content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/openpose/body.py:5: DeprecationWarning: Please use `gaussian_filter` from the `scipy.ndimage` namespace, the `scipy.ndimage.filters` namespace is deprecated. from scipy.ndimage.filters import gaussian_filter /content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/openpose/hand.py:6: DeprecationWarning: Please use `gaussian_filter` from the `scipy.ndimage` namespace, the `scipy.ndimage.filters` namespace is deprecated. from scipy.ndimage.filters import gaussian_filter ControlNet preprocessor location: /content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads /content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py:38: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(version("gradio")) < LooseVersion("3.10"): /content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py:38: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(version("gradio")) < LooseVersion("3.10"): 2023-07-28 04:50:12,060 - ControlNet - INFO - ControlNet v1.1.233 Loading weights [31e35c80fc] from /content/gdrive/MyDrive/sd/stable-diffusion-webui/models/Stable-diffusion/model.safetensors Running on public URL: https://b913c9951589614a86.gradio.live ✔ Connected Startup time: 29.8s (import torch: 17.2s, import gradio: 1.4s, start: 0.2s, setup paths: 2.4s, other imports: 1.4s, load scripts: 2.3s, create ui: 0.8s, gradio launch: 3.6s, add APIs: 0.3s). /usr/local/lib/python3.10/dist-packages/jupyter_client/connect.py:28: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs given by the platformdirs library. To remove this warning and see the appropriate new directories, set the environment variable `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`. The use of platformdirs will be the default in `jupyter_core` v6 from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write Creating model from config: /content/gdrive/MyDrive/sd/stablediffusion/generative-models/configs/inference/sd_xl_base.yaml [Colab paid products ](https://colab.research.google.com/signup?utm_source=footer&utm_medium=link&utm_campaign=footer_links)- [Cancel contracts here](https://colab.research.google.com/cancel-subscription) Loading...
TheLastBen commented 1 year ago

what is the issue ? the deprecation messages are harmless

mmehrle commented 1 year ago

It's not working, that's what. Whatever is being launched on gradio produces no output. Something's broken again. Not sure what as there are no error messages outside of the deprecation warnings. I'm using the 1.5 model by the way, didn't even bother with SDXL.

Downloading: "https://github.com/DagnyT/hardnet/raw/master/pretrained/train_liberty_with_aug/checkpoint_liberty_with_aug.pth" to /root/.cache/torch/hub/checkpoints/checkpoint_liberty_with_aug.pth
100% 5.10M/5.10M [00:00<00:00, 299MB/s]
/usr/local/lib/python3.10/dist-packages/einops/einops.py:711: DeprecationWarning: invalid escape sequence '\s'
  """
/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/prompt_parser.py:346: DeprecationWarning: invalid escape sequence '\('
  """
/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/generation_parameters_copypaste.py:15: DeprecationWarning: invalid escape sequence '\('
  re_hypernet_hash = re.compile("\(([0-9a-f]+)\)$")
/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/models/diffusion/uni_pc/uni_pc.py:15: DeprecationWarning: invalid escape sequence '\h'
  """Create a wrapper class for the forward SDE (VP type).
/usr/local/lib/python3.10/dist-packages/basicsr/metrics/niqe.py:5: DeprecationWarning: Please use `convolve` from the `scipy.ndimage` namespace, the `scipy.ndimage.filters` namespace is deprecated.
  from scipy.ndimage.filters import convolve
<frozen importlib._bootstrap>:283: DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead
2023-07-28 12:09:22,396 - ControlNet - INFO - ControlNet v1.1.233
/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/openpose/body.py:5: DeprecationWarning: Please use `gaussian_filter` from the `scipy.ndimage` namespace, the `scipy.ndimage.filters` namespace is deprecated.
  from scipy.ndimage.filters import gaussian_filter
/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/openpose/hand.py:6: DeprecationWarning: Please use `gaussian_filter` from the `scipy.ndimage` namespace, the `scipy.ndimage.filters` namespace is deprecated.
  from scipy.ndimage.filters import gaussian_filter
ControlNet preprocessor location: /content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads
/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py:38: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  if LooseVersion(version("gradio")) < LooseVersion("3.10"):
/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py:38: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  if LooseVersion(version("gradio")) < LooseVersion("3.10"):
2023-07-28 12:09:34,428 - ControlNet - INFO - ControlNet v1.1.233
Calculating sha256 for /content/gdrive/MyDrive/sd/stable-diffusion-webui/models/Stable-diffusion/model.safetensors: Running on public URL: https://58a728c254499d2e38.gradio.live/
✔ Connected
Startup time: 234.0s (import torch: 11.8s, import gradio: 2.3s, start: 11.1s, setup paths: 35.7s, import ldm: 1.5s, other imports: 74.4s, setup codeformer: 17.7s, list SD models: 2.4s, load scripts: 60.7s, load upscalers: 1.6s, initialize extra networks: 3.9s, create ui: 2.9s, gradio launch: 7.3s, add APIs: 0.4s).
/usr/local/lib/python3.10/dist-packages/jupyter_client/connect.py:28: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
given by the platformdirs library.  To remove this warning and
see the appropriate new directories, set the environment variable
`JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
The use of platformdirs will be the default in `jupyter_core` v6
  from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write
31e35c80fc4829d14f90153f4c74cd59c90b779f6afe05a74cd6120b893f7e5b
Loading weights [31e35c80fc] from /content/gdrive/MyDrive/sd/stable-diffusion-webui/models/Stable-diffusion/model.safetensors
Creating model from config: /content/gdrive/MyDrive/sd/stablediffusion/generative-models/configs/inference/sd_xl_base.yaml
^C
kenji1208 commented 1 year ago

image I ran into this problem as well. It stops when I open the public link and shows the line "^C"

TheLastBen commented 1 year ago

you're using low RAM runtime

dankchocolate commented 1 year ago

Is there a setting I should switch to under change runtime type?

kenji1208 commented 1 year ago

you're using low RAM runtime

image Oh I see the problem, now the default model version is SDXL, not 1.5 anymore, I switch to 1.5 and it works. Can you update the default model version to 1.5

mmehrle commented 1 year ago

Everyone - I would also recommend a reload of the default model right underneath the model version. I could not get SD to render until I did that.

mmehrle commented 1 year ago

you're using low RAM runtime

That is actually not a problem it seems. I have run a ton of TTL notebooks and there is no chance to get those to not crap out without a high RMA runtime. Not a problem with your notebook, at least for me.

motejo commented 1 year ago

I'm getting the same error, running high ram, both with a V100 and A100 (using SDXL)

TheLastBen commented 1 year ago

I'm getting the same error, running high ram, both with a V100 and A100 (using SDXL)

the deprecation messages aren't errors, an error is when the cell stops running