← back to Exo
pr fixes
f337e78119ec799b34a1bbaf68ade9c9571d5f05 · 2024-11-19 10:26:15 -0800 · josh
Files touched
M exo/download/hf/hf_helpers.pyM setup.py
Diff
commit f337e78119ec799b34a1bbaf68ade9c9571d5f05
Author: josh <eyasufikru567@gmail.com>
Date: Tue Nov 19 10:26:15 2024 -0800
pr fixes
---
exo/download/hf/hf_helpers.py | 15 +++++++--------
setup.py | 2 +-
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/exo/download/hf/hf_helpers.py b/exo/download/hf/hf_helpers.py
index 97288bd7..6acd964a 100644
--- a/exo/download/hf/hf_helpers.py
+++ b/exo/download/hf/hf_helpers.py
@@ -110,15 +110,14 @@ async def move_models_to_hf(seed_dir: Union[str, Path]):
source_dir = Path(seed_dir)
dest_dir = get_hf_home()/"hub"
await aios.makedirs(dest_dir, exist_ok=True)
- for path in source_dir.iterdir():
+ async for path in async_iterdir(source_dir):
if path.is_dir() and path.name.startswith("models--"):
- dest_path = dest_dir / path.name
- if dest_path.exists():
- if DEBUG >= 1:
- print(f"skipping moving {dest_path}. File already exists")
- else:
- await aios.rename(str(path), str(dest_path))
-
+ dest_path = dest_dir / path.name
+ if await async_exists(dest_path):
+ if DEBUG >= 1: print(f"skipping moving {dest_path}. File already exists")
+ else:
+ await aios.rename(str(path), str(dest_path))
+
async def fetch_file_list(session, repo_id, revision, path=""):
api_url = f"{get_hf_endpoint()}/api/models/{repo_id}/tree/{revision}"
diff --git a/setup.py b/setup.py
index 4f2769d5..c337fd9e 100644
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@ install_requires = [
"rich==13.7.1",
"tenacity==9.0.0",
"tqdm==4.66.4",
- "transformers==4.43.3",
+ "transformers==4.46.3",
"uuid==1.30",
"tinygrad @ git+https://github.com/tinygrad/tinygrad.git@232edcfd4f8b388807c64fb1817a7668ce27cbad",
]
← 62acc1af missing lib
·
back to Exo
·
Stable stable diffusion mlx 6b28ef03 →