Update BuShu.py
Browse files
BuShu.py
CHANGED
|
@@ -122,7 +122,7 @@ print ("开始安装插件...")
|
|
| 122 |
def run_git_clone(repo_url, destination):
|
| 123 |
subprocess.run(["git", "clone", repo_url, destination])
|
| 124 |
|
| 125 |
-
extensions_path = "/content/drive/
|
| 126 |
|
| 127 |
extensions_to_clone = [
|
| 128 |
(f"https://github.com/deforum-art/deforum-for-automatic1111-{w}", f"{extensions_path}/deforum-for-automatic1111-{w}"),
|
|
@@ -176,51 +176,51 @@ T2I_ = True
|
|
| 176 |
|
| 177 |
# CN
|
| 178 |
if CONTROLNET_:
|
| 179 |
-
os.makedirs('/content/drive/
|
| 180 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_ip2p_fp16.safetensors', '/content/drive/
|
| 181 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_shuffle_fp16.safetensors', '/content/drive/
|
| 182 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_canny_fp16.safetensors', '/content/drive/
|
| 183 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1p_sd15_depth_fp16.safetensors', '/content/drive/
|
| 184 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_inpaint_fp16.safetensors', '/content/drive/
|
| 185 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_lineart_fp16.safetensors', '/content/drive/
|
| 186 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_mlsd_fp16.safetensors', '/content/drive/
|
| 187 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_normalbae_fp16.safetensors', '/content/drive/
|
| 188 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_openpose_fp16.safetensors', '/content/drive/
|
| 189 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_scribble_fp16.safetensors', '/content/drive/
|
| 190 |
-
#wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_seg_fp16.safetensors', '/content/drive/
|
| 191 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_softedge_fp16.safetensors', '/content/drive/
|
| 192 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15s2_lineart_anime_fp16.safetensors', '/content/drive/
|
| 193 |
-
#wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_tile_fp16.yaml', '/content/drive/
|
| 194 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_ip2p_fp16.yaml', '/content/drive/
|
| 195 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_shuffle_fp16.yaml', '/content/drive/
|
| 196 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_canny_fp16.yaml', '/content/drive/
|
| 197 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11f1p_sd15_depth_fp16.yaml', '/content/drive/
|
| 198 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_inpaint_fp16.yaml', '/content/drive/
|
| 199 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_lineart_fp16.yaml', '/content/drive/
|
| 200 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_mlsd_fp16.yaml', '/content/drive/
|
| 201 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_normalbae_fp16.yaml', '/content/drive/
|
| 202 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_openpose_fp16.yaml', '/content/drive/
|
| 203 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_scribble_fp16.yaml', '/content/drive/
|
| 204 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_seg_fp16.yaml', '/content/drive/
|
| 205 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_softedge_fp16.yaml', '/content/drive/
|
| 206 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15s2_lineart_anime_fp16.yaml', '/content/drive/
|
| 207 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11f1e_sd15_tile_fp16.yaml', '/content/drive/
|
| 208 |
|
| 209 |
# T2I
|
| 210 |
if T2I_:
|
| 211 |
-
os.makedirs('/content/drive/
|
| 212 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_style_sd14v1.pth', '/content/drive/
|
| 213 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_sketch_sd14v1.pth', '/content/drive/
|
| 214 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_seg_sd14v1.pth', '/content/drive/
|
| 215 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_openpose_sd14v1.pth', '/content/drive/
|
| 216 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_keypose_sd14v1.pth', '/content/drive/
|
| 217 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_depth_sd14v1.pth', '/content/drive/
|
| 218 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_color_sd14v1.pth', '/content/drive/
|
| 219 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_canny_sd14v1.pth', '/content/drive/
|
| 220 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_canny_sd15v2.pth', '/content/drive/
|
| 221 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_depth_sd15v2.pth', '/content/drive/
|
| 222 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_sketch_sd15v2.pth', '/content/drive/
|
| 223 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_zoedepth_sd15v1.pth', '/content/drive/
|
| 224 |
|
| 225 |
|
| 226 |
|
|
@@ -230,7 +230,7 @@ if T2I_:
|
|
| 230 |
print ("开始下载Checkpoints/safetensors等大模型")
|
| 231 |
# Checkpoints/safetensors等大模型下载
|
| 232 |
# 下载任务1
|
| 233 |
-
CS_destination_folder1 = f"/content/drive/
|
| 234 |
CS_target1 = f"{CS_destination_folder1}/{CS_filename1}"
|
| 235 |
|
| 236 |
if CS_download1:
|
|
@@ -240,7 +240,7 @@ if CS_download1:
|
|
| 240 |
f.write(response.content)
|
| 241 |
|
| 242 |
# 下载任务2
|
| 243 |
-
CS_destination_folder2 = f"/content/drive/
|
| 244 |
CS_target2 = f"{CS_destination_folder2}/{CS_filename2}"
|
| 245 |
|
| 246 |
if CS_download2:
|
|
@@ -250,7 +250,7 @@ if CS_download2:
|
|
| 250 |
f.write(response.content)
|
| 251 |
|
| 252 |
# 下载任务3
|
| 253 |
-
CS_destination_folder3 = f"/content/drive/
|
| 254 |
CS_target3 = f"{CS_destination_folder3}/{CS_filename3}"
|
| 255 |
|
| 256 |
if CS_download3:
|
|
@@ -260,7 +260,7 @@ if CS_download3:
|
|
| 260 |
f.write(response.content)
|
| 261 |
|
| 262 |
# 下载任务4
|
| 263 |
-
CS_destination_folder4 = f"/content/drive/
|
| 264 |
CS_target4 = f"{CS_destination_folder4}/{CS_filename4}"
|
| 265 |
|
| 266 |
if CS_download4:
|
|
@@ -270,7 +270,7 @@ if CS_download4:
|
|
| 270 |
f.write(response.content)
|
| 271 |
|
| 272 |
# 下载任务5
|
| 273 |
-
CS_destination_folder5 = f"/content/drive/
|
| 274 |
CS_target5 = f"{CS_destination_folder5}/{CS_filename5}"
|
| 275 |
|
| 276 |
if CS_download5:
|
|
@@ -280,7 +280,7 @@ if CS_download5:
|
|
| 280 |
f.write(response.content)
|
| 281 |
|
| 282 |
# 下载任务6
|
| 283 |
-
CS_destination_folder6 = f"/content/drive/
|
| 284 |
CS_target6 = f"{CS_destination_folder6}/{CS_filename6}"
|
| 285 |
|
| 286 |
if CS_download6:
|
|
@@ -290,7 +290,7 @@ if CS_download6:
|
|
| 290 |
f.write(response.content)
|
| 291 |
|
| 292 |
# 下载任务7
|
| 293 |
-
CS_destination_folder7 = f"/content/drive/
|
| 294 |
CS_target7 = f"{CS_destination_folder7}/{CS_filename7}"
|
| 295 |
|
| 296 |
if CS_download7:
|
|
@@ -300,7 +300,7 @@ if CS_download7:
|
|
| 300 |
f.write(response.content)
|
| 301 |
|
| 302 |
# 下载任务8
|
| 303 |
-
CS_destination_folder8 = f"/content/drive/
|
| 304 |
CS_target8 = f"{CS_destination_folder8}/{CS_filename8}"
|
| 305 |
|
| 306 |
if CS_download8:
|
|
@@ -310,7 +310,7 @@ if CS_download8:
|
|
| 310 |
f.write(response.content)
|
| 311 |
|
| 312 |
# 下载任务9
|
| 313 |
-
CS_destination_folder9 = f"/content/drive/
|
| 314 |
CS_target9 = f"{CS_destination_folder9}/{CS_filename9}"
|
| 315 |
|
| 316 |
if CS_download9:
|
|
@@ -320,7 +320,7 @@ if CS_download9:
|
|
| 320 |
f.write(response.content)
|
| 321 |
|
| 322 |
# 下载任务10
|
| 323 |
-
CS_destination_folder10 = f"/content/drive/
|
| 324 |
CS_target10 = f"{CS_destination_folder10}/{CS_filename10}"
|
| 325 |
|
| 326 |
if CS_download10:
|
|
@@ -330,7 +330,7 @@ if CS_download10:
|
|
| 330 |
f.write(response.content)
|
| 331 |
|
| 332 |
# 下载任务11
|
| 333 |
-
CS_destination_folder11 = f"/content/drive/
|
| 334 |
CS_target11 = f"{CS_destination_folder11}/{CS_filename11}"
|
| 335 |
|
| 336 |
if CS_download11:
|
|
@@ -340,7 +340,7 @@ if CS_download11:
|
|
| 340 |
f.write(response.content)
|
| 341 |
|
| 342 |
# 下载任务12
|
| 343 |
-
CS_destination_folder12 = f"/content/drive/
|
| 344 |
CS_target12 = f"{CS_destination_folder12}/{CS_filename12}"
|
| 345 |
|
| 346 |
if CS_download12:
|
|
@@ -350,7 +350,7 @@ if CS_download12:
|
|
| 350 |
f.write(response.content)
|
| 351 |
|
| 352 |
# 下载任务13
|
| 353 |
-
CS_destination_folder13 = f"/content/drive/
|
| 354 |
CS_target13 = f"{CS_destination_folder13}/{CS_filename13}"
|
| 355 |
|
| 356 |
if CS_download13:
|
|
@@ -364,7 +364,7 @@ if CS_download13:
|
|
| 364 |
|
| 365 |
print("开始下载Lora模型")
|
| 366 |
# Lora任务1
|
| 367 |
-
Lora_destination_folder1 = "/content/drive/
|
| 368 |
Lora_target1 = os.path.join(Lora_destination_folder1, Lora_filename1)
|
| 369 |
|
| 370 |
if Lora_download1:
|
|
@@ -374,7 +374,7 @@ if Lora_download1:
|
|
| 374 |
f.write(response.content)
|
| 375 |
|
| 376 |
# Lora任务2
|
| 377 |
-
Lora_destination_folder2 = "/content/drive/
|
| 378 |
Lora_target2 = os.path.join(Lora_destination_folder2, Lora_filename2)
|
| 379 |
|
| 380 |
if Lora_download2:
|
|
@@ -384,7 +384,7 @@ if Lora_download2:
|
|
| 384 |
f.write(response.content)
|
| 385 |
|
| 386 |
# Lora任务3
|
| 387 |
-
Lora_destination_folder3 = "/content/drive/
|
| 388 |
Lora_target3 = os.path.join(Lora_destination_folder3, Lora_filename3)
|
| 389 |
|
| 390 |
if Lora_download3:
|
|
@@ -428,7 +428,7 @@ if Lora_download6:
|
|
| 428 |
|
| 429 |
print ("开始下载VAE模型")
|
| 430 |
# VAE任务1
|
| 431 |
-
VAE_destination_folder1 = "/content/drive/
|
| 432 |
VAE_target1 = f"{VAE_destination_folder1}/{VAE_filename1}"
|
| 433 |
|
| 434 |
if VAE_download1:
|
|
@@ -437,7 +437,7 @@ if VAE_download1:
|
|
| 437 |
file.write(response.content)
|
| 438 |
|
| 439 |
# VAE任务2
|
| 440 |
-
VAE_destination_folder2 = "/content/drive/
|
| 441 |
VAE_target2 = f"{VAE_destination_folder2}/{VAE_filename2}"
|
| 442 |
|
| 443 |
if VAE_download2:
|
|
@@ -446,7 +446,7 @@ if VAE_download2:
|
|
| 446 |
file.write(response.content)
|
| 447 |
|
| 448 |
# VAE任务3
|
| 449 |
-
VAE_destination_folder3 = "/content/drive/
|
| 450 |
VAE_target3 = f"{VAE_destination_folder3}/{VAE_filename3}"
|
| 451 |
|
| 452 |
if VAE_download3:
|
|
@@ -455,7 +455,7 @@ if VAE_download3:
|
|
| 455 |
file.write(response.content)
|
| 456 |
|
| 457 |
# VAE任务4
|
| 458 |
-
VAE_destination_folder4 = "/content/drive/
|
| 459 |
VAE_target4 = f"{VAE_destination_folder4}/{VAE_filename4}"
|
| 460 |
|
| 461 |
if VAE_download4:
|
|
@@ -464,7 +464,7 @@ if VAE_download4:
|
|
| 464 |
file.write(response.content)
|
| 465 |
|
| 466 |
# VAE任务5
|
| 467 |
-
VAE_destination_folder5 = "/content/drive/
|
| 468 |
VAE_target5 = f"{VAE_destination_folder5}/{VAE_filename5}"
|
| 469 |
|
| 470 |
if VAE_download5:
|
|
@@ -473,7 +473,7 @@ if VAE_download5:
|
|
| 473 |
file.write(response.content)
|
| 474 |
|
| 475 |
# VAE任务6
|
| 476 |
-
VAE_destination_folder6 = "/content/drive/
|
| 477 |
VAE_target6 = f"{VAE_destination_folder6}/{VAE_filename6}"
|
| 478 |
|
| 479 |
if VAE_download6:
|
|
@@ -482,7 +482,7 @@ if VAE_download6:
|
|
| 482 |
file.write(response.content)
|
| 483 |
|
| 484 |
# VAE任务7
|
| 485 |
-
VAE_destination_folder7 = "/content/drive/
|
| 486 |
VAE_target7 = f"{VAE_destination_folder7}/{VAE_filename7}"
|
| 487 |
|
| 488 |
if VAE_download7:
|
|
@@ -491,7 +491,7 @@ if VAE_download7:
|
|
| 491 |
file.write(response.content)
|
| 492 |
|
| 493 |
# VAE任务8
|
| 494 |
-
VAE_destination_folder8 = "/content/drive/
|
| 495 |
VAE_target8 = f"{VAE_destination_folder8}/{VAE_filename8}"
|
| 496 |
|
| 497 |
if VAE_download8:
|
|
@@ -500,7 +500,7 @@ if VAE_download8:
|
|
| 500 |
file.write(response.content)
|
| 501 |
|
| 502 |
# VAE任务9
|
| 503 |
-
VAE_destination_folder9 = "/content/drive/
|
| 504 |
VAE_target9 = f"{VAE_destination_folder9}/{VAE_filename9}"
|
| 505 |
|
| 506 |
if VAE_download9:
|
|
@@ -509,7 +509,7 @@ if VAE_download9:
|
|
| 509 |
file.write(response.content)
|
| 510 |
|
| 511 |
# VAE任务10
|
| 512 |
-
VAE_destination_folder10 = "/content/drive/
|
| 513 |
VAE_target10 = f"{VAE_destination_folder10}/{VAE_filename10}"
|
| 514 |
|
| 515 |
if VAE_download10:
|
|
@@ -518,7 +518,7 @@ if VAE_download10:
|
|
| 518 |
file.write(response.content)
|
| 519 |
|
| 520 |
# VAE任务11
|
| 521 |
-
VAE_destination_folder11 = "/content/drive/
|
| 522 |
VAE_target11 = f"{VAE_destination_folder11}/{VAE_filename11}"
|
| 523 |
|
| 524 |
if VAE_download11:
|
|
@@ -527,7 +527,7 @@ if VAE_download11:
|
|
| 527 |
file.write(response.content)
|
| 528 |
|
| 529 |
# VAE任务12
|
| 530 |
-
VAE_destination_folder12 = "/content/drive/
|
| 531 |
VAE_target12 = f"{VAE_destination_folder12}/{VAE_filename12}"
|
| 532 |
|
| 533 |
if VAE_download12:
|
|
@@ -536,7 +536,7 @@ if VAE_download12:
|
|
| 536 |
file.write(response.content)
|
| 537 |
|
| 538 |
# VAE任务13
|
| 539 |
-
VAE_destination_folder13 = "/content/drive/
|
| 540 |
VAE_target13 = f"{VAE_destination_folder13}/{VAE_filename13}"
|
| 541 |
|
| 542 |
if VAE_download13:
|
|
@@ -549,7 +549,7 @@ if VAE_download13:
|
|
| 549 |
|
| 550 |
print ("开始下载embeddings模型")
|
| 551 |
# 下载任务1
|
| 552 |
-
embeddings_destination_folder1 = "/content/drive/
|
| 553 |
embeddings_target1 = f'{embeddings_destination_folder1}/{embeddings_filename1}'
|
| 554 |
|
| 555 |
if embeddings_download1:
|
|
@@ -559,7 +559,7 @@ if embeddings_download1:
|
|
| 559 |
file.write(response.content)
|
| 560 |
|
| 561 |
# 下载任务2
|
| 562 |
-
embeddings_destination_folder2 = "/content/drive/
|
| 563 |
embeddings_target2 = f'{embeddings_destination_folder2}/{embeddings_filename2}'
|
| 564 |
|
| 565 |
if embeddings_download2:
|
|
@@ -569,7 +569,7 @@ if embeddings_download2:
|
|
| 569 |
file.write(response.content)
|
| 570 |
|
| 571 |
# 下载任务3
|
| 572 |
-
embeddings_destination_folder3 = "/content/drive/
|
| 573 |
embeddings_target3 = f'{embeddings_destination_folder3}/{embeddings_filename3}'
|
| 574 |
|
| 575 |
if embeddings_download3:
|
|
@@ -579,7 +579,7 @@ if embeddings_download3:
|
|
| 579 |
file.write(response.content)
|
| 580 |
|
| 581 |
# 下载任务4
|
| 582 |
-
embeddings_destination_folder4 = "/content/drive/
|
| 583 |
embeddings_target4 = f'{embeddings_destination_folder4}/{embeddings_filename4}'
|
| 584 |
|
| 585 |
if embeddings_download4:
|
|
@@ -589,7 +589,7 @@ if embeddings_download4:
|
|
| 589 |
file.write(response.content)
|
| 590 |
|
| 591 |
# 下载任务5
|
| 592 |
-
embeddings_destination_folder5 = "/content/drive/
|
| 593 |
embeddings_target5 = f'{embeddings_destination_folder5}/{embeddings_filename5}'
|
| 594 |
|
| 595 |
if embeddings_download5:
|
|
|
|
| 122 |
def run_git_clone(repo_url, destination):
|
| 123 |
subprocess.run(["git", "clone", repo_url, destination])
|
| 124 |
|
| 125 |
+
extensions_path = "/content/drive/MyDrive/lite_colab/extensions"
|
| 126 |
|
| 127 |
extensions_to_clone = [
|
| 128 |
(f"https://github.com/deforum-art/deforum-for-automatic1111-{w}", f"{extensions_path}/deforum-for-automatic1111-{w}"),
|
|
|
|
| 176 |
|
| 177 |
# CN
|
| 178 |
if CONTROLNET_:
|
| 179 |
+
os.makedirs('/content/drive/MyDrive/lite_colab/extensions/control/models', exist_ok=True)
|
| 180 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_ip2p_fp16.safetensors', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11e_sd15_ip2p_fp16.safetensors')
|
| 181 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_shuffle_fp16.safetensors', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11e_sd15_shuffle_fp16.safetensors')
|
| 182 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_canny_fp16.safetensors', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15_canny_fp16.safetensors')
|
| 183 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1p_sd15_depth_fp16.safetensors', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11f1p_sd15_depth_fp16.safetensors')
|
| 184 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_inpaint_fp16.safetensors', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15_inpaint_fp16.safetensors')
|
| 185 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_lineart_fp16.safetensors', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15_lineart_fp16.safetensors')
|
| 186 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_mlsd_fp16.safetensors', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15_mlsd_fp16.safetensors')
|
| 187 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_normalbae_fp16.safetensors', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15_normalbae_fp16.safetensors')
|
| 188 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_openpose_fp16.safetensors', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15_openpose_fp16.safetensors')
|
| 189 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_scribble_fp16.safetensors', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15_scribble_fp16.safetensors')
|
| 190 |
+
#wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_seg_fp16.safetensors', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15_seg_fp16.safetensors')
|
| 191 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_softedge_fp16.safetensors', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15_softedge_fp16.safetensors')
|
| 192 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15s2_lineart_anime_fp16.safetensors', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15s2_lineart_anime_fp16.safetensors')
|
| 193 |
+
#wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_tile_fp16.yaml', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11e_sd15_tile_fp16.yaml')
|
| 194 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_ip2p_fp16.yaml', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11e_sd15_ip2p_fp16.yaml')
|
| 195 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_shuffle_fp16.yaml', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11e_sd15_shuffle_fp16.yaml')
|
| 196 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_canny_fp16.yaml', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15_canny_fp16.yaml')
|
| 197 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11f1p_sd15_depth_fp16.yaml', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11f1p_sd15_depth_fp16.yaml')
|
| 198 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_inpaint_fp16.yaml', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15_inpaint_fp16.yaml')
|
| 199 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_lineart_fp16.yaml', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15_lineart_fp16.yaml')
|
| 200 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_mlsd_fp16.yaml', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15_mlsd_fp16.yaml')
|
| 201 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_normalbae_fp16.yaml', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15_normalbae_fp16.yaml')
|
| 202 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_openpose_fp16.yaml', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15_openpose_fp16.yaml')
|
| 203 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_scribble_fp16.yaml', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15_scribble_fp16.yaml')
|
| 204 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_seg_fp16.yaml', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15_seg_fp16.yaml')
|
| 205 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_softedge_fp16.yaml', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15_softedge_fp16.yaml')
|
| 206 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15s2_lineart_anime_fp16.yaml', '/content/drive/MyDrive/lite_colab/extensions/control/models/control_v11p_sd15s2_lineart_anime_fp16.yaml')
|
| 207 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11f1e_sd15_tile_fp16.yaml', '/content/drive/MyDrive/lite_colab/extensions/control/models')
|
| 208 |
|
| 209 |
# T2I
|
| 210 |
if T2I_:
|
| 211 |
+
os.makedirs('/content/drive/MyDrive/lite_colab/extensions/control/models', exist_ok=True)
|
| 212 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_style_sd14v1.pth', '/content/drive/MyDrive/lite_colab/extensions/control/models/t2iadapter_style_sd14v1.pth')
|
| 213 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_sketch_sd14v1.pth', '/content/drive/MyDrive/lite_colab/extensions/control/models/t2iadapter_sketch_sd14v1.pth')
|
| 214 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_seg_sd14v1.pth', '/content/drive/MyDrive/lite_colab/extensions/control/models/t2iadapter_seg_sd14v1.pth')
|
| 215 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_openpose_sd14v1.pth', '/content/drive/MyDrive/lite_colab/extensions/control/models/t2iadapter_openpose_sd14v1.pth')
|
| 216 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_keypose_sd14v1.pth', '/content/drive/MyDrive/lite_colab/extensions/control/models/t2iadapter_keypose_sd14v1.pth')
|
| 217 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_depth_sd14v1.pth', '/content/drive/MyDrive/lite_colab/extensions/control/models/t2iadapter_depth_sd14v1.pth')
|
| 218 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_color_sd14v1.pth', '/content/drive/MyDrive/lite_colab/extensions/control/models/t2iadapter_color_sd14v1.pth')
|
| 219 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_canny_sd14v1.pth', '/content/drive/MyDrive/lite_colab/extensions/control/models/t2iadapter_canny_sd14v1.pth')
|
| 220 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_canny_sd15v2.pth', '/content/drive/MyDrive/lite_colab/extensions/control/models/t2iadapter_canny_sd15v2.pth')
|
| 221 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_depth_sd15v2.pth', '/content/drive/MyDrive/lite_colab/extensions/control/models/t2iadapter_depth_sd15v2.pth')
|
| 222 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_sketch_sd15v2.pth', '/content/drive/MyDrive/lite_colab/extensions/control/models/t2iadapter_sketch_sd15v2.pth')
|
| 223 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_zoedepth_sd15v1.pth', '/content/drive/MyDrive/lite_colab/extensions/control/models/t2iadapter_zoedepth_sd15v1.pth')
|
| 224 |
|
| 225 |
|
| 226 |
|
|
|
|
| 230 |
print ("开始下载Checkpoints/safetensors等大模型")
|
| 231 |
# Checkpoints/safetensors等大模型下载
|
| 232 |
# 下载任务1
|
| 233 |
+
CS_destination_folder1 = f"/content/drive/MyDrive/lite_colab/models/Stable-diffusion"
|
| 234 |
CS_target1 = f"{CS_destination_folder1}/{CS_filename1}"
|
| 235 |
|
| 236 |
if CS_download1:
|
|
|
|
| 240 |
f.write(response.content)
|
| 241 |
|
| 242 |
# 下载任务2
|
| 243 |
+
CS_destination_folder2 = f"/content/drive/MyDrive/lite_colab/models/Stable-diffusion"
|
| 244 |
CS_target2 = f"{CS_destination_folder2}/{CS_filename2}"
|
| 245 |
|
| 246 |
if CS_download2:
|
|
|
|
| 250 |
f.write(response.content)
|
| 251 |
|
| 252 |
# 下载任务3
|
| 253 |
+
CS_destination_folder3 = f"/content/drive/MyDrive/lite_colab/models/Stable-diffusion"
|
| 254 |
CS_target3 = f"{CS_destination_folder3}/{CS_filename3}"
|
| 255 |
|
| 256 |
if CS_download3:
|
|
|
|
| 260 |
f.write(response.content)
|
| 261 |
|
| 262 |
# 下载任务4
|
| 263 |
+
CS_destination_folder4 = f"/content/drive/MyDrive/lite_colab/models/Stable-diffusion"
|
| 264 |
CS_target4 = f"{CS_destination_folder4}/{CS_filename4}"
|
| 265 |
|
| 266 |
if CS_download4:
|
|
|
|
| 270 |
f.write(response.content)
|
| 271 |
|
| 272 |
# 下载任务5
|
| 273 |
+
CS_destination_folder5 = f"/content/drive/MyDrive/lite_colab/models/Stable-diffusion"
|
| 274 |
CS_target5 = f"{CS_destination_folder5}/{CS_filename5}"
|
| 275 |
|
| 276 |
if CS_download5:
|
|
|
|
| 280 |
f.write(response.content)
|
| 281 |
|
| 282 |
# 下载任务6
|
| 283 |
+
CS_destination_folder6 = f"/content/drive/MyDrive/lite_colab/models/Stable-diffusion"
|
| 284 |
CS_target6 = f"{CS_destination_folder6}/{CS_filename6}"
|
| 285 |
|
| 286 |
if CS_download6:
|
|
|
|
| 290 |
f.write(response.content)
|
| 291 |
|
| 292 |
# 下载任务7
|
| 293 |
+
CS_destination_folder7 = f"/content/drive/MyDrive/lite_colab/models/Stable-diffusion"
|
| 294 |
CS_target7 = f"{CS_destination_folder7}/{CS_filename7}"
|
| 295 |
|
| 296 |
if CS_download7:
|
|
|
|
| 300 |
f.write(response.content)
|
| 301 |
|
| 302 |
# 下载任务8
|
| 303 |
+
CS_destination_folder8 = f"/content/drive/MyDrive/lite_colab/models/Stable-diffusion"
|
| 304 |
CS_target8 = f"{CS_destination_folder8}/{CS_filename8}"
|
| 305 |
|
| 306 |
if CS_download8:
|
|
|
|
| 310 |
f.write(response.content)
|
| 311 |
|
| 312 |
# 下载任务9
|
| 313 |
+
CS_destination_folder9 = f"/content/drive/MyDrive/lite_colab/models/Stable-diffusion"
|
| 314 |
CS_target9 = f"{CS_destination_folder9}/{CS_filename9}"
|
| 315 |
|
| 316 |
if CS_download9:
|
|
|
|
| 320 |
f.write(response.content)
|
| 321 |
|
| 322 |
# 下载任务10
|
| 323 |
+
CS_destination_folder10 = f"/content/drive/MyDrive/lite_colab/models/Stable-diffusion"
|
| 324 |
CS_target10 = f"{CS_destination_folder10}/{CS_filename10}"
|
| 325 |
|
| 326 |
if CS_download10:
|
|
|
|
| 330 |
f.write(response.content)
|
| 331 |
|
| 332 |
# 下载任务11
|
| 333 |
+
CS_destination_folder11 = f"/content/drive/MyDrive/lite_colab/models/Stable-diffusion"
|
| 334 |
CS_target11 = f"{CS_destination_folder11}/{CS_filename11}"
|
| 335 |
|
| 336 |
if CS_download11:
|
|
|
|
| 340 |
f.write(response.content)
|
| 341 |
|
| 342 |
# 下载任务12
|
| 343 |
+
CS_destination_folder12 = f"/content/drive/MyDrive/lite_colab/models/Stable-diffusion"
|
| 344 |
CS_target12 = f"{CS_destination_folder12}/{CS_filename12}"
|
| 345 |
|
| 346 |
if CS_download12:
|
|
|
|
| 350 |
f.write(response.content)
|
| 351 |
|
| 352 |
# 下载任务13
|
| 353 |
+
CS_destination_folder13 = f"/content/drive/MyDrive/lite_colab/models/Stable-diffusion"
|
| 354 |
CS_target13 = f"{CS_destination_folder13}/{CS_filename13}"
|
| 355 |
|
| 356 |
if CS_download13:
|
|
|
|
| 364 |
|
| 365 |
print("开始下载Lora模型")
|
| 366 |
# Lora任务1
|
| 367 |
+
Lora_destination_folder1 = "/content/drive/MyDrive/lite_colab/models/Lora"
|
| 368 |
Lora_target1 = os.path.join(Lora_destination_folder1, Lora_filename1)
|
| 369 |
|
| 370 |
if Lora_download1:
|
|
|
|
| 374 |
f.write(response.content)
|
| 375 |
|
| 376 |
# Lora任务2
|
| 377 |
+
Lora_destination_folder2 = "/content/drive/MyDrive/lite_colab/models/Lora"
|
| 378 |
Lora_target2 = os.path.join(Lora_destination_folder2, Lora_filename2)
|
| 379 |
|
| 380 |
if Lora_download2:
|
|
|
|
| 384 |
f.write(response.content)
|
| 385 |
|
| 386 |
# Lora任务3
|
| 387 |
+
Lora_destination_folder3 = "/content/drive/MyDrive/lite_colab/models/Lora"
|
| 388 |
Lora_target3 = os.path.join(Lora_destination_folder3, Lora_filename3)
|
| 389 |
|
| 390 |
if Lora_download3:
|
|
|
|
| 428 |
|
| 429 |
print ("开始下载VAE模型")
|
| 430 |
# VAE任务1
|
| 431 |
+
VAE_destination_folder1 = "/content/drive/MyDrive/lite_colab/models/VAE"
|
| 432 |
VAE_target1 = f"{VAE_destination_folder1}/{VAE_filename1}"
|
| 433 |
|
| 434 |
if VAE_download1:
|
|
|
|
| 437 |
file.write(response.content)
|
| 438 |
|
| 439 |
# VAE任务2
|
| 440 |
+
VAE_destination_folder2 = "/content/drive/MyDrive/lite_colab/models/VAE"
|
| 441 |
VAE_target2 = f"{VAE_destination_folder2}/{VAE_filename2}"
|
| 442 |
|
| 443 |
if VAE_download2:
|
|
|
|
| 446 |
file.write(response.content)
|
| 447 |
|
| 448 |
# VAE任务3
|
| 449 |
+
VAE_destination_folder3 = "/content/drive/MyDrive/lite_colab/models/VAE"
|
| 450 |
VAE_target3 = f"{VAE_destination_folder3}/{VAE_filename3}"
|
| 451 |
|
| 452 |
if VAE_download3:
|
|
|
|
| 455 |
file.write(response.content)
|
| 456 |
|
| 457 |
# VAE任务4
|
| 458 |
+
VAE_destination_folder4 = "/content/drive/MyDrive/lite_colab/models/VAE"
|
| 459 |
VAE_target4 = f"{VAE_destination_folder4}/{VAE_filename4}"
|
| 460 |
|
| 461 |
if VAE_download4:
|
|
|
|
| 464 |
file.write(response.content)
|
| 465 |
|
| 466 |
# VAE任务5
|
| 467 |
+
VAE_destination_folder5 = "/content/drive/MyDrive/lite_colab/models/VAE"
|
| 468 |
VAE_target5 = f"{VAE_destination_folder5}/{VAE_filename5}"
|
| 469 |
|
| 470 |
if VAE_download5:
|
|
|
|
| 473 |
file.write(response.content)
|
| 474 |
|
| 475 |
# VAE任务6
|
| 476 |
+
VAE_destination_folder6 = "/content/drive/MyDrive/lite_colab/models/VAE"
|
| 477 |
VAE_target6 = f"{VAE_destination_folder6}/{VAE_filename6}"
|
| 478 |
|
| 479 |
if VAE_download6:
|
|
|
|
| 482 |
file.write(response.content)
|
| 483 |
|
| 484 |
# VAE任务7
|
| 485 |
+
VAE_destination_folder7 = "/content/drive/MyDrive/lite_colab/models/VAE"
|
| 486 |
VAE_target7 = f"{VAE_destination_folder7}/{VAE_filename7}"
|
| 487 |
|
| 488 |
if VAE_download7:
|
|
|
|
| 491 |
file.write(response.content)
|
| 492 |
|
| 493 |
# VAE任务8
|
| 494 |
+
VAE_destination_folder8 = "/content/drive/MyDrive/lite_colab/models/VAE"
|
| 495 |
VAE_target8 = f"{VAE_destination_folder8}/{VAE_filename8}"
|
| 496 |
|
| 497 |
if VAE_download8:
|
|
|
|
| 500 |
file.write(response.content)
|
| 501 |
|
| 502 |
# VAE任务9
|
| 503 |
+
VAE_destination_folder9 = "/content/drive/MyDrive/lite_colab/models/VAE"
|
| 504 |
VAE_target9 = f"{VAE_destination_folder9}/{VAE_filename9}"
|
| 505 |
|
| 506 |
if VAE_download9:
|
|
|
|
| 509 |
file.write(response.content)
|
| 510 |
|
| 511 |
# VAE任务10
|
| 512 |
+
VAE_destination_folder10 = "/content/drive/MyDrive/lite_colab/models/VAE"
|
| 513 |
VAE_target10 = f"{VAE_destination_folder10}/{VAE_filename10}"
|
| 514 |
|
| 515 |
if VAE_download10:
|
|
|
|
| 518 |
file.write(response.content)
|
| 519 |
|
| 520 |
# VAE任务11
|
| 521 |
+
VAE_destination_folder11 = "/content/drive/MyDrive/lite_colab/models/VAE"
|
| 522 |
VAE_target11 = f"{VAE_destination_folder11}/{VAE_filename11}"
|
| 523 |
|
| 524 |
if VAE_download11:
|
|
|
|
| 527 |
file.write(response.content)
|
| 528 |
|
| 529 |
# VAE任务12
|
| 530 |
+
VAE_destination_folder12 = "/content/drive/MyDrive/lite_colab/models/VAE"
|
| 531 |
VAE_target12 = f"{VAE_destination_folder12}/{VAE_filename12}"
|
| 532 |
|
| 533 |
if VAE_download12:
|
|
|
|
| 536 |
file.write(response.content)
|
| 537 |
|
| 538 |
# VAE任务13
|
| 539 |
+
VAE_destination_folder13 = "/content/drive/MyDrive/lite_colab/models/VAE"
|
| 540 |
VAE_target13 = f"{VAE_destination_folder13}/{VAE_filename13}"
|
| 541 |
|
| 542 |
if VAE_download13:
|
|
|
|
| 549 |
|
| 550 |
print ("开始下载embeddings模型")
|
| 551 |
# 下载任务1
|
| 552 |
+
embeddings_destination_folder1 = "/content/drive/MyDrive/lite_colab/embeddings"
|
| 553 |
embeddings_target1 = f'{embeddings_destination_folder1}/{embeddings_filename1}'
|
| 554 |
|
| 555 |
if embeddings_download1:
|
|
|
|
| 559 |
file.write(response.content)
|
| 560 |
|
| 561 |
# 下载任务2
|
| 562 |
+
embeddings_destination_folder2 = "/content/drive/MyDrive/lite_colab/embeddings"
|
| 563 |
embeddings_target2 = f'{embeddings_destination_folder2}/{embeddings_filename2}'
|
| 564 |
|
| 565 |
if embeddings_download2:
|
|
|
|
| 569 |
file.write(response.content)
|
| 570 |
|
| 571 |
# 下载任务3
|
| 572 |
+
embeddings_destination_folder3 = "/content/drive/MyDrive/lite_colab/embeddings"
|
| 573 |
embeddings_target3 = f'{embeddings_destination_folder3}/{embeddings_filename3}'
|
| 574 |
|
| 575 |
if embeddings_download3:
|
|
|
|
| 579 |
file.write(response.content)
|
| 580 |
|
| 581 |
# 下载任务4
|
| 582 |
+
embeddings_destination_folder4 = "/content/drive/MyDrive/lite_colab/embeddings"
|
| 583 |
embeddings_target4 = f'{embeddings_destination_folder4}/{embeddings_filename4}'
|
| 584 |
|
| 585 |
if embeddings_download4:
|
|
|
|
| 589 |
file.write(response.content)
|
| 590 |
|
| 591 |
# 下载任务5
|
| 592 |
+
embeddings_destination_folder5 = "/content/drive/MyDrive/lite_colab/embeddings"
|
| 593 |
embeddings_target5 = f'{embeddings_destination_folder5}/{embeddings_filename5}'
|
| 594 |
|
| 595 |
if embeddings_download5:
|