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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "markdown",
|
5 |
+
"id": "f06bea55-7889-4576-a83b-d3b207729e3d",
|
6 |
+
"metadata": {},
|
7 |
+
"source": [
|
8 |
+
"# Controlnet 插件安装"
|
9 |
+
]
|
10 |
+
},
|
11 |
+
{
|
12 |
+
"cell_type": "markdown",
|
13 |
+
"id": "9fab4ab6-be4b-4206-ba12-8dad73bac833",
|
14 |
+
"metadata": {},
|
15 |
+
"source": [
|
16 |
+
"#### 更新日志\n",
|
17 |
+
"\n",
|
18 |
+
"- 安装Controlnet Canny(边缘检测)、Depth(深度检测)、Hed(边缘检测)、Openpose(提取人物骨骼姿势)、Openpose_hand(提取人物+手部骨骼)、\n",
|
19 |
+
" ip2p(指令模型,变不同风格)、inpaint(图像修补)等模型\n",
|
20 |
+
"- 安装上述模型需要的预处理器模型"
|
21 |
+
]
|
22 |
+
},
|
23 |
+
{
|
24 |
+
"cell_type": "markdown",
|
25 |
+
"id": "39df08ff-45e4-4a86-add4-a5af9cc7f7d6",
|
26 |
+
"metadata": {},
|
27 |
+
"source": [
|
28 |
+
"## 安装 Controlnet 模型"
|
29 |
+
]
|
30 |
+
},
|
31 |
+
{
|
32 |
+
"cell_type": "code",
|
33 |
+
"execution_count": null,
|
34 |
+
"id": "567fe4a3-a897-48b6-bde2-0afb3d064c80",
|
35 |
+
"metadata": {
|
36 |
+
"tags": []
|
37 |
+
},
|
38 |
+
"outputs": [],
|
39 |
+
"source": [
|
40 |
+
"##安装 aria2下载软件\n",
|
41 |
+
"!apt update\n",
|
42 |
+
"!apt install -y aria2"
|
43 |
+
]
|
44 |
+
},
|
45 |
+
{
|
46 |
+
"cell_type": "code",
|
47 |
+
"execution_count": null,
|
48 |
+
"id": "8c290ca4-0880-41e1-b1c5-58fd9a755bb7",
|
49 |
+
"metadata": {
|
50 |
+
"tags": []
|
51 |
+
},
|
52 |
+
"outputs": [],
|
53 |
+
"source": [
|
54 |
+
"##安装 Canny(边缘检测)模型\n",
|
55 |
+
"\n",
|
56 |
+
"def aria2(url, filename, d):\n",
|
57 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
58 |
+
"\n",
|
59 |
+
"model_url = \"https://huggingface.co/andzhang01/Control_1.1/resolve/main/control_v11p_sd15_canny.pth\"\n",
|
60 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/extensions/sd-webui-controlnet/models\")"
|
61 |
+
]
|
62 |
+
},
|
63 |
+
{
|
64 |
+
"cell_type": "code",
|
65 |
+
"execution_count": null,
|
66 |
+
"id": "ad32253f-3540-4917-a5ef-b501be9b978d",
|
67 |
+
"metadata": {
|
68 |
+
"tags": []
|
69 |
+
},
|
70 |
+
"outputs": [],
|
71 |
+
"source": [
|
72 |
+
"##安装 Depth(深度检测)模型\n",
|
73 |
+
"\n",
|
74 |
+
"def aria2(url, filename, d):\n",
|
75 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
76 |
+
"\n",
|
77 |
+
"model_url = \"https://huggingface.co/andzhang01/Control_1.1/resolve/main/control_v11f1p_sd15_depth.pth\"\n",
|
78 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/extensions/sd-webui-controlnet/models\")"
|
79 |
+
]
|
80 |
+
},
|
81 |
+
{
|
82 |
+
"cell_type": "code",
|
83 |
+
"execution_count": null,
|
84 |
+
"id": "cb28e5ac-1bc0-4aa5-9000-3c43a935aa60",
|
85 |
+
"metadata": {
|
86 |
+
"tags": []
|
87 |
+
},
|
88 |
+
"outputs": [],
|
89 |
+
"source": [
|
90 |
+
"##安装 Openpose(提取人物骨骼姿势)模型\n",
|
91 |
+
"\n",
|
92 |
+
"def aria2(url, filename, d):\n",
|
93 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
94 |
+
"\n",
|
95 |
+
"model_url = \"https://huggingface.co/andzhang01/Control_1.1/resolve/main/control_v11p_sd15_openpose.pth\"\n",
|
96 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/extensions/sd-webui-controlnet/models\")"
|
97 |
+
]
|
98 |
+
},
|
99 |
+
{
|
100 |
+
"cell_type": "code",
|
101 |
+
"execution_count": null,
|
102 |
+
"id": "274bdde6-acfd-462f-81c0-3e9d83eb32f0",
|
103 |
+
"metadata": {
|
104 |
+
"tags": []
|
105 |
+
},
|
106 |
+
"outputs": [],
|
107 |
+
"source": [
|
108 |
+
"##安装 ip2p(指令模型,变不同风格)模型\n",
|
109 |
+
"\n",
|
110 |
+
"def aria2(url, filename, d):\n",
|
111 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
112 |
+
"\n",
|
113 |
+
"model_url = \"https://huggingface.co/andzhang01/Control_1.1/resolve/main/control_v11e_sd15_ip2p.pth\"\n",
|
114 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/extensions/sd-webui-controlnet/models\")"
|
115 |
+
]
|
116 |
+
},
|
117 |
+
{
|
118 |
+
"cell_type": "code",
|
119 |
+
"execution_count": null,
|
120 |
+
"id": "44cc3076-d1c9-4b4b-a2d3-0ad98191a698",
|
121 |
+
"metadata": {
|
122 |
+
"tags": []
|
123 |
+
},
|
124 |
+
"outputs": [],
|
125 |
+
"source": [
|
126 |
+
"##安装 inpaint(图像修补)模型\n",
|
127 |
+
"\n",
|
128 |
+
"def aria2(url, filename, d):\n",
|
129 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
130 |
+
"\n",
|
131 |
+
"model_url = \"https://huggingface.co/andzhang01/Control_1.1/resolve/main/control_v11p_sd15_inpaint.pth\"\n",
|
132 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/extensions/sd-webui-controlnet/models\")"
|
133 |
+
]
|
134 |
+
},
|
135 |
+
{
|
136 |
+
"cell_type": "code",
|
137 |
+
"execution_count": null,
|
138 |
+
"id": "8ccfcdd1-ae77-4cf2-9e71-796b8766af2d",
|
139 |
+
"metadata": {
|
140 |
+
"tags": []
|
141 |
+
},
|
142 |
+
"outputs": [],
|
143 |
+
"source": [
|
144 |
+
"##安装 tile(放大图像)模型\n",
|
145 |
+
"\n",
|
146 |
+
"def aria2(url, filename, d):\n",
|
147 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
148 |
+
"\n",
|
149 |
+
"model_url = \"https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11f1e_sd15_tile.pth\"\n",
|
150 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/extensions/sd-webui-controlnet/models\")"
|
151 |
+
]
|
152 |
+
},
|
153 |
+
{
|
154 |
+
"cell_type": "markdown",
|
155 |
+
"id": "383abdf0",
|
156 |
+
"metadata": {},
|
157 |
+
"source": [
|
158 |
+
"## 安装 Controlnet 预处理器模型"
|
159 |
+
]
|
160 |
+
},
|
161 |
+
{
|
162 |
+
"cell_type": "code",
|
163 |
+
"execution_count": null,
|
164 |
+
"id": "fc03a411-c192-4913-9409-d14e099d8004",
|
165 |
+
"metadata": {
|
166 |
+
"tags": []
|
167 |
+
},
|
168 |
+
"outputs": [],
|
169 |
+
"source": [
|
170 |
+
"##安装 Controlnet 1.1 人物动作检测预处理模型.hand_pose_model.pht\n",
|
171 |
+
"\n",
|
172 |
+
"def aria2(url, filename, d):\n",
|
173 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
174 |
+
"\n",
|
175 |
+
"model_url = \"https://huggingface.co/andzhang01/Controlnet_pt/resolve/main/hand_pose_model.pth\"\n",
|
176 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/openpose\")"
|
177 |
+
]
|
178 |
+
},
|
179 |
+
{
|
180 |
+
"cell_type": "code",
|
181 |
+
"execution_count": null,
|
182 |
+
"id": "30a616e9-3811-4101-8753-96719717eb1d",
|
183 |
+
"metadata": {
|
184 |
+
"tags": []
|
185 |
+
},
|
186 |
+
"outputs": [],
|
187 |
+
"source": [
|
188 |
+
"##安装 Controlnet 1.1 人物动作检测预处理模型.body_pose_model.pht\n",
|
189 |
+
"\n",
|
190 |
+
"def aria2(url, filename, d):\n",
|
191 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
192 |
+
"\n",
|
193 |
+
"model_url = \"https://huggingface.co/andzhang01/Controlnet_pt/resolve/main/body_pose_model.pth\"\n",
|
194 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/openpose\")"
|
195 |
+
]
|
196 |
+
},
|
197 |
+
{
|
198 |
+
"cell_type": "code",
|
199 |
+
"execution_count": null,
|
200 |
+
"id": "e2a51fd2-a4f3-4d79-99cc-669b34324334",
|
201 |
+
"metadata": {
|
202 |
+
"tags": []
|
203 |
+
},
|
204 |
+
"outputs": [],
|
205 |
+
"source": [
|
206 |
+
"##安装 Controlnet 1.1 深度图预处理模型.dpt_hybrid-midas-501f0c75.pt\n",
|
207 |
+
"\n",
|
208 |
+
"def aria2(url, filename, d):\n",
|
209 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
210 |
+
"\n",
|
211 |
+
"model_url = \"https://huggingface.co/andzhang01/Controlnet_pt/resolve/main/dpt_hybrid-midas-501f0c75.pt\"\n",
|
212 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/midas\")"
|
213 |
+
]
|
214 |
+
},
|
215 |
+
{
|
216 |
+
"cell_type": "markdown",
|
217 |
+
"id": "48846277-f449-46ce-8dc9-60cbccec1d3f",
|
218 |
+
"metadata": {},
|
219 |
+
"source": [
|
220 |
+
"## 图片预处理 处理器下载"
|
221 |
+
]
|
222 |
+
},
|
223 |
+
{
|
224 |
+
"cell_type": "code",
|
225 |
+
"execution_count": null,
|
226 |
+
"id": "73a6f4ae-e740-4452-88d0-8eee5d218861",
|
227 |
+
"metadata": {
|
228 |
+
"tags": []
|
229 |
+
},
|
230 |
+
"outputs": [],
|
231 |
+
"source": [
|
232 |
+
"##安装 图片预处理 处理器下载 model-resnet_custom_v3.pt\n",
|
233 |
+
"\n",
|
234 |
+
"def aria2(url, filename, d):\n",
|
235 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
236 |
+
"\n",
|
237 |
+
"model_url = \"https://huggingface.co/andzhang01/model-resnet_custom_v3/resolve/main/model-resnet_custom_v3.pt\"\n",
|
238 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/models/torch_deepdanbooru\")"
|
239 |
+
]
|
240 |
+
},
|
241 |
+
{
|
242 |
+
"cell_type": "markdown",
|
243 |
+
"id": "f3ffda5a-55d2-42e7-bd47-ca69f55ae5c9",
|
244 |
+
"metadata": {},
|
245 |
+
"source": [
|
246 |
+
"## 面部修复 预处理器下载"
|
247 |
+
]
|
248 |
+
},
|
249 |
+
{
|
250 |
+
"cell_type": "code",
|
251 |
+
"execution_count": null,
|
252 |
+
"id": "da223675-4c42-4808-8c42-14e141ec5297",
|
253 |
+
"metadata": {
|
254 |
+
"ExecutionIndicator": {
|
255 |
+
"show": true
|
256 |
+
},
|
257 |
+
"tags": []
|
258 |
+
},
|
259 |
+
"outputs": [],
|
260 |
+
"source": [
|
261 |
+
"##安装 面部修复 处理器下载 codeformer.pth\n",
|
262 |
+
"\n",
|
263 |
+
"def aria2(url, filename, d):\n",
|
264 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
265 |
+
"\n",
|
266 |
+
"model_url = \"https://huggingface.co/andzhang01/YCL_MODEL/resolve/main/codeformer.pth\"\n",
|
267 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/models/Codeformer\")"
|
268 |
+
]
|
269 |
+
},
|
270 |
+
{
|
271 |
+
"cell_type": "code",
|
272 |
+
"execution_count": null,
|
273 |
+
"id": "a8c1b0e8-605e-45ee-b377-ed4151f787e4",
|
274 |
+
"metadata": {
|
275 |
+
"ExecutionIndicator": {
|
276 |
+
"show": true
|
277 |
+
},
|
278 |
+
"tags": []
|
279 |
+
},
|
280 |
+
"outputs": [],
|
281 |
+
"source": [
|
282 |
+
"##安装 面部修复 处理器下载 detection_Resnet50_Final.pth\n",
|
283 |
+
"\n",
|
284 |
+
"def aria2(url, filename, d):\n",
|
285 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
286 |
+
"\n",
|
287 |
+
"model_url = \"https://huggingface.co/andzhang01/YCL_MODEL/resolve/main/detection_Resnet50_Final.pth\"\n",
|
288 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/repositories/CodeFormer/weights/facelib\")"
|
289 |
+
]
|
290 |
+
},
|
291 |
+
{
|
292 |
+
"cell_type": "code",
|
293 |
+
"execution_count": null,
|
294 |
+
"id": "042e15b8-0410-4fe7-85c3-de3258cf95a0",
|
295 |
+
"metadata": {
|
296 |
+
"ExecutionIndicator": {
|
297 |
+
"show": true
|
298 |
+
},
|
299 |
+
"tags": []
|
300 |
+
},
|
301 |
+
"outputs": [],
|
302 |
+
"source": [
|
303 |
+
"##安装 面部修复 处理器下载 parsing_parsenet.pth\n",
|
304 |
+
"\n",
|
305 |
+
"def aria2(url, filename, d):\n",
|
306 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
307 |
+
"\n",
|
308 |
+
"model_url = \"https://huggingface.co/andzhang01/YCL_MODEL/resolve/main/parsing_parsenet.pth\"\n",
|
309 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/repositories/CodeFormer/weights/facelib\")"
|
310 |
+
]
|
311 |
+
},
|
312 |
+
{
|
313 |
+
"cell_type": "markdown",
|
314 |
+
"id": "e1e5a90c-9aba-4af3-adc6-d6a6db22a6b2",
|
315 |
+
"metadata": {},
|
316 |
+
"source": [
|
317 |
+
"## 高清修复 预处理器下载"
|
318 |
+
]
|
319 |
+
},
|
320 |
+
{
|
321 |
+
"cell_type": "markdown",
|
322 |
+
"id": "d5ac67b4-02d1-40a5-88e4-a55632f3c6ff",
|
323 |
+
"metadata": {},
|
324 |
+
"source": [
|
325 |
+
"## 1. ESRGAN 模型"
|
326 |
+
]
|
327 |
+
},
|
328 |
+
{
|
329 |
+
"cell_type": "code",
|
330 |
+
"execution_count": null,
|
331 |
+
"id": "955b83f4-5029-43f8-8072-0eda82559fc1",
|
332 |
+
"metadata": {
|
333 |
+
"ExecutionIndicator": {
|
334 |
+
"show": true
|
335 |
+
},
|
336 |
+
"tags": []
|
337 |
+
},
|
338 |
+
"outputs": [],
|
339 |
+
"source": [
|
340 |
+
"##安装 高清修复 处理器下载 BSRGAN.pth\n",
|
341 |
+
"\n",
|
342 |
+
"def aria2(url, filename, d):\n",
|
343 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
344 |
+
"\n",
|
345 |
+
"model_url = \"https://huggingface.co/andzhang01/gaoqing_model/resolve/main/ESRGAN/BSRGAN.pth\"\n",
|
346 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/models/ESRGAN\")"
|
347 |
+
]
|
348 |
+
},
|
349 |
+
{
|
350 |
+
"cell_type": "code",
|
351 |
+
"execution_count": null,
|
352 |
+
"id": "b71e2a57-f4da-40b2-9f15-885cefe8a4c7",
|
353 |
+
"metadata": {
|
354 |
+
"ExecutionIndicator": {
|
355 |
+
"show": true
|
356 |
+
},
|
357 |
+
"tags": []
|
358 |
+
},
|
359 |
+
"outputs": [],
|
360 |
+
"source": [
|
361 |
+
"##安装 高清修复 处理器下载 ESRGAN_4x.pth\n",
|
362 |
+
"\n",
|
363 |
+
"def aria2(url, filename, d):\n",
|
364 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
365 |
+
"\n",
|
366 |
+
"model_url = \"https://huggingface.co/andzhang01/gaoqing_model/resolve/main/ESRGAN/ESRGAN_4x.pth\"\n",
|
367 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/models/ESRGAN\")"
|
368 |
+
]
|
369 |
+
},
|
370 |
+
{
|
371 |
+
"cell_type": "markdown",
|
372 |
+
"id": "b91c4b41-d257-40d3-bfc6-9d76029ca086",
|
373 |
+
"metadata": {},
|
374 |
+
"source": [
|
375 |
+
"## 2. GFPGAN 模型"
|
376 |
+
]
|
377 |
+
},
|
378 |
+
{
|
379 |
+
"cell_type": "code",
|
380 |
+
"execution_count": null,
|
381 |
+
"id": "b2f708ab-7d24-432c-805c-2c022cd6b24a",
|
382 |
+
"metadata": {
|
383 |
+
"ExecutionIndicator": {
|
384 |
+
"show": true
|
385 |
+
},
|
386 |
+
"tags": []
|
387 |
+
},
|
388 |
+
"outputs": [],
|
389 |
+
"source": [
|
390 |
+
"##安装 高清修复 处理器下载 detection_Resnet50_Final.pth\n",
|
391 |
+
"\n",
|
392 |
+
"def aria2(url, filename, d):\n",
|
393 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
394 |
+
"\n",
|
395 |
+
"model_url = \"https://huggingface.co/andzhang01/gaoqing_model/resolve/main/GFPGAN/GFPGANv1.4.pth\"\n",
|
396 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/models/GFPGAN\")"
|
397 |
+
]
|
398 |
+
},
|
399 |
+
{
|
400 |
+
"cell_type": "code",
|
401 |
+
"execution_count": null,
|
402 |
+
"id": "14363eea-31cd-42e6-a3d1-5766bb004c8d",
|
403 |
+
"metadata": {
|
404 |
+
"ExecutionIndicator": {
|
405 |
+
"show": true
|
406 |
+
},
|
407 |
+
"tags": []
|
408 |
+
},
|
409 |
+
"outputs": [],
|
410 |
+
"source": [
|
411 |
+
"##安装 高清修复 处理器下载 ESRGAN.pth\n",
|
412 |
+
"\n",
|
413 |
+
"def aria2(url, filename, d):\n",
|
414 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
415 |
+
"\n",
|
416 |
+
"model_url = \"https://huggingface.co/andzhang01/gaoqing_model/resolve/main/GFPGAN/detection_Resnet50_Final.pth\"\n",
|
417 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/models/GFPGAN\")"
|
418 |
+
]
|
419 |
+
},
|
420 |
+
{
|
421 |
+
"cell_type": "code",
|
422 |
+
"execution_count": null,
|
423 |
+
"id": "07dcb915-c96e-464f-88a7-faabc093eb04",
|
424 |
+
"metadata": {
|
425 |
+
"ExecutionIndicator": {
|
426 |
+
"show": true
|
427 |
+
},
|
428 |
+
"tags": []
|
429 |
+
},
|
430 |
+
"outputs": [],
|
431 |
+
"source": [
|
432 |
+
"##安装 高清修复 处理器下载 parsing_parsenet.pth\n",
|
433 |
+
"\n",
|
434 |
+
"def aria2(url, filename, d):\n",
|
435 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
436 |
+
"\n",
|
437 |
+
"model_url = \"https://huggingface.co/andzhang01/gaoqing_model/resolve/main/GFPGAN/parsing_parsenet.pth\"\n",
|
438 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/models/GFPGAN\")"
|
439 |
+
]
|
440 |
+
},
|
441 |
+
{
|
442 |
+
"cell_type": "markdown",
|
443 |
+
"id": "8ff644d1-e91d-4921-912a-ba76e2a49ac7",
|
444 |
+
"metadata": {},
|
445 |
+
"source": [
|
446 |
+
"## 3. RealESRGAN 模型"
|
447 |
+
]
|
448 |
+
},
|
449 |
+
{
|
450 |
+
"cell_type": "code",
|
451 |
+
"execution_count": null,
|
452 |
+
"id": "a2d51859-c420-424c-bbaf-623915268e94",
|
453 |
+
"metadata": {
|
454 |
+
"ExecutionIndicator": {
|
455 |
+
"show": true
|
456 |
+
},
|
457 |
+
"tags": []
|
458 |
+
},
|
459 |
+
"outputs": [],
|
460 |
+
"source": [
|
461 |
+
"##安装 高清修复 处理器下载 RealESRGAN_x4plus.pth\n",
|
462 |
+
"\n",
|
463 |
+
"def aria2(url, filename, d):\n",
|
464 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
465 |
+
"\n",
|
466 |
+
"model_url = \"https://huggingface.co/andzhang01/gaoqing_model/resolve/main/RealESRGAN/RealESRGAN_x4plus.pth\"\n",
|
467 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/models/RealESRGAN\")"
|
468 |
+
]
|
469 |
+
},
|
470 |
+
{
|
471 |
+
"cell_type": "code",
|
472 |
+
"execution_count": null,
|
473 |
+
"id": "e34a9f3b-c4ff-4351-abe7-0907b317f6d1",
|
474 |
+
"metadata": {
|
475 |
+
"ExecutionIndicator": {
|
476 |
+
"show": true
|
477 |
+
},
|
478 |
+
"tags": []
|
479 |
+
},
|
480 |
+
"outputs": [],
|
481 |
+
"source": [
|
482 |
+
"##安装 高清修复 处理器下载 RealESRGAN_x4plus_anime_6B.pth\n",
|
483 |
+
"\n",
|
484 |
+
"def aria2(url, filename, d):\n",
|
485 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
486 |
+
"\n",
|
487 |
+
"model_url = \"https://huggingface.co/andzhang01/gaoqing_model/resolve/main/RealESRGAN/RealESRGAN_x4plus_anime_6B.pth\"\n",
|
488 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/models/RealESRGAN\")"
|
489 |
+
]
|
490 |
+
},
|
491 |
+
{
|
492 |
+
"cell_type": "markdown",
|
493 |
+
"id": "b789a9d0-fbd4-480e-bf7d-ae851987e5d0",
|
494 |
+
"metadata": {},
|
495 |
+
"source": [
|
496 |
+
"## 4. ScuNET 模型"
|
497 |
+
]
|
498 |
+
},
|
499 |
+
{
|
500 |
+
"cell_type": "code",
|
501 |
+
"execution_count": null,
|
502 |
+
"id": "fbe56093-6406-4e29-8e0b-62f46dab7a37",
|
503 |
+
"metadata": {
|
504 |
+
"ExecutionIndicator": {
|
505 |
+
"show": true
|
506 |
+
},
|
507 |
+
"tags": []
|
508 |
+
},
|
509 |
+
"outputs": [],
|
510 |
+
"source": [
|
511 |
+
"##安装 高清修复 处理器下载 ScuNET.pth\n",
|
512 |
+
"\n",
|
513 |
+
"def aria2(url, filename, d):\n",
|
514 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
515 |
+
"\n",
|
516 |
+
"model_url = \"https://huggingface.co/andzhang01/gaoqing_model/resolve/main/ScuNET/ScuNET.pth\"\n",
|
517 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/models/ScuNET\")"
|
518 |
+
]
|
519 |
+
},
|
520 |
+
{
|
521 |
+
"cell_type": "markdown",
|
522 |
+
"id": "3489fe69-1575-4829-aa08-2da15c3445ba",
|
523 |
+
"metadata": {},
|
524 |
+
"source": [
|
525 |
+
"## 5. SwinIR 模型"
|
526 |
+
]
|
527 |
+
},
|
528 |
+
{
|
529 |
+
"cell_type": "code",
|
530 |
+
"execution_count": null,
|
531 |
+
"id": "1bd4d97a-c6e2-42ef-a932-28e799cf1fae",
|
532 |
+
"metadata": {
|
533 |
+
"ExecutionIndicator": {
|
534 |
+
"show": true
|
535 |
+
},
|
536 |
+
"tags": []
|
537 |
+
},
|
538 |
+
"outputs": [],
|
539 |
+
"source": [
|
540 |
+
"##安装 高清修复 处理器下载 ESRGAN.pth\n",
|
541 |
+
"\n",
|
542 |
+
"def aria2(url, filename, d):\n",
|
543 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
544 |
+
"\n",
|
545 |
+
"model_url = \"https://huggingface.co/andzhang01/YCL_MODEL/resolve/main/ESRGAN.pth\"\n",
|
546 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/models/SwinIR\")"
|
547 |
+
]
|
548 |
+
},
|
549 |
+
{
|
550 |
+
"cell_type": "markdown",
|
551 |
+
"id": "b261a21d-a008-476d-b4e4-23946de36e25",
|
552 |
+
"metadata": {},
|
553 |
+
"source": [
|
554 |
+
"## 6. torch_deepdanbooru 模型"
|
555 |
+
]
|
556 |
+
},
|
557 |
+
{
|
558 |
+
"cell_type": "code",
|
559 |
+
"execution_count": null,
|
560 |
+
"id": "b714bf2d-1252-41be-9b10-d39926e42a79",
|
561 |
+
"metadata": {
|
562 |
+
"ExecutionIndicator": {
|
563 |
+
"show": true
|
564 |
+
},
|
565 |
+
"tags": []
|
566 |
+
},
|
567 |
+
"outputs": [],
|
568 |
+
"source": [
|
569 |
+
"##安装 高清修复 处理器下载 ESRGAN.pth\n",
|
570 |
+
"\n",
|
571 |
+
"def aria2(url, filename, d):\n",
|
572 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
573 |
+
"\n",
|
574 |
+
"model_url = \"https://huggingface.co/andzhang01/gaoqing_model/resolve/main/torch_deepdanbooru/model-resnet_custom_v3.pt\"\n",
|
575 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/models/torch_deepdanbooru\")"
|
576 |
+
]
|
577 |
+
},
|
578 |
+
{
|
579 |
+
"cell_type": "markdown",
|
580 |
+
"id": "c51506b2-c438-4c35-af25-350fdefa325b",
|
581 |
+
"metadata": {},
|
582 |
+
"source": [
|
583 |
+
"## 安装 segment anything 插件模型"
|
584 |
+
]
|
585 |
+
},
|
586 |
+
{
|
587 |
+
"cell_type": "code",
|
588 |
+
"execution_count": null,
|
589 |
+
"id": "57afa4a3-4c48-4d6d-8741-61a341818dc9",
|
590 |
+
"metadata": {
|
591 |
+
"ExecutionIndicator": {
|
592 |
+
"show": true
|
593 |
+
},
|
594 |
+
"tags": []
|
595 |
+
},
|
596 |
+
"outputs": [],
|
597 |
+
"source": [
|
598 |
+
"##安装 segment any thing sam_vit_h_4b8939.pth\n",
|
599 |
+
"\n",
|
600 |
+
"def aria2(url, filename, d):\n",
|
601 |
+
" !aria2c --console-log-level=error -c -x 16 -s 16 {url} -o {filename} -d {d}\n",
|
602 |
+
"\n",
|
603 |
+
"model_url = \"https://huggingface.co/andzhang01/segment_anything/resolve/main/sam_vit_h_4b8939.pth\"\n",
|
604 |
+
"aria2(model_url, model_url.split(\"/\")[-1], \"/mnt/workspace/stable-diffusion-webui/extensions/sd-webui-segment-anything/models/sam\")"
|
605 |
+
]
|
606 |
+
}
|
607 |
+
],
|
608 |
+
"metadata": {
|
609 |
+
"kernelspec": {
|
610 |
+
"display_name": "Python 3 (ipykernel)",
|
611 |
+
"language": "python",
|
612 |
+
"name": "python3"
|
613 |
+
},
|
614 |
+
"language_info": {
|
615 |
+
"codemirror_mode": {
|
616 |
+
"name": "ipython",
|
617 |
+
"version": 3
|
618 |
+
},
|
619 |
+
"file_extension": ".py",
|
620 |
+
"mimetype": "text/x-python",
|
621 |
+
"name": "python",
|
622 |
+
"nbconvert_exporter": "python",
|
623 |
+
"pygments_lexer": "ipython3",
|
624 |
+
"version": "3.10.6"
|
625 |
+
}
|
626 |
+
},
|
627 |
+
"nbformat": 4,
|
628 |
+
"nbformat_minor": 5
|
629 |
+
}
|