rishi commited on
Commit
2915200
·
1 Parent(s): bfa7d21

added git lfs to install

Browse files
Files changed (2) hide show
  1. README.md +10 -0
  2. install.py +13 -8
README.md CHANGED
@@ -42,6 +42,16 @@ A tool for improving facial consistency and quality in AI-generated images. Dram
42
  python -m pip install -r requirements.txt
43
  ```
44
 
 
 
 
 
 
 
 
 
 
 
45
  3. Run the install script:
46
  ```
47
  python install.py
 
42
  python -m pip install -r requirements.txt
43
  ```
44
 
45
+ <details>
46
+ <summary>If you want a specific PyTorch+CUDA version</summary>
47
+
48
+ ```bash
49
+ python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
50
+ python -m pip install xformers --index-url https://download.pytorch.org/whl/cu124
51
+ ```
52
+
53
+ </details>
54
+
55
  3. Run the install script:
56
  ```
57
  python install.py
install.py CHANGED
@@ -2,8 +2,8 @@ import os
2
 
3
  COMFYUI_PATH = "./ComfyUI"
4
 
5
- CACHE_PATH = os.getenv('HF_HOME')
6
- os.makedirs(CACHE_PATH, exist_ok=True)
7
 
8
 
9
  def run_cmd(command):
@@ -15,6 +15,14 @@ def run_cmd(command):
15
  exit(1)
16
 
17
 
 
 
 
 
 
 
 
 
18
  def install_git_repo(repo_url, install_path, requirements=False, submodules=False):
19
  """Clone or update a git repository and handle its dependencies"""
20
  original_dir = os.getcwd()
@@ -72,7 +80,8 @@ def download_huggingface_models():
72
  model_path = hf_hub_download(
73
  repo_id=model["repo_id"],
74
  filename=model["filename"],
75
- cache_dir=CACHE_PATH,
 
76
  repo_type=model.get("repo_type", "model"),
77
  token=os.getenv('HUGGINGFACE_TOKEN')
78
  )
@@ -172,11 +181,6 @@ def install_custom_nodes():
172
  "name": "ComfyUI_FaceAnalysis",
173
  "requirements": False
174
  },
175
- # {
176
- # "repo": "https://github.com/pydn/ComfyUI-to-Python-Extension",
177
- # "name": "ComfyUI-to-Python-Extension",
178
- # "requirements": True
179
- # },
180
  ]
181
 
182
  for node in custom_nodes:
@@ -194,6 +198,7 @@ def install_custom_nodes():
194
 
195
 
196
  def install():
 
197
  install_comfyui()
198
  install_custom_nodes()
199
  download_huggingface_models()
 
2
 
3
  COMFYUI_PATH = "./ComfyUI"
4
 
5
+ HF_CACHE = os.getenv('HF_HOME')
6
+ os.makedirs(HF_CACHE, exist_ok=True)
7
 
8
 
9
  def run_cmd(command):
 
15
  exit(1)
16
 
17
 
18
+ def install_lfs_files():
19
+ """Install dependencies, pull git lfs files."""
20
+ run_cmd("apt-get update && apt-get install -y git-lfs")
21
+ run_cmd("git lfs install")
22
+ run_cmd("git lfs pull")
23
+ print("✅ Git LFS installed and files pulled.")
24
+
25
+
26
  def install_git_repo(repo_url, install_path, requirements=False, submodules=False):
27
  """Clone or update a git repository and handle its dependencies"""
28
  original_dir = os.getcwd()
 
80
  model_path = hf_hub_download(
81
  repo_id=model["repo_id"],
82
  filename=model["filename"],
83
+ cache_dir=HF_CACHE
84
+ ,
85
  repo_type=model.get("repo_type", "model"),
86
  token=os.getenv('HUGGINGFACE_TOKEN')
87
  )
 
181
  "name": "ComfyUI_FaceAnalysis",
182
  "requirements": False
183
  },
 
 
 
 
 
184
  ]
185
 
186
  for node in custom_nodes:
 
198
 
199
 
200
  def install():
201
+ install_lfs_fil()
202
  install_comfyui()
203
  install_custom_nodes()
204
  download_huggingface_models()