Update BuShu.py
Browse files
BuShu.py
CHANGED
|
@@ -118,7 +118,7 @@ exec(cleaned_code)
|
|
| 118 |
def run_git_clone(repo_url, destination):
|
| 119 |
subprocess.run(["git", "clone", repo_url, destination])
|
| 120 |
|
| 121 |
-
extensions_path = "/
|
| 122 |
|
| 123 |
extensions_to_clone = [
|
| 124 |
#(f"https://github.com/deforum-art/deforum-for-automatic1111-{w}", f"{extensions_path}/deforum-for-automatic1111-{w}"),
|
|
@@ -171,51 +171,51 @@ def create_directory(directory):
|
|
| 171 |
|
| 172 |
# CN
|
| 173 |
if CONTROLNET:
|
| 174 |
-
os.makedirs('/
|
| 175 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_ip2p_fp16.safetensors', '/
|
| 176 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_shuffle_fp16.safetensors', '/
|
| 177 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_canny_fp16.safetensors', '/
|
| 178 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1p_sd15_depth_fp16.safetensors', '/
|
| 179 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_inpaint_fp16.safetensors', '/
|
| 180 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_lineart_fp16.safetensors', '/
|
| 181 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_mlsd_fp16.safetensors', '/
|
| 182 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_normalbae_fp16.safetensors', '/
|
| 183 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_openpose_fp16.safetensors', '/
|
| 184 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_scribble_fp16.safetensors', '/
|
| 185 |
-
#wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_seg_fp16.safetensors', '/
|
| 186 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_softedge_fp16.safetensors', '/
|
| 187 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15s2_lineart_anime_fp16.safetensors', '/
|
| 188 |
-
#wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_tile_fp16.yaml', '/
|
| 189 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_ip2p_fp16.yaml', '/
|
| 190 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_shuffle_fp16.yaml', '/
|
| 191 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_canny_fp16.yaml', '/
|
| 192 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11f1p_sd15_depth_fp16.yaml', '/
|
| 193 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_inpaint_fp16.yaml', '/
|
| 194 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_lineart_fp16.yaml', '/
|
| 195 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_mlsd_fp16.yaml', '/
|
| 196 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_normalbae_fp16.yaml', '/
|
| 197 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_openpose_fp16.yaml', '/
|
| 198 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_scribble_fp16.yaml', '/
|
| 199 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_seg_fp16.yaml', '/
|
| 200 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_softedge_fp16.yaml', '/
|
| 201 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15s2_lineart_anime_fp16.yaml', '/
|
| 202 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11f1e_sd15_tile_fp16.yaml', '/
|
| 203 |
|
| 204 |
# T2I
|
| 205 |
if T2I:
|
| 206 |
-
os.makedirs('/
|
| 207 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_style_sd14v1.pth', '/
|
| 208 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/
|
| 209 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_seg_sd14v1.pth', '/
|
| 210 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_openpose_sd14v1.pth', '/
|
| 211 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_keypose_sd14v1.pth', '/
|
| 212 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_depth_sd14v1.pth', '/
|
| 213 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_color_sd14v1.pth', '/
|
| 214 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_canny_sd14v1.pth', '/
|
| 215 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_canny_sd15v2.pth', '/
|
| 216 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_depth_sd15v2.pth', '/
|
| 217 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/
|
| 218 |
-
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_zoedepth_sd15v1.pth', '/
|
| 219 |
|
| 220 |
|
| 221 |
|
|
@@ -224,7 +224,7 @@ if T2I:
|
|
| 224 |
|
| 225 |
# Checkpoints/safetensors等大模型下载
|
| 226 |
# 下载任务1
|
| 227 |
-
CS_destination_folder1 = f"/
|
| 228 |
CS_target1 = f"{CS_destination_folder1}/{CS_filename1}"
|
| 229 |
|
| 230 |
if CS_download1:
|
|
@@ -234,7 +234,7 @@ if CS_download1:
|
|
| 234 |
f.write(response.content)
|
| 235 |
|
| 236 |
# 下载任务2
|
| 237 |
-
CS_destination_folder2 = f"/
|
| 238 |
CS_target2 = f"{CS_destination_folder2}/{CS_filename2}"
|
| 239 |
|
| 240 |
if CS_download2:
|
|
@@ -244,7 +244,7 @@ if CS_download2:
|
|
| 244 |
f.write(response.content)
|
| 245 |
|
| 246 |
# 下载任务3
|
| 247 |
-
CS_destination_folder3 = f"/
|
| 248 |
CS_target3 = f"{CS_destination_folder3}/{CS_filename3}"
|
| 249 |
|
| 250 |
if CS_download3:
|
|
@@ -254,7 +254,7 @@ if CS_download3:
|
|
| 254 |
f.write(response.content)
|
| 255 |
|
| 256 |
# 下载任务4
|
| 257 |
-
CS_destination_folder4 = f"/
|
| 258 |
CS_target4 = f"{CS_destination_folder4}/{CS_filename4}"
|
| 259 |
|
| 260 |
if CS_download4:
|
|
@@ -264,7 +264,7 @@ if CS_download4:
|
|
| 264 |
f.write(response.content)
|
| 265 |
|
| 266 |
# 下载任务5
|
| 267 |
-
CS_destination_folder5 = f"/
|
| 268 |
CS_target5 = f"{CS_destination_folder5}/{CS_filename5}"
|
| 269 |
|
| 270 |
if CS_download5:
|
|
@@ -274,7 +274,7 @@ if CS_download5:
|
|
| 274 |
f.write(response.content)
|
| 275 |
|
| 276 |
# 下载任务6
|
| 277 |
-
CS_destination_folder6 = f"/
|
| 278 |
CS_target6 = f"{CS_destination_folder6}/{CS_filename6}"
|
| 279 |
|
| 280 |
if CS_download6:
|
|
@@ -284,7 +284,7 @@ if CS_download6:
|
|
| 284 |
f.write(response.content)
|
| 285 |
|
| 286 |
# 下载任务7
|
| 287 |
-
CS_destination_folder7 = f"/
|
| 288 |
CS_target7 = f"{CS_destination_folder7}/{CS_filename7}"
|
| 289 |
|
| 290 |
if CS_download7:
|
|
@@ -294,7 +294,7 @@ if CS_download7:
|
|
| 294 |
f.write(response.content)
|
| 295 |
|
| 296 |
# 下载任务8
|
| 297 |
-
CS_destination_folder8 = f"/
|
| 298 |
CS_target8 = f"{CS_destination_folder8}/{CS_filename8}"
|
| 299 |
|
| 300 |
if CS_download8:
|
|
@@ -304,7 +304,7 @@ if CS_download8:
|
|
| 304 |
f.write(response.content)
|
| 305 |
|
| 306 |
# 下载任务9
|
| 307 |
-
CS_destination_folder9 = f"/
|
| 308 |
CS_target9 = f"{CS_destination_folder9}/{CS_filename9}"
|
| 309 |
|
| 310 |
if CS_download9:
|
|
@@ -314,7 +314,7 @@ if CS_download9:
|
|
| 314 |
f.write(response.content)
|
| 315 |
|
| 316 |
# 下载任务10
|
| 317 |
-
CS_destination_folder10 = f"/
|
| 318 |
CS_target10 = f"{CS_destination_folder10}/{CS_filename10}"
|
| 319 |
|
| 320 |
if CS_download10:
|
|
@@ -324,7 +324,7 @@ if CS_download10:
|
|
| 324 |
f.write(response.content)
|
| 325 |
|
| 326 |
# 下载任务11
|
| 327 |
-
CS_destination_folder11 = f"/
|
| 328 |
CS_target11 = f"{CS_destination_folder11}/{CS_filename11}"
|
| 329 |
|
| 330 |
if CS_download11:
|
|
@@ -334,7 +334,7 @@ if CS_download11:
|
|
| 334 |
f.write(response.content)
|
| 335 |
|
| 336 |
# 下载任务12
|
| 337 |
-
CS_destination_folder12 = f"/
|
| 338 |
CS_target12 = f"{CS_destination_folder12}/{CS_filename12}"
|
| 339 |
|
| 340 |
if CS_download12:
|
|
@@ -344,7 +344,7 @@ if CS_download12:
|
|
| 344 |
f.write(response.content)
|
| 345 |
|
| 346 |
# 下载任务13
|
| 347 |
-
CS_destination_folder13 = f"/
|
| 348 |
CS_target13 = f"{CS_destination_folder13}/{CS_filename13}"
|
| 349 |
|
| 350 |
if CS_download13:
|
|
@@ -357,7 +357,7 @@ if CS_download13:
|
|
| 357 |
#Lora模型下载
|
| 358 |
|
| 359 |
# Lora任务1
|
| 360 |
-
Lora_destination_folder1 = "/
|
| 361 |
Lora_target1 = os.path.join(Lora_destination_folder1, Lora_filename1)
|
| 362 |
|
| 363 |
if Lora_download1:
|
|
@@ -366,7 +366,7 @@ if Lora_download1:
|
|
| 366 |
f.write(response.content)
|
| 367 |
|
| 368 |
# Lora任务2
|
| 369 |
-
Lora_destination_folder2 = "/
|
| 370 |
Lora_target2 = os.path.join(Lora_destination_folder2, Lora_filename2)
|
| 371 |
|
| 372 |
if Lora_download2:
|
|
@@ -375,7 +375,7 @@ if Lora_download2:
|
|
| 375 |
f.write(response.content)
|
| 376 |
|
| 377 |
# Lora任务3
|
| 378 |
-
Lora_destination_folder3 = "/
|
| 379 |
Lora_target3 = os.path.join(Lora_destination_folder3, Lora_filename3)
|
| 380 |
|
| 381 |
if Lora_download3:
|
|
@@ -414,7 +414,7 @@ if Lora_download6:
|
|
| 414 |
# VAE下载
|
| 415 |
|
| 416 |
# VAE任务1
|
| 417 |
-
VAE_destination_folder1 = "/
|
| 418 |
VAE_target1 = f"{VAE_destination_folder1}/{VAE_filename1}"
|
| 419 |
|
| 420 |
if VAE_download1:
|
|
@@ -423,7 +423,7 @@ if VAE_download1:
|
|
| 423 |
file.write(response.content)
|
| 424 |
|
| 425 |
# VAE任务2
|
| 426 |
-
VAE_destination_folder2 = "/
|
| 427 |
VAE_target2 = f"{VAE_destination_folder2}/{VAE_filename2}"
|
| 428 |
|
| 429 |
if VAE_download2:
|
|
@@ -432,7 +432,7 @@ if VAE_download2:
|
|
| 432 |
file.write(response.content)
|
| 433 |
|
| 434 |
# VAE任务3
|
| 435 |
-
VAE_destination_folder3 = "/
|
| 436 |
VAE_target3 = f"{VAE_destination_folder3}/{VAE_filename3}"
|
| 437 |
|
| 438 |
if VAE_download3:
|
|
@@ -441,7 +441,7 @@ if VAE_download3:
|
|
| 441 |
file.write(response.content)
|
| 442 |
|
| 443 |
# VAE任务4
|
| 444 |
-
VAE_destination_folder4 = "/
|
| 445 |
VAE_target4 = f"{VAE_destination_folder4}/{VAE_filename4}"
|
| 446 |
|
| 447 |
if VAE_download4:
|
|
@@ -450,7 +450,7 @@ if VAE_download4:
|
|
| 450 |
file.write(response.content)
|
| 451 |
|
| 452 |
# VAE任务5
|
| 453 |
-
VAE_destination_folder5 = "/
|
| 454 |
VAE_target5 = f"{VAE_destination_folder5}/{VAE_filename5}"
|
| 455 |
|
| 456 |
if VAE_download5:
|
|
@@ -459,7 +459,7 @@ if VAE_download5:
|
|
| 459 |
file.write(response.content)
|
| 460 |
|
| 461 |
# VAE任务6
|
| 462 |
-
VAE_destination_folder6 = "/
|
| 463 |
VAE_target6 = f"{VAE_destination_folder6}/{VAE_filename6}"
|
| 464 |
|
| 465 |
if VAE_download6:
|
|
@@ -468,7 +468,7 @@ if VAE_download6:
|
|
| 468 |
file.write(response.content)
|
| 469 |
|
| 470 |
# VAE任务7
|
| 471 |
-
VAE_destination_folder7 = "/
|
| 472 |
VAE_target7 = f"{VAE_destination_folder7}/{VAE_filename7}"
|
| 473 |
|
| 474 |
if VAE_download7:
|
|
@@ -477,7 +477,7 @@ if VAE_download7:
|
|
| 477 |
file.write(response.content)
|
| 478 |
|
| 479 |
# VAE任务8
|
| 480 |
-
VAE_destination_folder8 = "/
|
| 481 |
VAE_target8 = f"{VAE_destination_folder8}/{VAE_filename8}"
|
| 482 |
|
| 483 |
if VAE_download8:
|
|
@@ -486,7 +486,7 @@ if VAE_download8:
|
|
| 486 |
file.write(response.content)
|
| 487 |
|
| 488 |
# VAE任务9
|
| 489 |
-
VAE_destination_folder9 = "/
|
| 490 |
VAE_target9 = f"{VAE_destination_folder9}/{VAE_filename9}"
|
| 491 |
|
| 492 |
if VAE_download9:
|
|
@@ -495,7 +495,7 @@ if VAE_download9:
|
|
| 495 |
file.write(response.content)
|
| 496 |
|
| 497 |
# VAE任务10
|
| 498 |
-
VAE_destination_folder10 = "/
|
| 499 |
VAE_target10 = f"{VAE_destination_folder10}/{VAE_filename10}"
|
| 500 |
|
| 501 |
if VAE_download10:
|
|
@@ -504,7 +504,7 @@ if VAE_download10:
|
|
| 504 |
file.write(response.content)
|
| 505 |
|
| 506 |
# VAE任务11
|
| 507 |
-
VAE_destination_folder11 = "/
|
| 508 |
VAE_target11 = f"{VAE_destination_folder11}/{VAE_filename11}"
|
| 509 |
|
| 510 |
if VAE_download11:
|
|
@@ -513,7 +513,7 @@ if VAE_download11:
|
|
| 513 |
file.write(response.content)
|
| 514 |
|
| 515 |
# VAE任务12
|
| 516 |
-
VAE_destination_folder12 = "/
|
| 517 |
VAE_target12 = f"{VAE_destination_folder12}/{VAE_filename12}"
|
| 518 |
|
| 519 |
if VAE_download12:
|
|
@@ -522,7 +522,7 @@ if VAE_download12:
|
|
| 522 |
file.write(response.content)
|
| 523 |
|
| 524 |
# VAE任务13
|
| 525 |
-
VAE_destination_folder13 = "/
|
| 526 |
VAE_target13 = f"{VAE_destination_folder13}/{VAE_filename13}"
|
| 527 |
|
| 528 |
if VAE_download13:
|
|
@@ -534,7 +534,7 @@ if VAE_download13:
|
|
| 534 |
# embeddings模型下载
|
| 535 |
|
| 536 |
# 下载任务1
|
| 537 |
-
embeddings_destination_folder1 = "/
|
| 538 |
embeddings_target1 = f'{embeddings_destination_folder1}/{embeddings_filename1}'
|
| 539 |
|
| 540 |
if embeddings_download1:
|
|
@@ -544,7 +544,7 @@ if embeddings_download1:
|
|
| 544 |
file.write(response.content)
|
| 545 |
|
| 546 |
# 下载任务2
|
| 547 |
-
embeddings_destination_folder2 = "/
|
| 548 |
embeddings_target2 = f'{embeddings_destination_folder2}/{embeddings_filename2}'
|
| 549 |
|
| 550 |
if embeddings_download2:
|
|
@@ -554,7 +554,7 @@ if embeddings_download2:
|
|
| 554 |
file.write(response.content)
|
| 555 |
|
| 556 |
# 下载任务3
|
| 557 |
-
embeddings_destination_folder3 = "/
|
| 558 |
embeddings_target3 = f'{embeddings_destination_folder3}/{embeddings_filename3}'
|
| 559 |
|
| 560 |
if embeddings_download3:
|
|
@@ -564,7 +564,7 @@ if embeddings_download3:
|
|
| 564 |
file.write(response.content)
|
| 565 |
|
| 566 |
# 下载任务4
|
| 567 |
-
embeddings_destination_folder4 = "/
|
| 568 |
embeddings_target4 = f'{embeddings_destination_folder4}/{embeddings_filename4}'
|
| 569 |
|
| 570 |
if embeddings_download4:
|
|
@@ -574,7 +574,7 @@ if embeddings_download4:
|
|
| 574 |
file.write(response.content)
|
| 575 |
|
| 576 |
# 下载任务5
|
| 577 |
-
embeddings_destination_folder5 = "/
|
| 578 |
embeddings_target5 = f'{embeddings_destination_folder5}/{embeddings_filename5}'
|
| 579 |
|
| 580 |
if embeddings_download5:
|
|
|
|
| 118 |
def run_git_clone(repo_url, destination):
|
| 119 |
subprocess.run(["git", "clone", repo_url, destination])
|
| 120 |
|
| 121 |
+
extensions_path = "/root/main/extensions"
|
| 122 |
|
| 123 |
extensions_to_clone = [
|
| 124 |
#(f"https://github.com/deforum-art/deforum-for-automatic1111-{w}", f"{extensions_path}/deforum-for-automatic1111-{w}"),
|
|
|
|
| 171 |
|
| 172 |
# CN
|
| 173 |
if CONTROLNET:
|
| 174 |
+
os.makedirs('/root/main/extensions/control/models', exist_ok=True)
|
| 175 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_ip2p_fp16.safetensors', '/root/main/extensions/control/models/control_v11e_sd15_ip2p_fp16.safetensors')
|
| 176 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_shuffle_fp16.safetensors', '/root/main/extensions/control/models/control_v11e_sd15_shuffle_fp16.safetensors')
|
| 177 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_canny_fp16.safetensors', '/root/main/extensions/control/models/control_v11p_sd15_canny_fp16.safetensors')
|
| 178 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1p_sd15_depth_fp16.safetensors', '/root/main/extensions/control/models/control_v11f1p_sd15_depth_fp16.safetensors')
|
| 179 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_inpaint_fp16.safetensors', '/root/main/extensions/control/models/control_v11p_sd15_inpaint_fp16.safetensors')
|
| 180 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_lineart_fp16.safetensors', '/root/main/extensions/control/models/control_v11p_sd15_lineart_fp16.safetensors')
|
| 181 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_mlsd_fp16.safetensors', '/root/main/extensions/control/models/control_v11p_sd15_mlsd_fp16.safetensors')
|
| 182 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_normalbae_fp16.safetensors', '/root/main/extensions/control/models/control_v11p_sd15_normalbae_fp16.safetensors')
|
| 183 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_openpose_fp16.safetensors', '/root/main/extensions/control/models/control_v11p_sd15_openpose_fp16.safetensors')
|
| 184 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_scribble_fp16.safetensors', '/root/main/extensions/control/models/control_v11p_sd15_scribble_fp16.safetensors')
|
| 185 |
+
#wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_seg_fp16.safetensors', '/root/main/extensions/control/models/control_v11p_sd15_seg_fp16.safetensors')
|
| 186 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_softedge_fp16.safetensors', '/root/main/extensions/control/models/control_v11p_sd15_softedge_fp16.safetensors')
|
| 187 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15s2_lineart_anime_fp16.safetensors', '/root/main/extensions/control/models/control_v11p_sd15s2_lineart_anime_fp16.safetensors')
|
| 188 |
+
#wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_tile_fp16.yaml', '/root/main/extensions/control/models/control_v11e_sd15_tile_fp16.yaml')
|
| 189 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_ip2p_fp16.yaml', '/root/main/extensions/control/models/control_v11e_sd15_ip2p_fp16.yaml')
|
| 190 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_shuffle_fp16.yaml', '/root/main/extensions/control/models/control_v11e_sd15_shuffle_fp16.yaml')
|
| 191 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_canny_fp16.yaml', '/root/main/extensions/control/models/control_v11p_sd15_canny_fp16.yaml')
|
| 192 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11f1p_sd15_depth_fp16.yaml', '/root/main/extensions/control/models/control_v11f1p_sd15_depth_fp16.yaml')
|
| 193 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_inpaint_fp16.yaml', '/root/main/extensions/control/models/control_v11p_sd15_inpaint_fp16.yaml')
|
| 194 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_lineart_fp16.yaml', '/root/main/extensions/control/models/control_v11p_sd15_lineart_fp16.yaml')
|
| 195 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_mlsd_fp16.yaml', '/root/main/extensions/control/models/control_v11p_sd15_mlsd_fp16.yaml')
|
| 196 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_normalbae_fp16.yaml', '/root/main/extensions/control/models/control_v11p_sd15_normalbae_fp16.yaml')
|
| 197 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_openpose_fp16.yaml', '/root/main/extensions/control/models/control_v11p_sd15_openpose_fp16.yaml')
|
| 198 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_scribble_fp16.yaml', '/root/main/extensions/control/models/control_v11p_sd15_scribble_fp16.yaml')
|
| 199 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_seg_fp16.yaml', '/root/main/extensions/control/models/control_v11p_sd15_seg_fp16.yaml')
|
| 200 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_softedge_fp16.yaml', '/root/main/extensions/control/models/control_v11p_sd15_softedge_fp16.yaml')
|
| 201 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15s2_lineart_anime_fp16.yaml', '/root/main/extensions/control/models/control_v11p_sd15s2_lineart_anime_fp16.yaml')
|
| 202 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11f1e_sd15_tile_fp16.yaml', '/root/main/extensions/control/models')
|
| 203 |
|
| 204 |
# T2I
|
| 205 |
if T2I:
|
| 206 |
+
os.makedirs('/root/main/extensions/control/models', exist_ok=True)
|
| 207 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_style_sd14v1.pth', '/root/main/extensions/control/models/t2iadapter_style_sd14v1.pth')
|
| 208 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_skrooth_sd14v1.pth', '/root/main/extensions/control/models/t2iadapter_skrooth_sd14v1.pth')
|
| 209 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_seg_sd14v1.pth', '/root/main/extensions/control/models/t2iadapter_seg_sd14v1.pth')
|
| 210 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_openpose_sd14v1.pth', '/root/main/extensions/control/models/t2iadapter_openpose_sd14v1.pth')
|
| 211 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_keypose_sd14v1.pth', '/root/main/extensions/control/models/t2iadapter_keypose_sd14v1.pth')
|
| 212 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_depth_sd14v1.pth', '/root/main/extensions/control/models/t2iadapter_depth_sd14v1.pth')
|
| 213 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_color_sd14v1.pth', '/root/main/extensions/control/models/t2iadapter_color_sd14v1.pth')
|
| 214 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_canny_sd14v1.pth', '/root/main/extensions/control/models/t2iadapter_canny_sd14v1.pth')
|
| 215 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_canny_sd15v2.pth', '/root/main/extensions/control/models/t2iadapter_canny_sd15v2.pth')
|
| 216 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_depth_sd15v2.pth', '/root/main/extensions/control/models/t2iadapter_depth_sd15v2.pth')
|
| 217 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_skrooth_sd15v2.pth', '/root/main/extensions/control/models/t2iadapter_skrooth_sd15v2.pth')
|
| 218 |
+
wget.download('https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_zoedepth_sd15v1.pth', '/root/main/extensions/control/models/t2iadapter_zoedepth_sd15v1.pth')
|
| 219 |
|
| 220 |
|
| 221 |
|
|
|
|
| 224 |
|
| 225 |
# Checkpoints/safetensors等大模型下载
|
| 226 |
# 下载任务1
|
| 227 |
+
CS_destination_folder1 = f"/root/main/models/Stable-diffusion"
|
| 228 |
CS_target1 = f"{CS_destination_folder1}/{CS_filename1}"
|
| 229 |
|
| 230 |
if CS_download1:
|
|
|
|
| 234 |
f.write(response.content)
|
| 235 |
|
| 236 |
# 下载任务2
|
| 237 |
+
CS_destination_folder2 = f"/root/main/models/Stable-diffusion"
|
| 238 |
CS_target2 = f"{CS_destination_folder2}/{CS_filename2}"
|
| 239 |
|
| 240 |
if CS_download2:
|
|
|
|
| 244 |
f.write(response.content)
|
| 245 |
|
| 246 |
# 下载任务3
|
| 247 |
+
CS_destination_folder3 = f"/root/main/models/Stable-diffusion"
|
| 248 |
CS_target3 = f"{CS_destination_folder3}/{CS_filename3}"
|
| 249 |
|
| 250 |
if CS_download3:
|
|
|
|
| 254 |
f.write(response.content)
|
| 255 |
|
| 256 |
# 下载任务4
|
| 257 |
+
CS_destination_folder4 = f"/root/main/models/Stable-diffusion"
|
| 258 |
CS_target4 = f"{CS_destination_folder4}/{CS_filename4}"
|
| 259 |
|
| 260 |
if CS_download4:
|
|
|
|
| 264 |
f.write(response.content)
|
| 265 |
|
| 266 |
# 下载任务5
|
| 267 |
+
CS_destination_folder5 = f"/root/main/models/Stable-diffusion"
|
| 268 |
CS_target5 = f"{CS_destination_folder5}/{CS_filename5}"
|
| 269 |
|
| 270 |
if CS_download5:
|
|
|
|
| 274 |
f.write(response.content)
|
| 275 |
|
| 276 |
# 下载任务6
|
| 277 |
+
CS_destination_folder6 = f"/root/main/models/Stable-diffusion"
|
| 278 |
CS_target6 = f"{CS_destination_folder6}/{CS_filename6}"
|
| 279 |
|
| 280 |
if CS_download6:
|
|
|
|
| 284 |
f.write(response.content)
|
| 285 |
|
| 286 |
# 下载任务7
|
| 287 |
+
CS_destination_folder7 = f"/root/main/models/Stable-diffusion"
|
| 288 |
CS_target7 = f"{CS_destination_folder7}/{CS_filename7}"
|
| 289 |
|
| 290 |
if CS_download7:
|
|
|
|
| 294 |
f.write(response.content)
|
| 295 |
|
| 296 |
# 下载任务8
|
| 297 |
+
CS_destination_folder8 = f"/root/main/models/Stable-diffusion"
|
| 298 |
CS_target8 = f"{CS_destination_folder8}/{CS_filename8}"
|
| 299 |
|
| 300 |
if CS_download8:
|
|
|
|
| 304 |
f.write(response.content)
|
| 305 |
|
| 306 |
# 下载任务9
|
| 307 |
+
CS_destination_folder9 = f"/root/main/models/Stable-diffusion"
|
| 308 |
CS_target9 = f"{CS_destination_folder9}/{CS_filename9}"
|
| 309 |
|
| 310 |
if CS_download9:
|
|
|
|
| 314 |
f.write(response.content)
|
| 315 |
|
| 316 |
# 下载任务10
|
| 317 |
+
CS_destination_folder10 = f"/root/main/models/Stable-diffusion"
|
| 318 |
CS_target10 = f"{CS_destination_folder10}/{CS_filename10}"
|
| 319 |
|
| 320 |
if CS_download10:
|
|
|
|
| 324 |
f.write(response.content)
|
| 325 |
|
| 326 |
# 下载任务11
|
| 327 |
+
CS_destination_folder11 = f"/root/main/models/Stable-diffusion"
|
| 328 |
CS_target11 = f"{CS_destination_folder11}/{CS_filename11}"
|
| 329 |
|
| 330 |
if CS_download11:
|
|
|
|
| 334 |
f.write(response.content)
|
| 335 |
|
| 336 |
# 下载任务12
|
| 337 |
+
CS_destination_folder12 = f"/root/main/models/Stable-diffusion"
|
| 338 |
CS_target12 = f"{CS_destination_folder12}/{CS_filename12}"
|
| 339 |
|
| 340 |
if CS_download12:
|
|
|
|
| 344 |
f.write(response.content)
|
| 345 |
|
| 346 |
# 下载任务13
|
| 347 |
+
CS_destination_folder13 = f"/root/main/models/Stable-diffusion"
|
| 348 |
CS_target13 = f"{CS_destination_folder13}/{CS_filename13}"
|
| 349 |
|
| 350 |
if CS_download13:
|
|
|
|
| 357 |
#Lora模型下载
|
| 358 |
|
| 359 |
# Lora任务1
|
| 360 |
+
Lora_destination_folder1 = "/root/main/models/Lora"
|
| 361 |
Lora_target1 = os.path.join(Lora_destination_folder1, Lora_filename1)
|
| 362 |
|
| 363 |
if Lora_download1:
|
|
|
|
| 366 |
f.write(response.content)
|
| 367 |
|
| 368 |
# Lora任务2
|
| 369 |
+
Lora_destination_folder2 = "/root/main/models/Lora"
|
| 370 |
Lora_target2 = os.path.join(Lora_destination_folder2, Lora_filename2)
|
| 371 |
|
| 372 |
if Lora_download2:
|
|
|
|
| 375 |
f.write(response.content)
|
| 376 |
|
| 377 |
# Lora任务3
|
| 378 |
+
Lora_destination_folder3 = "/root/main/models/Lora"
|
| 379 |
Lora_target3 = os.path.join(Lora_destination_folder3, Lora_filename3)
|
| 380 |
|
| 381 |
if Lora_download3:
|
|
|
|
| 414 |
# VAE下载
|
| 415 |
|
| 416 |
# VAE任务1
|
| 417 |
+
VAE_destination_folder1 = "/root/main/models/VAE"
|
| 418 |
VAE_target1 = f"{VAE_destination_folder1}/{VAE_filename1}"
|
| 419 |
|
| 420 |
if VAE_download1:
|
|
|
|
| 423 |
file.write(response.content)
|
| 424 |
|
| 425 |
# VAE任务2
|
| 426 |
+
VAE_destination_folder2 = "/root/main/models/VAE"
|
| 427 |
VAE_target2 = f"{VAE_destination_folder2}/{VAE_filename2}"
|
| 428 |
|
| 429 |
if VAE_download2:
|
|
|
|
| 432 |
file.write(response.content)
|
| 433 |
|
| 434 |
# VAE任务3
|
| 435 |
+
VAE_destination_folder3 = "/root/main/models/VAE"
|
| 436 |
VAE_target3 = f"{VAE_destination_folder3}/{VAE_filename3}"
|
| 437 |
|
| 438 |
if VAE_download3:
|
|
|
|
| 441 |
file.write(response.content)
|
| 442 |
|
| 443 |
# VAE任务4
|
| 444 |
+
VAE_destination_folder4 = "/root/main/models/VAE"
|
| 445 |
VAE_target4 = f"{VAE_destination_folder4}/{VAE_filename4}"
|
| 446 |
|
| 447 |
if VAE_download4:
|
|
|
|
| 450 |
file.write(response.content)
|
| 451 |
|
| 452 |
# VAE任务5
|
| 453 |
+
VAE_destination_folder5 = "/root/main/models/VAE"
|
| 454 |
VAE_target5 = f"{VAE_destination_folder5}/{VAE_filename5}"
|
| 455 |
|
| 456 |
if VAE_download5:
|
|
|
|
| 459 |
file.write(response.content)
|
| 460 |
|
| 461 |
# VAE任务6
|
| 462 |
+
VAE_destination_folder6 = "/root/main/models/VAE"
|
| 463 |
VAE_target6 = f"{VAE_destination_folder6}/{VAE_filename6}"
|
| 464 |
|
| 465 |
if VAE_download6:
|
|
|
|
| 468 |
file.write(response.content)
|
| 469 |
|
| 470 |
# VAE任务7
|
| 471 |
+
VAE_destination_folder7 = "/root/main/models/VAE"
|
| 472 |
VAE_target7 = f"{VAE_destination_folder7}/{VAE_filename7}"
|
| 473 |
|
| 474 |
if VAE_download7:
|
|
|
|
| 477 |
file.write(response.content)
|
| 478 |
|
| 479 |
# VAE任务8
|
| 480 |
+
VAE_destination_folder8 = "/root/main/models/VAE"
|
| 481 |
VAE_target8 = f"{VAE_destination_folder8}/{VAE_filename8}"
|
| 482 |
|
| 483 |
if VAE_download8:
|
|
|
|
| 486 |
file.write(response.content)
|
| 487 |
|
| 488 |
# VAE任务9
|
| 489 |
+
VAE_destination_folder9 = "/root/main/models/VAE"
|
| 490 |
VAE_target9 = f"{VAE_destination_folder9}/{VAE_filename9}"
|
| 491 |
|
| 492 |
if VAE_download9:
|
|
|
|
| 495 |
file.write(response.content)
|
| 496 |
|
| 497 |
# VAE任务10
|
| 498 |
+
VAE_destination_folder10 = "/root/main/models/VAE"
|
| 499 |
VAE_target10 = f"{VAE_destination_folder10}/{VAE_filename10}"
|
| 500 |
|
| 501 |
if VAE_download10:
|
|
|
|
| 504 |
file.write(response.content)
|
| 505 |
|
| 506 |
# VAE任务11
|
| 507 |
+
VAE_destination_folder11 = "/root/main/models/VAE"
|
| 508 |
VAE_target11 = f"{VAE_destination_folder11}/{VAE_filename11}"
|
| 509 |
|
| 510 |
if VAE_download11:
|
|
|
|
| 513 |
file.write(response.content)
|
| 514 |
|
| 515 |
# VAE任务12
|
| 516 |
+
VAE_destination_folder12 = "/root/main/models/VAE"
|
| 517 |
VAE_target12 = f"{VAE_destination_folder12}/{VAE_filename12}"
|
| 518 |
|
| 519 |
if VAE_download12:
|
|
|
|
| 522 |
file.write(response.content)
|
| 523 |
|
| 524 |
# VAE任务13
|
| 525 |
+
VAE_destination_folder13 = "/root/main/models/VAE"
|
| 526 |
VAE_target13 = f"{VAE_destination_folder13}/{VAE_filename13}"
|
| 527 |
|
| 528 |
if VAE_download13:
|
|
|
|
| 534 |
# embeddings模型下载
|
| 535 |
|
| 536 |
# 下载任务1
|
| 537 |
+
embeddings_destination_folder1 = "/root/main/embeddings"
|
| 538 |
embeddings_target1 = f'{embeddings_destination_folder1}/{embeddings_filename1}'
|
| 539 |
|
| 540 |
if embeddings_download1:
|
|
|
|
| 544 |
file.write(response.content)
|
| 545 |
|
| 546 |
# 下载任务2
|
| 547 |
+
embeddings_destination_folder2 = "/root/main/embeddings"
|
| 548 |
embeddings_target2 = f'{embeddings_destination_folder2}/{embeddings_filename2}'
|
| 549 |
|
| 550 |
if embeddings_download2:
|
|
|
|
| 554 |
file.write(response.content)
|
| 555 |
|
| 556 |
# 下载任务3
|
| 557 |
+
embeddings_destination_folder3 = "/root/main/embeddings"
|
| 558 |
embeddings_target3 = f'{embeddings_destination_folder3}/{embeddings_filename3}'
|
| 559 |
|
| 560 |
if embeddings_download3:
|
|
|
|
| 564 |
file.write(response.content)
|
| 565 |
|
| 566 |
# 下载任务4
|
| 567 |
+
embeddings_destination_folder4 = "/root/main/embeddings"
|
| 568 |
embeddings_target4 = f'{embeddings_destination_folder4}/{embeddings_filename4}'
|
| 569 |
|
| 570 |
if embeddings_download4:
|
|
|
|
| 574 |
file.write(response.content)
|
| 575 |
|
| 576 |
# 下载任务5
|
| 577 |
+
embeddings_destination_folder5 = "/root/main/embeddings"
|
| 578 |
embeddings_target5 = f'{embeddings_destination_folder5}/{embeddings_filename5}'
|
| 579 |
|
| 580 |
if embeddings_download5:
|