Spaces:
Runtime error
Runtime error
| 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" | |
| ) | |