Spaces:
Paused
Paused
Update api/ltx/ltx_utils.py
Browse files- api/ltx/ltx_utils.py +7 -7
api/ltx/ltx_utils.py
CHANGED
|
@@ -108,15 +108,15 @@ def build_ltx_pipeline_on_cpu(config: Dict) -> Tuple[LTXVideoPipeline, Optional[
|
|
| 108 |
prompt_enhancer_llm_model=None, prompt_enhancer_llm_tokenizer=None,
|
| 109 |
)
|
| 110 |
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
|
| 118 |
logging.info(f"LTX pipeline built on CPU in {time.perf_counter() - t0:.2f}s")
|
| 119 |
-
return pipeline,
|
| 120 |
|
| 121 |
|
| 122 |
# ==============================================================================
|
|
|
|
| 108 |
prompt_enhancer_llm_model=None, prompt_enhancer_llm_tokenizer=None,
|
| 109 |
)
|
| 110 |
|
| 111 |
+
latent_upsampler = None
|
| 112 |
+
if config.get("spatial_upscaler_model_path"):
|
| 113 |
+
spatial_path = config["spatial_upscaler_model_path"]
|
| 114 |
+
latent_upsampler = create_latent_upsampler(spatial_path, device="cpu")
|
| 115 |
+
if precision == "bfloat16":
|
| 116 |
+
latent_upsampler.to(torch.bfloat16)
|
| 117 |
|
| 118 |
logging.info(f"LTX pipeline built on CPU in {time.perf_counter() - t0:.2f}s")
|
| 119 |
+
return pipeline, latent_upsampler
|
| 120 |
|
| 121 |
|
| 122 |
# ==============================================================================
|