Last active
May 3, 2023 19:15
-
-
Save Lycolia/cb432ad1b1ce083482b5487c131b5d12 to your computer and use it in GitHub Desktop.
Stable Diffusion web UI(AUTOMATIC1111) setup preset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"attachments": {}, | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "8I3ZTn1SUXV4" | |
}, | |
"source": [ | |
"# Check runtime status" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"id": "QdhtEYNoUUpq" | |
}, | |
"outputs": [], | |
"source": [ | |
"! nvidia-smi\n", | |
"! nvcc -V\n", | |
"! free -h" | |
] | |
}, | |
{ | |
"attachments": {}, | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "YeRaVCAURu6D" | |
}, | |
"source": [ | |
"# Setup. Edit extensions and models to be used in this section" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "Uk7cf6qOJGiA", | |
"outputId": "93bdd04a-eac0-4bde-8a03-ca367a8d9fbb" | |
}, | |
"outputs": [], | |
"source": [ | |
"# get Stable Diffusion web UI\n", | |
"!git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui\n", | |
"\n", | |
"# make resource dirs\n", | |
"!mkdir -p /content/stable-diffusion-webui/models/ESRGAN/\n", | |
"!mkdir -p /content/stable-diffusion-webui/models/Lora/\n", | |
"!mkdir -p /content/stable-diffusion-webui/models/VAE/\n", | |
"!mkdir -p /content/stable-diffusion-webui/models/hypernetworks\n", | |
"!mkdir -p /content/stable-diffusion-webui/extensions/sd-webui-controlnet/models/\n", | |
"#!mkdir -p /content/stable-diffusion-webui/embeddings\n", | |
"\n", | |
"# get extentions\n", | |
"!git clone https://github.com/nolanaatama/sd-webui-tunnels /content/stable-diffusion-webui/extensions/sd-webui-tunnels\n", | |
"!git clone https://github.com/Mikubill/sd-webui-controlnet /content/stable-diffusion-webui/extensions/sd-webui-controlnet\n", | |
"!git clone https://github.com/fkunn1326/openpose-editor /content/stable-diffusion-webui/extensions/openpose-editor\n", | |
"!git clone https://github.com/yfszzx/stable-diffusion-webui-images-browser /content/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser\n", | |
"!git clone https://github.com/DominikDoom/a1111-sd-webui-tagcomplete /content/stable-diffusion-webui/extensions/a1111-sd-webui-tagcomplete\n", | |
"\n", | |
"# get controlnet\n", | |
"!curl -Lo /content/stable-diffusion-webui/extensions/sd-webui-controlnet/models/control_canny.safetensors https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_canny-fp16.safetensors\n", | |
"!curl -Lo /content/stable-diffusion-webui/extensions/sd-webui-controlnet/models/control_depth.safetensors https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_depth-fp16.safetensors\n", | |
"!curl -Lo /content/stable-diffusion-webui/extensions/sd-webui-controlnet/models/control_hed-fp16.safetensors https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_hed-fp16.safetensors\n", | |
"!curl -Lo /content/stable-diffusion-webui/extensions/sd-webui-controlnet/models/control_mlsd-fp16.safetensors https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_mlsd-fp16.safetensors\n", | |
"!curl -Lo /content/stable-diffusion-webui/extensions/sd-webui-controlnet/models/control_normal-fp16.safetensors https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_normal-fp16.safetensors\n", | |
"!curl -Lo /content/stable-diffusion-webui/extensions/sd-webui-controlnet/models/control_openpose-fp16.safetensors https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_openpose-fp16.safetensors\n", | |
"!curl -Lo /content/stable-diffusion-webui/extensions/sd-webui-controlnet/models/control_scribble-fp16.safetensors https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_scribble-fp16.safetensors\n", | |
"!curl -Lo /content/stable-diffusion-webui/extensions/sd-webui-controlnet/models/control_seg-fp16.safetensors https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_seg-fp16.safetensors\n", | |
"!curl -Lo /content/stable-diffusion-webui/extensions/sd-webui-controlnet/models/t2iadapter_canny_sd14v1.pth https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_canny_sd14v1.pth\n", | |
"!curl -Lo /content/stable-diffusion-webui/extensions/sd-webui-controlnet/models/t2iadapter_color_sd14v1.pth https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_color_sd14v1.pth\n", | |
"!curl -Lo /content/stable-diffusion-webui/extensions/sd-webui-controlnet/models/t2iadapter_depth_sd14v1.pth https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_depth_sd14v1.pth\n", | |
"!curl -Lo /content/stable-diffusion-webui/extensions/sd-webui-controlnet/models/t2iadapter_keypose_sd14v1.pth https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_keypose_sd14v1.pth\n", | |
"!curl -Lo /content/stable-diffusion-webui/extensions/sd-webui-controlnet/models/t2iadapter_openpose_sd14v1.pth https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_openpose_sd14v1.pth\n", | |
"!curl -Lo /content/stable-diffusion-webui/extensions/sd-webui-controlnet/models/t2iadapter_seg_sd14v1.pth https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_seg_sd14v1.pth\n", | |
"!curl -Lo /content/stable-diffusion-webui/extensions/sd-webui-controlnet/models/t2iadapter_sketch_sd14v1.pth https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_sketch_sd14v1.pth\n", | |
"!curl -Lo /content/stable-diffusion-webui/extensions/sd-webui-controlnet/models/t2iadapter_style_sd14v1.pth https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_style_sd14v1.pth\n", | |
"\n", | |
"# get model\n", | |
"## upscaler\n", | |
"!curl -Lo /content/stable-diffusion-webui/models/ESRGAN/4x-UltraSharp.pth https://huggingface.co/nolanaatama/ESRGAN/resolve/main/4x-UltraSharp.pth\n", | |
"\n", | |
"## model\n", | |
"!curl -Lo /content/stable-diffusion-webui/models/Stable-diffusion/<ModelName> <ModelUrl>\n", | |
"# !curl -Lo /content/stable-diffusion-webui/models/Stable-diffusion/some-model.safetensors https://example.com/sd/model/some-model.safetensors\n", | |
"# !curl -Lo /content/stable-diffusion-webui/models/VAE/some-model.vae.pt https://example.com/sd/model/some-model.safetensors\n", | |
"# !curl -Lo /content/stable-diffusion-webui/models/Lora/some-model.safetensors https://example.com/sd/model/some-model.safetensors\n" | |
] | |
}, | |
{ | |
"attachments": {}, | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "yvc1B5nhRru5" | |
}, | |
"source": [ | |
"# Launch web UI\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "RfAFQaIAJRSE", | |
"outputId": "55cbf6e9-d868-4b5c-aa44-1ffadc3a4693" | |
}, | |
"outputs": [], | |
"source": [ | |
"!pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchtext==0.14.1 torchaudio==0.13.1 torchdata==0.5.1 --extra-index-url https://download.pytorch.org/whl/cu117\n", | |
"%cd /content/stable-diffusion-webui\n", | |
"!git checkout 9edd4b6e516ec327e15cc00a3933c681fc4b2f75\n", | |
"!git branch\n", | |
"!python launch.py --share --xformers --no-half-vae\n" | |
] | |
} | |
], | |
"metadata": { | |
"accelerator": "GPU", | |
"colab": { | |
"provenance": [] | |
}, | |
"gpuClass": "premium", | |
"kernelspec": { | |
"display_name": "Python 3", | |
"name": "python3" | |
}, | |
"language_info": { | |
"name": "python" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment