Update api/ltx_server.py
Browse files- api/ltx_server.py +9 -7
api/ltx_server.py
CHANGED
|
@@ -355,28 +355,30 @@ class VideoService:
|
|
| 355 |
|
| 356 |
def _load_models(self):
|
| 357 |
t0 = time.perf_counter()
|
| 358 |
-
|
| 359 |
#print("[DEBUG] Baixando checkpoint principal...")
|
| 360 |
-
|
|
|
|
| 361 |
# repo_id=LTX_REPO,
|
| 362 |
# filename=self.config["checkpoint_path"],
|
| 363 |
# local_dir=os.getenv("HF_HOME"),
|
| 364 |
# cache_dir=os.getenv("HF_HOME_CACHE"),
|
| 365 |
# token=os.getenv("HF_TOKEN"),
|
| 366 |
#)
|
| 367 |
-
|
| 368 |
-
|
| 369 |
|
| 370 |
#print("[DEBUG] Baixando upscaler espacial...")
|
| 371 |
-
|
|
|
|
| 372 |
# repo_id=LTX_REPO,
|
| 373 |
# filename=self.config["spatial_upscaler_model_path"],
|
| 374 |
# local_dir=os.getenv("HF_HOME"),
|
| 375 |
# cache_dir=os.getenv("HF_HOME_CACHE"),
|
| 376 |
# token=os.getenv("HF_TOKEN")
|
| 377 |
-
)
|
| 378 |
#self.config["spatial_upscaler_model_path"] = spatial_upscaler_path
|
| 379 |
-
|
| 380 |
|
| 381 |
print("[DEBUG] Construindo pipeline...")
|
| 382 |
pipeline = create_ltx_video_pipeline(
|
|
|
|
| 355 |
|
| 356 |
def _load_models(self):
|
| 357 |
t0 = time.perf_counter()
|
| 358 |
+
LTX_REPO = "Lightricks/LTX-Video"
|
| 359 |
#print("[DEBUG] Baixando checkpoint principal...")
|
| 360 |
+
distilled_model_path = self.config["checkpoint_path"]
|
| 361 |
+
#hf_hub_download(
|
| 362 |
# repo_id=LTX_REPO,
|
| 363 |
# filename=self.config["checkpoint_path"],
|
| 364 |
# local_dir=os.getenv("HF_HOME"),
|
| 365 |
# cache_dir=os.getenv("HF_HOME_CACHE"),
|
| 366 |
# token=os.getenv("HF_TOKEN"),
|
| 367 |
#)
|
| 368 |
+
self.config["checkpoint_path"] = distilled_model_path
|
| 369 |
+
print(f"[DEBUG] Checkpoint em: {distilled_model_path}")
|
| 370 |
|
| 371 |
#print("[DEBUG] Baixando upscaler espacial...")
|
| 372 |
+
spatial_upscaler_path = self.config["spatial_upscaler_model_path"],
|
| 373 |
+
hf_hub_download(
|
| 374 |
# repo_id=LTX_REPO,
|
| 375 |
# filename=self.config["spatial_upscaler_model_path"],
|
| 376 |
# local_dir=os.getenv("HF_HOME"),
|
| 377 |
# cache_dir=os.getenv("HF_HOME_CACHE"),
|
| 378 |
# token=os.getenv("HF_TOKEN")
|
| 379 |
+
#)
|
| 380 |
#self.config["spatial_upscaler_model_path"] = spatial_upscaler_path
|
| 381 |
+
print(f"[DEBUG] Upscaler em: {spatial_upscaler_path}")
|
| 382 |
|
| 383 |
print("[DEBUG] Construindo pipeline...")
|
| 384 |
pipeline = create_ltx_video_pipeline(
|