dance commited on
Commit
ad2b368
1 Parent(s): ab0a815

Upload chikmix.ipynb

Browse files
Files changed (1) hide show
  1. chikmix.ipynb +138 -0
chikmix.ipynb ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": null,
6
+ "metadata": {
7
+ "id": "sBbcB4vwj_jm"
8
+ },
9
+ "outputs": [],
10
+ "source": [
11
+ "!curl -Lo memfix.zip https://github.com/nolanaatama/sd-webui/raw/main/memfix.zip\n",
12
+ "!unzip /content/memfix.zip\n",
13
+ "!apt install -qq libunwind8-dev\n",
14
+ "!dpkg -i *.deb\n",
15
+ "%env LD_PRELOAD=libtcmalloc.so\n",
16
+ "!rm *\n",
17
+ "!pip install --upgrade fastapi==0.90.1\n",
18
+ "!git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui\n",
19
+ "!git clone https://github.com/nolanaatama/sd-webui-tunnels /content/stable-diffusion-webui/extensions/sd-webui-tunnels\n",
20
+ "!git clone https://github.com/Mikubill/sd-webui-controlnet /content/stable-diffusion-webui/extensions/sd-webui-controlnet\n",
21
+ "!git clone https://github.com/hnmr293/posex /content/stable-diffusion-webui/extensions/posex\n",
22
+ "!git clone https://github.com/yfszzx/stable-diffusion-webui-images-browser /content/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser\n",
23
+ "!git clone https://github.com/DominikDoom/a1111-sd-webui-tagcomplete /content/stable-diffusion-webui/extensions/a1111-sd-webui-tagcomplete\n",
24
+ "# Model Code\n",
25
+ "!curl -Lo /content/stable-diffusion-webui/models/Stable-diffusion/chikmix.safetensors https://huggingface.co/nolanaatama/chkmx/resolve/main/chkmx.safetensors\n",
26
+ "# ControlNet\n",
27
+ "!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",
28
+ "!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",
29
+ "!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",
30
+ "!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",
31
+ "!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",
32
+ "!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",
33
+ "!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",
34
+ "!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",
35
+ "!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",
36
+ "!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",
37
+ "!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",
38
+ "!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",
39
+ "!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",
40
+ "!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",
41
+ "!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",
42
+ "!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",
43
+ "import shutil\n",
44
+ "shutil.rmtree('/content/stable-diffusion-webui/embeddings')\n",
45
+ "%cd /content/stable-diffusion-webui\n",
46
+ "!git checkout 0cc0ee1\n",
47
+ "!git clone https://huggingface.co/nolanaatama/embeddings\n",
48
+ "%cd /content/stable-diffusion-webui/models\n",
49
+ "!git clone https://huggingface.co/nolanaatama/ESRGAN\n",
50
+ "%cd /content/stable-diffusion-webui\n",
51
+ "# Web UI tunnel\n",
52
+ "!COMMANDLINE_ARGS=\"--share --disable-safe-unpickle --no-half-vae --xformers --reinstall-xformers --enable-insecure-extension --gradio-queue --remotemoe\" REQS_FILE=\"requirements.txt\" python launch.py\n",
53
+ "# If remotemoe failed to start, change '--remotemoe' to '--cloudflared' on the COMMANDLINE_ARGS line above to use cloudflare tunnel"
54
+ ]
55
+ },
56
+ {
57
+ "cell_type": "markdown",
58
+ "source": [
59
+ "## (OPTIONAL) LoRAs"
60
+ ],
61
+ "metadata": {
62
+ "id": "0DwYF_aLUXKy"
63
+ }
64
+ },
65
+ {
66
+ "cell_type": "markdown",
67
+ "source": [
68
+ "### 1. After the gradio link show up, stop the first cell & clear the code output👆"
69
+ ],
70
+ "metadata": {
71
+ "id": "JUtPlg328avv"
72
+ }
73
+ },
74
+ {
75
+ "cell_type": "markdown",
76
+ "source": [
77
+ "### 2. Load the LoRA & launch the web ui"
78
+ ],
79
+ "metadata": {
80
+ "id": "xy_WyDzNUgd2"
81
+ }
82
+ },
83
+ {
84
+ "cell_type": "code",
85
+ "source": [
86
+ "# Copy the LoRA code from other LoRA setup (download the setup file after editing the LoRA code cell to avoid repeat input for next session)\n",
87
+ "# How-to download the setup file: Click 'File' menu -> 'Download' -> 'Download .ipynb'\n",
88
+ "# Load LoRA from Google Drive: https://youtu.be/G1QZfAPUMaM\n",
89
+ "\n",
90
+ "# LoRA 1\n",
91
+ "#!curl ...\n",
92
+ "\n",
93
+ "# LoRA 2\n",
94
+ "#!curl ...\n",
95
+ "\n",
96
+ "# LoRA 3\n",
97
+ "#!curl ...\n",
98
+ "\n",
99
+ "# ...\n",
100
+ "\n",
101
+ "# Web UI tunnel\n",
102
+ "!COMMANDLINE_ARGS=\"--share --disable-safe-unpickle --no-half-vae --xformers --reinstall-xformers --enable-insecure-extension --gradio-queue --remotemoe\" REQS_FILE=\"requirements.txt\" python launch.py\n",
103
+ "# If remotemoe failed to start, change '--remotemoe' to '--cloudflared' on the COMMANDLINE_ARGS line above to use cloudflare tunnel"
104
+ ],
105
+ "metadata": {
106
+ "id": "3EOPSiOgUs4z"
107
+ },
108
+ "execution_count": null,
109
+ "outputs": []
110
+ },
111
+ {
112
+ "cell_type": "markdown",
113
+ "metadata": {
114
+ "id": "fhwIXzcgfkoR"
115
+ },
116
+ "source": [
117
+ "# 📚 GitHub for more: [_@nolanaatama_](https://github.com/nolanaatama)\n",
118
+ "# 📦 Repo: [Github](https://github.com/nolanaatama/sd-1click-colab)"
119
+ ]
120
+ }
121
+ ],
122
+ "metadata": {
123
+ "accelerator": "GPU",
124
+ "colab": {
125
+ "provenance": []
126
+ },
127
+ "gpuClass": "standard",
128
+ "kernelspec": {
129
+ "display_name": "Python 3",
130
+ "name": "python3"
131
+ },
132
+ "language_info": {
133
+ "name": "python"
134
+ }
135
+ },
136
+ "nbformat": 4,
137
+ "nbformat_minor": 0
138
+ }