Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -28,15 +28,11 @@ config_file_path = "configs/ltxv-13b-0.9.7-distilled.yaml"
|
|
28 |
with open(config_file_path, "r") as file:
|
29 |
PIPELINE_CONFIG_YAML = yaml.safe_load(file)
|
30 |
|
31 |
-
|
32 |
-
DISTILLED_MODEL_REPO = "LTX-Colab/LTX-Video-Preview"
|
33 |
-
DISTILLED_MODEL_FILENAME = "ltxv-13b-0.9.7-distilled-rc3.safetensors"
|
34 |
-
|
35 |
-
UPSCALER_REPO = "Lightricks/LTX-Video"
|
36 |
-
|
37 |
MAX_IMAGE_SIZE = PIPELINE_CONFIG_YAML.get("max_resolution", 1280)
|
38 |
MAX_NUM_FRAMES = 257
|
39 |
-
|
|
|
40 |
|
41 |
# --- Global variables for loaded models ---
|
42 |
pipeline_instance = None
|
@@ -46,8 +42,8 @@ Path(models_dir).mkdir(parents=True, exist_ok=True)
|
|
46 |
|
47 |
print("Downloading models (if not present)...")
|
48 |
distilled_model_actual_path = hf_hub_download(
|
49 |
-
repo_id=
|
50 |
-
filename=
|
51 |
local_dir=models_dir,
|
52 |
local_dir_use_symlinks=False
|
53 |
)
|
@@ -56,7 +52,7 @@ print(f"Distilled model path: {distilled_model_actual_path}")
|
|
56 |
|
57 |
SPATIAL_UPSCALER_FILENAME = PIPELINE_CONFIG_YAML["spatial_upscaler_model_path"]
|
58 |
spatial_upscaler_actual_path = hf_hub_download(
|
59 |
-
repo_id=
|
60 |
filename=SPATIAL_UPSCALER_FILENAME,
|
61 |
local_dir=models_dir,
|
62 |
local_dir_use_symlinks=False
|
|
|
28 |
with open(config_file_path, "r") as file:
|
29 |
PIPELINE_CONFIG_YAML = yaml.safe_load(file)
|
30 |
|
31 |
+
LTX_REPO = "Lightricks/LTX-Video"
|
|
|
|
|
|
|
|
|
|
|
32 |
MAX_IMAGE_SIZE = PIPELINE_CONFIG_YAML.get("max_resolution", 1280)
|
33 |
MAX_NUM_FRAMES = 257
|
34 |
+
|
35 |
+
FPS = 30.0
|
36 |
|
37 |
# --- Global variables for loaded models ---
|
38 |
pipeline_instance = None
|
|
|
42 |
|
43 |
print("Downloading models (if not present)...")
|
44 |
distilled_model_actual_path = hf_hub_download(
|
45 |
+
repo_id=LTX_REPO,
|
46 |
+
filename=PIPELINE_CONFIG_YAML["checkpoint_path"],
|
47 |
local_dir=models_dir,
|
48 |
local_dir_use_symlinks=False
|
49 |
)
|
|
|
52 |
|
53 |
SPATIAL_UPSCALER_FILENAME = PIPELINE_CONFIG_YAML["spatial_upscaler_model_path"]
|
54 |
spatial_upscaler_actual_path = hf_hub_download(
|
55 |
+
repo_id=LTX_REPO,
|
56 |
filename=SPATIAL_UPSCALER_FILENAME,
|
57 |
local_dir=models_dir,
|
58 |
local_dir_use_symlinks=False
|