Spaces:
Runtime error
Runtime error
Update download_models.py
Browse files- download_models.py +15 -11
download_models.py
CHANGED
|
@@ -1,34 +1,38 @@
|
|
| 1 |
-
import urllib.request
|
| 2 |
from pathlib import Path
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
(root / "checkpoints").mkdir(parents=True, exist_ok=True)
|
| 7 |
-
(root / "controlnet").mkdir(parents=True, exist_ok=True)
|
| 8 |
-
(root / "instantid").mkdir(parents=True, exist_ok=True)
|
| 9 |
(root / "loras").mkdir(parents=True, exist_ok=True)
|
| 10 |
|
| 11 |
def wget(url, dest):
|
| 12 |
if not dest.exists():
|
| 13 |
print("Downloading", url)
|
| 14 |
urllib.request.urlretrieve(url, dest)
|
| 15 |
-
else:
|
| 16 |
-
print("Already exists:", dest)
|
| 17 |
|
| 18 |
-
#
|
| 19 |
wget(
|
| 20 |
"https://huggingface.co/Super-shuhe/InstantID-FaceID-70K/resolve/main/pytorch_model.bin",
|
| 21 |
-
|
| 22 |
)
|
|
|
|
| 23 |
wget(
|
| 24 |
"https://huggingface.co/Super-shuhe/InstantID-FaceID-6M/resolve/main/controlnet/diffusion_pytorch_model.safetensors",
|
| 25 |
-
|
| 26 |
)
|
|
|
|
|
|
|
| 27 |
wget(
|
| 28 |
"https://huggingface.co/boopyfloopy/gonzalomoXLFluxPony_v40UnityXLDMD/resolve/main/gonzalomoXLFluxPony_v40UnityXLDMD.safetensors",
|
| 29 |
root / "checkpoints" / "gonzalomoXLFluxPony_v40UnityXLDMD.safetensors"
|
| 30 |
)
|
|
|
|
| 31 |
wget(
|
| 32 |
"https://huggingface.co/AiWise/epiCPhoto-XL-LoRA-Derp2/resolve/main/epiCPhotoXL-LoRA-Derp2.safetensors",
|
| 33 |
root / "loras" / "epiCPhotoXL-Derp2.safetensors"
|
| 34 |
-
)
|
|
|
|
| 1 |
+
import os, urllib.request, pathlib
|
| 2 |
from pathlib import Path
|
| 3 |
|
| 4 |
+
# Créer les répertoires nécessaires
|
| 5 |
+
comfy_root = Path("ComfyUI/models")
|
| 6 |
+
(comfy_root / "instantid").mkdir(parents=True, exist_ok=True)
|
| 7 |
+
(comfy_root / "controlnet").mkdir(parents=True, exist_ok=True)
|
| 8 |
+
|
| 9 |
+
root = Path("models")
|
| 10 |
(root / "checkpoints").mkdir(parents=True, exist_ok=True)
|
|
|
|
|
|
|
| 11 |
(root / "loras").mkdir(parents=True, exist_ok=True)
|
| 12 |
|
| 13 |
def wget(url, dest):
|
| 14 |
if not dest.exists():
|
| 15 |
print("Downloading", url)
|
| 16 |
urllib.request.urlretrieve(url, dest)
|
|
|
|
|
|
|
| 17 |
|
| 18 |
+
# InstantID
|
| 19 |
wget(
|
| 20 |
"https://huggingface.co/Super-shuhe/InstantID-FaceID-70K/resolve/main/pytorch_model.bin",
|
| 21 |
+
comfy_root / "instantid" / "Super-shuheInstantID-FaceID-70K.bin"
|
| 22 |
)
|
| 23 |
+
|
| 24 |
wget(
|
| 25 |
"https://huggingface.co/Super-shuhe/InstantID-FaceID-6M/resolve/main/controlnet/diffusion_pytorch_model.safetensors",
|
| 26 |
+
comfy_root / "controlnet" / "Super-shuheInstantID-FaceID-6M_Controlnet.safetensors"
|
| 27 |
)
|
| 28 |
+
|
| 29 |
+
# Checkpoint et LoRA
|
| 30 |
wget(
|
| 31 |
"https://huggingface.co/boopyfloopy/gonzalomoXLFluxPony_v40UnityXLDMD/resolve/main/gonzalomoXLFluxPony_v40UnityXLDMD.safetensors",
|
| 32 |
root / "checkpoints" / "gonzalomoXLFluxPony_v40UnityXLDMD.safetensors"
|
| 33 |
)
|
| 34 |
+
|
| 35 |
wget(
|
| 36 |
"https://huggingface.co/AiWise/epiCPhoto-XL-LoRA-Derp2/resolve/main/epiCPhotoXL-LoRA-Derp2.safetensors",
|
| 37 |
root / "loras" / "epiCPhotoXL-Derp2.safetensors"
|
| 38 |
+
)
|