Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -355,7 +355,31 @@ print("=" * 80)
|
|
| 355 |
print("Downloading LTX-2.3 HQ models...")
|
| 356 |
print("=" * 80)
|
| 357 |
|
| 358 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 359 |
spatial_upsampler_path = hf_hub_download(repo_id=LTX_MODEL_REPO, filename="ltx-2.3-spatial-upscaler-x2-1.1.safetensors")
|
| 360 |
distilled_lora_path = hf_hub_download(repo_id=LTX_MODEL_REPO, filename="ltx-2.3-22b-distilled-lora-384.safetensors")
|
| 361 |
gemma_root = snapshot_download(repo_id=GEMMA_REPO)
|
|
|
|
| 355 |
print("Downloading LTX-2.3 HQ models...")
|
| 356 |
print("=" * 80)
|
| 357 |
|
| 358 |
+
weights_dir = Path("weights")
|
| 359 |
+
weights_dir.mkdir(exist_ok=True)
|
| 360 |
+
|
| 361 |
+
checkpoint_path = hf_hub_download(
|
| 362 |
+
repo_id=LTX_MODEL_REPO,
|
| 363 |
+
filename="ltx-2.3-22b-dev.safetensors",
|
| 364 |
+
local_dir=str(weights_dir),
|
| 365 |
+
local_dir_use_symlinks=False, # Ensure actual file copy, not symlink
|
| 366 |
+
)
|
| 367 |
+
|
| 368 |
+
# Force download if not present
|
| 369 |
+
if not os.path.exists(checkpoint_path):
|
| 370 |
+
print(f"Re-downloading checkpoint to {weights_dir}...")
|
| 371 |
+
checkpoint_path = hf_hub_download(
|
| 372 |
+
repo_id=LTX_MODEL_REPO,
|
| 373 |
+
filename="ltx-2.3-22b-dev.safetensors",
|
| 374 |
+
local_dir=str(weights_dir),
|
| 375 |
+
local_dir_use_symlinks=False,
|
| 376 |
+
force_download=True,
|
| 377 |
+
)
|
| 378 |
+
|
| 379 |
+
print(f"Checkpoint at: {checkpoint_path}")
|
| 380 |
+
print(f"File exists: {os.path.exists(checkpoint_path)}")
|
| 381 |
+
print(f"File size: {os.path.getsize(checkpoint_path) / 1024**3:.2f} GB")
|
| 382 |
+
|
| 383 |
spatial_upsampler_path = hf_hub_download(repo_id=LTX_MODEL_REPO, filename="ltx-2.3-spatial-upscaler-x2-1.1.safetensors")
|
| 384 |
distilled_lora_path = hf_hub_download(repo_id=LTX_MODEL_REPO, filename="ltx-2.3-22b-distilled-lora-384.safetensors")
|
| 385 |
gemma_root = snapshot_download(repo_id=GEMMA_REPO)
|