Skip to content

Instantly share code, notes, and snippets.

@ShMcK
Last active April 12, 2024 16:45
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save ShMcK/d14d90abea1437fdc9cfe8ecda864b06 to your computer and use it in GitHub Desktop.
Save ShMcK/d14d90abea1437fdc9cfe8ecda864b06 to your computer and use it in GitHub Desktop.
Config for running Automatic1111 Stable Diffusion WebUI on an AWS SageMaker Notebook
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ShMcK
Copy link
Author

ShMcK commented Apr 8, 2023

Modified from https://github.com/Miraculix200/StableDiffusionUI_SageMakerSL to work with a SageMaker Notebook instead of SageMaker Studio Labs. Requires a GPU instance (eg. P3).

@Canyayan
Copy link

thank u so much, finally I can run sd on asw studiolab!

@AIadopts
Copy link

hii.. could you check the notebook? is it still working on your side? i'm stuck at
ngrok public url, with 3200 ngrok error code..
been trying some turn around, and manage to forward to my ip address for 1 sec then connection errored out..

@gilroff
Copy link

gilroff commented Oct 9, 2023

Getting error:
Launching Web UI with arguments: --disable-console-progressbars --gradio-debug --gradio-auth : --ngrok "my token was here"
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
Traceback (most recent call last):
File "launch.py", line 48, in
main()
File "launch.py", line 44, in main
start()
File "/home/studio-lab-user/new/stable-diffusion-webui/modules/launch_utils.py", line 432, in start
import webui
File "/home/studio-lab-user/new/stable-diffusion-webui/webui.py", line 13, in
initialize.imports()
File "/home/studio-lab-user/new/stable-diffusion-webui/modules/initialize.py", line 33, in imports
from modules import shared_init
File "/home/studio-lab-user/new/stable-diffusion-webui/modules/shared_init.py", line 5, in
from modules import shared
File "/home/studio-lab-user/new/stable-diffusion-webui/modules/shared.py", line 5, in
from modules import shared_cmd_options, shared_gradio_themes, options, shared_items, sd_models_types
File "/home/studio-lab-user/new/stable-diffusion-webui/modules/options.py", line 74, in
class Options:
File "/home/studio-lab-user/new/stable-diffusion-webui/modules/options.py", line 77, in Options
def init(self, data_labels: dict[str, OptionInfo], restricted_opts):
TypeError: 'type' object is not subscriptable

@NullEqualsZero
Copy link

NullEqualsZero commented Nov 9, 2023

I am also getting an error this one
Saving ngrok auth token to ~/.ngrok_token
/home/studio-lab-user/SageMaker/stable-diffusion-webui
fatal: No names found, cannot describe anything.
Python 3.9.0 | packaged by conda-forge | (default, Oct 14 2020, 22:59:50)
[GCC 7.5.0]
Version: 1.6.1
Commit hash: 4afaaf8a020c1df457bcf7250cb1c7f609699fa7
Cloning Stable Diffusion into /home/studio-lab-user/SageMaker/stable-diffusion-webui/repositories/stable-diffusion-stability-ai...
Cloning into '/home/studio-lab-user/SageMaker/stable-diffusion-webui/repositories/stable-diffusion-stability-ai'...
remote: Enumerating objects: 580, done.
remote: Counting objects: 100% (580/580), done.
remote: Compressing objects: 100% (284/284), done.
remote: Total 580 (delta 281), reused 492 (delta 275), pack-reused 0
Receiving objects: 100% (580/580), 73.43 MiB | 49.15 MiB/s, done.
Resolving deltas: 100% (281/281), done.
Cloning Stable Diffusion XL into /home/studio-lab-user/SageMaker/stable-diffusion-webui/repositories/generative-models...
Cloning into '/home/studio-lab-user/SageMaker/stable-diffusion-webui/repositories/generative-models'...
remote: Enumerating objects: 740, done.
remote: Counting objects: 100% (383/383), done.
remote: Compressing objects: 100% (145/145), done.
remote: Total 740 (delta 301), reused 238 (delta 238), pack-reused 357
Receiving objects: 100% (740/740), 22.31 MiB | 27.46 MiB/s, done.
Resolving deltas: 100% (377/377), done.
Cloning K-diffusion into /home/studio-lab-user/SageMaker/stable-diffusion-webui/repositories/k-diffusion...
Cloning into '/home/studio-lab-user/SageMaker/stable-diffusion-webui/repositories/k-diffusion'...
remote: Enumerating objects: 1323, done.
remote: Counting objects: 100% (605/605), done.
remote: Compressing objects: 100% (76/76), done.
remote: Total 1323 (delta 565), reused 535 (delta 529), pack-reused 718
Receiving objects: 100% (1323/1323), 237.11 KiB | 3.34 MiB/s, done.
Resolving deltas: 100% (928/928), done.
Cloning CodeFormer into /home/studio-lab-user/SageMaker/stable-diffusion-webui/repositories/CodeFormer...
Cloning into '/home/studio-lab-user/SageMaker/stable-diffusion-webui/repositories/CodeFormer'...
remote: Enumerating objects: 594, done.
remote: Counting objects: 100% (245/245), done.
remote: Compressing objects: 100% (90/90), done.
remote: Total 594 (delta 176), reused 170 (delta 155), pack-reused 349
Receiving objects: 100% (594/594), 17.30 MiB | 62.83 MiB/s, done.
Resolving deltas: 100% (287/287), done.
Cloning BLIP into /home/studio-lab-user/SageMaker/stable-diffusion-webui/repositories/BLIP...
Cloning into '/home/studio-lab-user/SageMaker/stable-diffusion-webui/repositories/BLIP'...
remote: Enumerating objects: 277, done.
remote: Counting objects: 100% (165/165), done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 277 (delta 137), reused 136 (delta 135), pack-reused 112
Receiving objects: 100% (277/277), 7.03 MiB | 45.59 MiB/s, done.
Resolving deltas: 100% (153/153), done.
Launching Web UI with arguments: --skip-torch-cuda-test --disable-console-progressbars --gradio-debug --gradio-auth NullEqualsZero:0 --ngrok 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
Traceback (most recent call last):
File "/home/studio-lab-user/SageMaker/stable-diffusion-webui/launch.py", line 48, in
main()
File "/home/studio-lab-user/SageMaker/stable-diffusion-webui/launch.py", line 44, in main
start()
File "/home/studio-lab-user/SageMaker/stable-diffusion-webui/modules/launch_utils.py", line 432, in start
import webui
File "/home/studio-lab-user/SageMaker/stable-diffusion-webui/webui.py", line 13, in
initialize.imports()
File "/home/studio-lab-user/SageMaker/stable-diffusion-webui/modules/initialize.py", line 14, in imports
import torch # noqa: F401
File "/home/studio-lab-user/.conda/envs/default/lib/python3.9/site-packages/torch/init.py", line 26, in
from ._utils import _import_dotted_name, classproperty
ModuleNotFoundError: No module named 'torch._utils'

@21x2-42
Copy link

21x2-42 commented Feb 4, 2024

Is there a way to not use ngrok? Running SD hits the consumption limit of a free ngrok account in like two days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment