Inspecta commited on
Commit
29e7ac0
·
verified ·
1 Parent(s): 7986f18

Update download_models.py

Browse files
Files changed (1) hide show
  1. download_models.py +11 -7
download_models.py CHANGED
@@ -1,24 +1,28 @@
1
- import os, urllib.request, pathlib
2
  from pathlib import Path
3
 
4
- root = pathlib.Path("ComfyUI/models")
 
5
  (root / "checkpoints").mkdir(parents=True, exist_ok=True)
 
 
6
  (root / "loras").mkdir(parents=True, exist_ok=True)
7
- (Path("ComfyUI/models/instantid")).mkdir(parents=True, exist_ok=True)
8
- (Path("ComfyUI/models/controlnet")).mkdir(parents=True, exist_ok=True)
9
 
10
  def wget(url, dest):
11
  if not dest.exists():
12
  print("Downloading", url)
13
  urllib.request.urlretrieve(url, dest)
 
 
14
 
 
15
  wget(
16
  "https://huggingface.co/Super-shuhe/InstantID-FaceID-70K/resolve/main/pytorch_model.bin",
17
- Path("ComfyUI/models/instantid/Super-shuheInstantID-FaceID-70K.bin")
18
  )
19
  wget(
20
  "https://huggingface.co/Super-shuhe/InstantID-FaceID-6M/resolve/main/controlnet/diffusion_pytorch_model.safetensors",
21
- Path("ComfyUI/models/controlnet/Super-shuheInstantID-FaceID-6M_Controlnet.safetensors")
22
  )
23
  wget(
24
  "https://huggingface.co/boopyfloopy/gonzalomoXLFluxPony_v40UnityXLDMD/resolve/main/gonzalomoXLFluxPony_v40UnityXLDMD.safetensors",
@@ -27,4 +31,4 @@ wget(
27
  wget(
28
  "https://huggingface.co/AiWise/epiCPhoto-XL-LoRA-Derp2/resolve/main/epiCPhotoXL-LoRA-Derp2.safetensors",
29
  root / "loras" / "epiCPhotoXL-Derp2.safetensors"
30
- )
 
1
+ import urllib.request
2
  from pathlib import Path
3
 
4
+ # Crée les dossiers nécessaires à ComfyUI
5
+ root = Path("ComfyUI/models")
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
+ # Téléchargement des modèles
19
  wget(
20
  "https://huggingface.co/Super-shuhe/InstantID-FaceID-70K/resolve/main/pytorch_model.bin",
21
+ root / "instantid" / "Super-shuheInstantID-FaceID-70K.bin"
22
  )
23
  wget(
24
  "https://huggingface.co/Super-shuhe/InstantID-FaceID-6M/resolve/main/controlnet/diffusion_pytorch_model.safetensors",
25
+ root / "controlnet" / "Super-shuheInstantID-FaceID-6M_Controlnet.safetensors"
26
  )
27
  wget(
28
  "https://huggingface.co/boopyfloopy/gonzalomoXLFluxPony_v40UnityXLDMD/resolve/main/gonzalomoXLFluxPony_v40UnityXLDMD.safetensors",
 
31
  wget(
32
  "https://huggingface.co/AiWise/epiCPhoto-XL-LoRA-Derp2/resolve/main/epiCPhotoXL-LoRA-Derp2.safetensors",
33
  root / "loras" / "epiCPhotoXL-Derp2.safetensors"
34
+ )