File size: 1,082 Bytes
3341b27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33


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