DMD2_InstantID_Faceswap / download_models.py
Inspecta's picture
Update download_models.py
37a60f0 verified
raw
history blame
1.34 kB
import os, urllib.request, pathlib
from pathlib import Path
# Créer les répertoires nécessaires
comfy_root = Path("ComfyUI/models")
(comfy_root / "instantid").mkdir(parents=True, exist_ok=True)
(comfy_root / "controlnet").mkdir(parents=True, exist_ok=True)
root = Path("models")
(root / "checkpoints").mkdir(parents=True, exist_ok=True)
(root / "loras").mkdir(parents=True, exist_ok=True)
def wget(url, dest):
if not dest.exists():
print("Downloading", url)
urllib.request.urlretrieve(url, dest)
# InstantID
wget(
"https://huggingface.co/Super-shuhe/InstantID-FaceID-70K/resolve/main/pytorch_model.bin",
comfy_root / "instantid" / "Super-shuheInstantID-FaceID-70K.bin"
)
wget(
"https://huggingface.co/Super-shuhe/InstantID-FaceID-6M/resolve/main/controlnet/diffusion_pytorch_model.safetensors",
comfy_root / "controlnet" / "Super-shuheInstantID-FaceID-6M_Controlnet.safetensors"
)
# Checkpoint et LoRA
wget(
"https://huggingface.co/boopyfloopy/gonzalomoXLFluxPony_v40UnityXLDMD/resolve/main/gonzalomoXLFluxPony_v40UnityXLDMD.safetensors",
root / "checkpoints" / "gonzalomoXLFluxPony_v40UnityXLDMD.safetensors"
)
wget(
"https://huggingface.co/AiWise/epiCPhoto-XL-LoRA-Derp2/resolve/main/epiCPhotoXL-LoRA-Derp2.safetensors",
root / "loras" / "epiCPhotoXL-Derp2.safetensors"
)