eeuuia commited on
Commit
f2755cf
·
verified ·
1 Parent(s): 48b49ad

Update api/ltx/ltx_aduc_pipeline.py

Browse files
Files changed (1) hide show
  1. api/ltx/ltx_aduc_pipeline.py +5 -3
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 self.config.get("spatial_upscaler_model_path"):
239
- logging.info("Carregando Latent Upsampler...")
240
- spatial_path = self.config["spatial_upscaler_model_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)