Spaces:
Paused
Paused
Update api/ltx/ltx_aduc_pipeline.py
Browse files
api/ltx/ltx_aduc_pipeline.py
CHANGED
|
@@ -235,9 +235,11 @@ class LtxAducPipeline:
|
|
| 235 |
|
| 236 |
# 5. Carrega o Latent Upsampler (também na CPU)
|
| 237 |
latent_upsampler = None
|
| 238 |
-
if
|
| 239 |
-
|
| 240 |
-
spatial_path =
|
|
|
|
|
|
|
| 241 |
latent_upsampler = create_latent_upsampler(spatial_path, device="cpu")
|
| 242 |
if precision == "bfloat16":
|
| 243 |
latent_upsampler.to(torch.bfloat16)
|
|
|
|
| 235 |
|
| 236 |
# 5. Carrega o Latent Upsampler (também na CPU)
|
| 237 |
latent_upsampler = None
|
| 238 |
+
if config.get("spatial_upscaler_model_path"):
|
| 239 |
+
spatial_path_str = hf_hub_download(repo_id=LTX_REPO_ID, filename=config["spatial_upscaler_model_path"], cache_dir=CACHE_DIR)
|
| 240 |
+
spatial_path = Path(spatial_path_str)
|
| 241 |
+
if not ckpt_path.is_file():
|
| 242 |
+
raise FileNotFoundError(f"Main checkpoint file not found: {spatial_path}")
|
| 243 |
latent_upsampler = create_latent_upsampler(spatial_path, device="cpu")
|
| 244 |
if precision == "bfloat16":
|
| 245 |
latent_upsampler.to(torch.bfloat16)
|