Create app,py
Browse files
app,py
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
+
|
4 |
+
os.system(apt -y update -qq)
|
5 |
+
os.system(wget http://launchpadlibrarian.net/367274644/libgoogle-perftools-dev_2.5-2.2ubuntu3_amd64.deb)
|
6 |
+
os.system(wget https://launchpad.net/ubuntu/+source/google-perftools/2.5-2.2ubuntu3/+build/14795286/+files/google-perftools_2.5-2.2ubuntu3_all.deb)
|
7 |
+
os.system(wget https://launchpad.net/ubuntu/+source/google-perftools/2.5-2.2ubuntu3/+build/14795286/+files/libtcmalloc-minimal4_2.5-2.2ubuntu3_amd64.deb)
|
8 |
+
os.system(wget https://launchpad.net/ubuntu/+source/google-perftools/2.5-2.2ubuntu3/+build/14795286/+files/libgoogle-perftools4_2.5-2.2ubuntu3_amd64.deb)
|
9 |
+
os.system(apt install -qq libunwind8-dev)
|
10 |
+
os.system(dpkg -i *.deb)
|
11 |
+
os.system(env LD_PRELOAD=libtcmalloc.so)
|
12 |
+
os.system(rm *.deb)
|
13 |
+
os.system(apt -y install -qq aria2)
|
14 |
+
os.system(pip install -q --pre xformers)
|
15 |
+
os.system(pip install -q --pre triton)
|
16 |
+
os.system(git clone -b v2.0 https://github.com/camenduru/stable-diffusion-webui)
|
17 |
+
os.system(wget https://raw.githubusercontent.com/camenduru/stable-diffusion-webui-scripts/main/run_n_times.py -O /content/stable-diffusion-webui/scripts/run_n_times.py)
|
18 |
+
os.system(git clone https://github.com/deforum-art/deforum-for-automatic1111-webui /content/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui)
|
19 |
+
os.system(git clone https://github.com/AlUlkesh/stable-diffusion-webui-images-browser /content/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser)
|
20 |
+
os.system(git clone https://github.com/camenduru/stable-diffusion-webui-huggingface /content/stable-diffusion-webui/extensions/stable-diffusion-webui-huggingface)
|
21 |
+
os.system(git clone -b v2.0 https://github.com/camenduru/sd-civitai-browser /content/stable-diffusion-webui/extensions/sd-civitai-browser)
|
22 |
+
os.system(git clone https://github.com/kohya-ss/sd-webui-additional-networks /content/stable-diffusion-webui/extensions/sd-webui-additional-networks)
|
23 |
+
os.system(git clone https://github.com/Mikubill/sd-webui-controlnet /content/stable-diffusion-webui/extensions/sd-webui-controlnet)
|
24 |
+
os.system(git clone https://github.com/camenduru/openpose-editor /content/stable-diffusion-webui/extensions/openpose-editor)
|
25 |
+
os.system(git clone https://github.com/jexom/sd-webui-depth-lib /content/stable-diffusion-webui/extensions/sd-webui-depth-lib)
|
26 |
+
os.system(git clone https://github.com/hnmr293/posex /content/stable-diffusion-webui/extensions/posex)
|
27 |
+
os.system(git clone https://github.com/camenduru/sd-webui-tunnels /content/stable-diffusion-webui/extensions/sd-webui-tunnels)
|
28 |
+
os.system(git clone https://github.com/etherealxx/batchlinks-webui /content/stable-diffusion-webui/extensions/batchlinks-webui)
|
29 |
+
os.chdir("./stable-diffusion-webui")
|
30 |
+
os.system(git reset --hard)
|
31 |
+
os.system(aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/anything-v3.0/resolve/main/Anything-V3.0-pruned.ckpt -d /content/stable-diffusion-webui/models/Stable-diffusion -o Anything-V3.0-pruned.ckpt)
|
32 |
+
os.system(sed -i -e '''/ prepare_environment()/a\ os.system\(f\"""sed -i -e ''\"s/dict()))/dict())).cuda()/g\"'' ./stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/util.py""")''' ./stable-diffusion-webui/launch.py)
|
33 |
+
os.system(mkdir ./stable-diffusion-webui/extensions/deforum-for-automatic1111-webui/models)
|