Download app.py from args/difusion: direct link, hf CLI and curl.
- Browser
- Download file 1.08 kB
-
https://huggingface.co/spaces/args/difusion/resolve/main/app.py
- Command line
-
hf download hf://spaces/args/difusion/app.py
-
curl -L -o app.py https://huggingface.co/spaces/args/difusion/resolve/main/app.py
1.08 kB
| import os | |
| os.kill(os.getpid(), 9) # This will crash Colab (required, everything will still be intact so dont worry) | |
| """Clone webui repository""" | |
| # Commented out IPython magic to ensure Python compatibility. | |
| git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui /content/stable-diffusion-webui | |
| # %cd /content/stable-diffusion-webui | |
| #@title 1.3 Model | |
| model_name = "wd-v1-3-float16.ckpt" #@param {type:"string"} | |
| model_link = "https://huggingface.co/hakurei/waifu-diffusion-v1-3/resolve/main/wd-v1-3-float16.ckpt" #@param {type:"string"} | |
| wget {model_link} -O models/Stable-diffusion/{model_name} | |
| COMMANDLINE_ARGS="--exit" REQS_FILE="requirements.txt" python launch.py | |
| """Kill the runtime.""" | |
| import os | |
| os.kill(os.getpid(), 9) # This will crash Colab (required, everything will still be intact so dont worry) | |
| """Change into Web UI directory and download updates""" | |
| # Commented out IPython magic to ensure Python compatibility. | |
| # %cd /content/stable-diffusion-webui | |
| git pull | |
| COMMANDLINE_ARGS="--share --gradio-debug" REQS_FILE="requirements.txt" python launch.py |