Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ninjaneural
GitHub Repository: ninjaneural/webui
Path: blob/master/misc/install_sdxl.sh
3275 views
1
pip install -q torch==2.1.0 torchvision==0.16.0 xformers --index-url https://download.pytorch.org/whl/cu121
2
pip install httpx==0.24.1
3
4
git clone -b v1.6.0 https://github.com/AUTOMATIC1111/stable-diffusion-webui /content/$1
5
6
if [ $3 == True ]; then
7
git clone https://github.com/Mikubill/sd-webui-controlnet /content/$1/extensions/controlnet
8
fi
9
10
if [ $4 == True ]; then
11
git clone -b nightly https://github.com/ninjaneural/deforum /content/$1/extensions/deforum
12
fi
13
14
if [ $5 == True ]; then
15
git clone https://github.com/Bing-su/adetailer /content/$1/extensions/adetailer
16
fi
17
18
git clone https://github.com/adieyal/sd-dynamic-prompts /content/$1/extensions/sd-dynamic-prompts
19
git clone https://github.com/DominikDoom/a1111-sd-webui-tagcomplete /content/$1/extensions/tagcomplete
20
21
if [ $3 == True ]; then
22
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/diffusers_xl_canny_mid.safetensors -d /content/$1/extensions/controlnet/models -o diffusers_xl_canny_mid.safetensors
23
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/diffusers_xl_depth_mid.safetensors -d /content/$1/extensions/controlnet/models -o diffusers_xl_depth_mid.safetensors
24
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/kohya_controllllite_xl_canny_anime.safetensors -d /content/$1/extensions/controlnet/models -o kohya_controllllite_xl_canny_anime.safetensors
25
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/kohya_controllllite_xl_depth_anime.safetensors -d /content/$1/extensions/controlnet/models -o kohya_controllllite_xl_depth_anime.safetensors
26
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/kohya_controllllite_xl_openpose_anime_v2.safetensors -d /content/$1/extensions/controlnet/models -o kohya_controllllite_xl_openpose_anime_v2.safetensors
27
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/kohya_controllllite_xl_scribble_anime.safetensors -d /content/$1/extensions/controlnet/models -o kohya_controllllite_xl_scribble_anime.safetensors
28
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/sai_xl_canny_256lora.safetensors -d /content/$1/extensions/controlnet/models -o sai_xl_canny_256lora.safetensors
29
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/sai_xl_depth_256lora.safetensors -d /content/$1/extensions/controlnet/models -o sai_xl_depth_256lora.safetensors
30
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/sai_xl_recolor_256lora.safetensors -d /content/$1/extensions/controlnet/models -o sai_xl_recolor_256lora.safetensors
31
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/sai_xl_sketch_256lora.safetensors -d /content/$1/extensions/controlnet/models -o sai_xl_sketch_256lora.safetensors
32
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/sargezt_xl_softedge.safetensors -d /content/$1/extensions/controlnet/models -o sargezt_xl_softedge.safetensors
33
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/t2i-adapter_xl_canny.safetensors -d /content/$1/extensions/controlnet/models -o t2i-adapter_xl_canny.safetensors
34
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/t2i-adapter_xl_openpose.safetensors -d /content/$1/extensions/controlnet/models -o t2i-adapter_xl_openpose.safetensors
35
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/t2i-adapter_xl_sketch.safetensors -d /content/$1/extensions/controlnet/models -o t2i-adapter_xl_sketch.safetensors
36
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/thibaud_xl_openpose.safetensors -d /content/$1/extensions/controlnet/models -o thibaud_xl_openpose.safetensors
37
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/ip-adapter_xl.pth -d /content/$1/extensions/controlnet/models -o ip-adapter_xl.pth
38
#aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/CiaraRowles/controlnet-temporalnet-sdxl-1.0/resolve/main/diffusion_pytorch_model.safetensors -d /content/$1/extensions/controlnet/models -o diffusion_pytorch_model.safetensors
39
fi
40
41
cd /content/$1
42
43
if [ $2 != "v1.6.0" ]; then
44
sed -i -e "/from modules import launch_utils/a\import os" /content/$1/launch.py
45
sed -i -e "/ prepare_environment()/a\ os.system(f\\\"\"\"sed -i -e \"s/dict()))/dict())).cuda()/g\" /content/$1/repositories/stable-diffusion-stability-ai/ldm/util.py\"\"\")" /content/$1/launch.py
46
fi
47
48
wget https://raw.githubusercontent.com/neuralninja22/colab/master/misc/config_sdxl.json -O /content/$1/config.json
49
50