|
apt -y update -qq |
|
wget http://launchpadlibrarian.net/367274644/libgoogle-perftools-dev_2.5-2.2ubuntu3_amd64.deb |
|
wget https://launchpad.net/ubuntu/+source/google-perftools/2.5-2.2ubuntu3/+build/14795286/+files/google-perftools_2.5-2.2ubuntu3_all.deb |
|
wget https://launchpad.net/ubuntu/+source/google-perftools/2.5-2.2ubuntu3/+build/14795286/+files/libtcmalloc-minimal4_2.5-2.2ubuntu3_amd64.deb |
|
wget https://launchpad.net/ubuntu/+source/google-perftools/2.5-2.2ubuntu3/+build/14795286/+files/libgoogle-perftools4_2.5-2.2ubuntu3_amd64.deb |
|
apt install -qq libunwind8-dev |
|
dpkg -i *.deb |
|
%env LD_PRELOAD=libtcmalloc.so |
|
rm *.deb |
|
|
|
apt -y install -qq aria2 libcairo2-dev pkg-config python3-dev |
|
pip install -q torch==2.0.0+cu118 torchvision==0.15.1+cu118 torchaudio==2.0.1+cu118 torchtext==0.15.1 torchdata==0.6.0 --extra-index-url https://download.pytorch.org/whl/cu118 -U |
|
pip install -q xformers==0.0.19 triton==2.0.0 -U |
|
|
|
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui /content/SDVN |
|
git clone https://huggingface.co/embed/negative /content/SDVN/embeddings/negative |
|
git clone https://huggingface.co/embed/lora /content/SDVN/models/Lora/positive |
|
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/embed/upscale/resolve/main/4x-UltraSharp.pth -d /content/SDVN/models/ESRGAN -o 4x-UltraSharp.pth |
|
#aria2c --continue --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/holwech/realistic-rescaler-real-esrgan/resolve/main/4x_RealisticRescaler_100000_G.pth -d /content/SDVN/models/ESRGAN -o 4x-RealisticRescaler.pth |
|
git clone https://github.com/camenduru/stable-diffusion-webui-scripts /content/SDVN/scripts |
|
aria2c --continue --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/bstungnguyen/SDColab/resolve/main/params.txt -d /content/SDVN/ -o params.txt |
|
#aria2c --continue --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/bstungnguyen/SDColab/resolve/main/ui-config.json -d /content/SDVN/ -o ui-config.json |
|
#aria2c --continue --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/stabilityai/sdxl-vae/resolve/main/sdxl_vae.safetensors -d /content/SDVN/models/Stable-diffusion -o sdxl_vae.pt |
|
aria2c --continue --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.ckpt -d /content/SDVN/models/Stable-diffusion -o VAE84.vae.pt |
|
#aria2c --continue --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/stabilityai/sd-vae-ft-ema-original/resolve/main/vae-ft-ema-560000-ema-pruned.safetensors -d /content/SDVN/models/Stable-diffusion -o VAE56.vae.pt |
|
#aria2c --continue --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/phamhungd/GuoZovya/resolve/main/Waifu-anime.vae.pt -d /content/SDVN/models/Stable-diffusion -o Waifu-anime.vae.pt |
|
#aria2c --continue --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/phamhungd/GuoZovya/resolve/main/Anime-fp16.vae.pt -d /content/SDVN/models/Stable-diffusion -o Anime.vae.pt |
|
|
|
git clone https://github.com/camenduru/sd-webui-tunnels /content/SDVN/extensions/sd-webui-tunnels |
|
#git clone https://github.com/deforum-art/deforum-for-automatic1111-webui /content/SDVN/extensions/deforum-for-automatic1111-webui |
|
#git clone https://github.com/AlUlkesh/stable-diffusion-webui-images-browser /content/SDVN/extensions/stable-diffusion-webui-images-browser |
|
#git clone https://github.com/camenduru/stable-diffusion-webui-huggingface /content/SDVN/extensions/stable-diffusion-webui-huggingface |
|
#git clone https://github.com/camenduru/sd-civitai-browser /content/SDVN/extensions/sd-civitai-browser |
|
#git clone https://github.com/kohya-ss/sd-webui-additional-networks /content/SDVN/extensions/sd-webui-additional-networks |
|
#git clone https://github.com/Mikubill/sd-webui-controlnet /content/SDVN/extensions/sd-webui-controlnet |
|
#git clone https://github.com/fkunn1326/openpose-editor /content/SDVN/extensions/openpose-editor |
|
#git clone https://github.com/jexom/sd-webui-depth-lib /content/SDVN/extensions/sd-webui-depth-lib |
|
#git clone https://github.com/hnmr293/posex /content/SDVN/extensions/posex |
|
#git clone https://github.com/nonnonstop/sd-webui-3d-open-pose-editor /content/SDVN/extensions/sd-webui-3d-open-pose-editor |
|
#git clone https://github.com/etherealxx/batchlinks-webui /content/SDVN/extensions/batchlinks-webui |
|
#git clone https://github.com/catppuccin/stable-diffusion-webui /content/SDVN/extensions/stable-diffusion-webui-catppuccin |
|
#git clone https://github.com/camenduru/a1111-sd-webui-locon /content/SDVN/extensions/a1111-sd-webui-locon |
|
#git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui-rembg /content/SDVN/extensions/stable-diffusion-webui-rembg |
|
#git clone https://github.com/ashen-sensored/stable-diffusion-webui-two-shot /content/SDVN/extensions/stable-diffusion-webui-two-shot |
|
#git clone https://github.com/thomasasfk/sd-webui-aspect-ratio-helper /content/SDVN/extensions/sd-webui-aspect-ratio-helper |
|
#git clone https://github.com/tjm35/asymmetric-tiling-sd-webui /content/SDVN/extensions/asymmetric-tiling-sd-webui |
|
%cd /content/SDVN |
|
#git reset --hard |
|
#git -C /content/SDVN/repositories/stable-diffusion-stability-ai reset --hard |
|
|
|
#aria2c --console-log-level=error -c -x 16 -k 1M -s 16 https://huggingface.co/ckpt/ControlNet/resolve/main/canny-sd21-safe.safetensors -d /content/SDVN/extensions/sd-webui-controlnet/models -o canny-sd21-safe.safetensors |
|
#aria2c --console-log-level=error -c -x 16 -k 1M -s 16 https://huggingface.co/ckpt/ControlNet/resolve/main/depth-sd21-safe.safetensors -d /content/SDVN/extensions/sd-webui-controlnet/models -o depth-sd21-safe.safetensors |
|
#aria2c --console-log-level=error -c -x 16 -k 1M -s 16 https://huggingface.co/ckpt/ControlNet/resolve/main/hed-sd21-safe.safetensors -d /content/SDVN/extensions/sd-webui-controlnet/models -o hed-sd21-safe.safetensors |
|
#aria2c --console-log-level=error -c -x 16 -k 1M -s 16 https://huggingface.co/ckpt/ControlNet/resolve/main/openpose-sd21-safe.safetensors -d /content/SDVN/extensions/sd-webui-controlnet/models -o openpose-sd21-safe.safetensors |
|
#aria2c --console-log-level=error -c -x 16 -k 1M -s 16 https://huggingface.co/ckpt/ControlNet/resolve/main/scribble-sd21-safe.safetensors -d /content/SDVN/extensions/sd-webui-controlnet/models -o scribble-sd21-safe.safetensors |
|
#aria2c --console-log-level=error -c -x 16 -k 1M -s 16 https://huggingface.co/ckpt/ControlNet/raw/main/cldm_v21.yaml -d /content/SDVN/extensions/sd-webui-controlnet/models -o canny-sd21-safe.yaml |
|
#aria2c --console-log-level=error -c -x 16 -k 1M -s 16 https://huggingface.co/ckpt/ControlNet/raw/main/cldm_v21.yaml -d /content/SDVN/extensions/sd-webui-controlnet/models -o depth-sd21-safe.yaml |
|
#aria2c --console-log-level=error -c -x 16 -k 1M -s 16 https://huggingface.co/ckpt/ControlNet/raw/main/cldm_v21.yaml -d /content/SDVN/extensions/sd-webui-controlnet/models -o hed-sd21-safe.yaml |
|
#aria2c --console-log-level=error -c -x 16 -k 1M -s 16 https://huggingface.co/ckpt/ControlNet/raw/main/cldm_v21.yaml -d /content/SDVN/extensions/sd-webui-controlnet/models -o openpose-sd21-safe.yaml |
|
#aria2c --console-log-level=error -c -x 16 -k 1M -s 16 https://huggingface.co/ckpt/ControlNet/raw/main/cldm_v21.yaml -d /content/SDVN/extensions/sd-webui-controlnet/models -o scribble-sd21-safe.yaml |
|
|
|
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/stable-diffusion-2-1/resolve/main/v2-1_768-ema-pruned.ckpt -d /content/stable-diffusion-webui/models/Stable-diffusion -o v2-1_768-ema-pruned.ckpt |
|
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/stable-diffusion-2-1/raw/main/v2-inference-v.yaml -d /content/stable-diffusion-webui/models/Stable-diffusion -o v2-1_768-ema-pruned.yaml |
|
|
|
sed -i -e '''/from modules import launch_utils/a\import os''' /content/SDVN/launch.py |
|
sed -i -e '''/ prepare_environment()/a\ os.system\(f\"""sed -i -e ''\"s/dict()))/dict())).cuda()/g\"'' /content/SDVN/repositories/stable-diffusion-stability-ai/ldm/util.py""")''' /content/SDVN/launch.py |
|
sed -i -e 's/\["sd_model_checkpoint"\]/\["sd_model_checkpoint","sd_vae","CLIP_stop_at_last_layers"\]/g' /content/SDVN/modules/shared.py |
|
ln -s /content/drive/MyDrive/SD-Data/Model /content/SDVN/models/Stable-diffusion |
|
ln -s /content/drive/MyDrive/SD-Data/Lora /content/SDVN/models/Lora |
|
ln -s /content/drive/MyDrive/SD-Data/Embeddings /content/SDVN/embeddings |
|
ln -s /content/drive/MyDrive/SD-Data/Lyco /content/SDVN/models/Lora |