Spaces:
Paused
Paused
Update api/ltx/ltx_utils.py
Browse files- api/ltx/ltx_utils.py +3 -2
api/ltx/ltx_utils.py
CHANGED
|
@@ -71,10 +71,11 @@ def build_ltx_pipeline_on_cpu(config: Dict) -> Tuple[LTXVideoPipeline, Optional[
|
|
| 71 |
t0 = time.perf_counter()
|
| 72 |
logging.info("Building LTX pipeline on CPU...")
|
| 73 |
|
| 74 |
-
|
|
|
|
| 75 |
if not ckpt_path.is_file():
|
| 76 |
raise FileNotFoundError(f"Main checkpoint file not found: {ckpt_path}")
|
| 77 |
-
|
| 78 |
with safe_open(ckpt_path, framework="pt") as f:
|
| 79 |
metadata = f.metadata() or {}
|
| 80 |
config_str = metadata.get("config", "{}")
|
|
|
|
| 71 |
t0 = time.perf_counter()
|
| 72 |
logging.info("Building LTX pipeline on CPU...")
|
| 73 |
|
| 74 |
+
ckpt_path_str = hf_hub_download(repo_id=LTX_REPO_ID, filename=config["checkpoint_path"], cache_dir=CACHE_DIR)
|
| 75 |
+
ckpt_path = Path(ckpt_path_str)
|
| 76 |
if not ckpt_path.is_file():
|
| 77 |
raise FileNotFoundError(f"Main checkpoint file not found: {ckpt_path}")
|
| 78 |
+
|
| 79 |
with safe_open(ckpt_path, framework="pt") as f:
|
| 80 |
metadata = f.metadata() or {}
|
| 81 |
config_str = metadata.get("config", "{}")
|