Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -85,7 +85,7 @@ print("Downloading LTX-2.3 distilled model + Gemma...")
|
|
| 85 |
print("=" * 80)
|
| 86 |
|
| 87 |
checkpoint_path = hf_hub_download(repo_id=LTX_MODEL_REPO, filename="ltx-2.3-22b-distilled.safetensors")
|
| 88 |
-
spatial_upsampler_path = hf_hub_download(repo_id=LTX_MODEL_REPO, filename="ltx-2.3-spatial-upscaler-x2-1.
|
| 89 |
gemma_root = snapshot_download(repo_id=GEMMA_REPO)
|
| 90 |
|
| 91 |
print(f"Checkpoint: {checkpoint_path}")
|
|
@@ -102,7 +102,7 @@ pipeline = DistilledPipeline(
|
|
| 102 |
)
|
| 103 |
|
| 104 |
# Preload all models for ZeroGPU tensor packing.
|
| 105 |
-
|
| 106 |
print("Inspecting DistilledPipeline internals for ZeroGPU preloading...")
|
| 107 |
_model_attrs = [a for a in dir(pipeline) if not a.startswith('_')]
|
| 108 |
print(f"Available attributes: {_model_attrs}")
|
|
@@ -143,6 +143,10 @@ print("=" * 80)
|
|
| 143 |
print("Pipeline ready!")
|
| 144 |
print("=" * 80)
|
| 145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
|
| 147 |
def log_memory(tag: str):
|
| 148 |
if torch.cuda.is_available():
|
|
@@ -275,7 +279,7 @@ with gr.Blocks(title="LTX-2.3 Distilled") as demo:
|
|
| 275 |
lines=3,
|
| 276 |
placeholder="Describe the motion and animation you want...",
|
| 277 |
)
|
| 278 |
-
|
| 279 |
with gr.Row():
|
| 280 |
duration = gr.Slider(label="Duration (seconds)", minimum=1.0, maximum=10.0, value=3.0, step=0.1)
|
| 281 |
with gr.Column():
|
|
@@ -324,4 +328,5 @@ css = """
|
|
| 324 |
"""
|
| 325 |
|
| 326 |
if __name__ == "__main__":
|
| 327 |
-
demo.launch(theme=gr.themes.Citrus(), css=css)
|
|
|
|
|
|
| 85 |
print("=" * 80)
|
| 86 |
|
| 87 |
checkpoint_path = hf_hub_download(repo_id=LTX_MODEL_REPO, filename="ltx-2.3-22b-distilled.safetensors")
|
| 88 |
+
spatial_upsampler_path = hf_hub_download(repo_id=LTX_MODEL_REPO, filename="ltx-2.3-spatial-upscaler-x2-1.0.safetensors")
|
| 89 |
gemma_root = snapshot_download(repo_id=GEMMA_REPO)
|
| 90 |
|
| 91 |
print(f"Checkpoint: {checkpoint_path}")
|
|
|
|
| 102 |
)
|
| 103 |
|
| 104 |
# Preload all models for ZeroGPU tensor packing.
|
| 105 |
+
print("Preloading all models (including Gemma)...")
|
| 106 |
print("Inspecting DistilledPipeline internals for ZeroGPU preloading...")
|
| 107 |
_model_attrs = [a for a in dir(pipeline) if not a.startswith('_')]
|
| 108 |
print(f"Available attributes: {_model_attrs}")
|
|
|
|
| 143 |
print("Pipeline ready!")
|
| 144 |
print("=" * 80)
|
| 145 |
|
| 146 |
+
print("=" * 80)
|
| 147 |
+
print("Pipeline ready!")
|
| 148 |
+
print("=" * 80)
|
| 149 |
+
|
| 150 |
|
| 151 |
def log_memory(tag: str):
|
| 152 |
if torch.cuda.is_available():
|
|
|
|
| 279 |
lines=3,
|
| 280 |
placeholder="Describe the motion and animation you want...",
|
| 281 |
)
|
| 282 |
+
|
| 283 |
with gr.Row():
|
| 284 |
duration = gr.Slider(label="Duration (seconds)", minimum=1.0, maximum=10.0, value=3.0, step=0.1)
|
| 285 |
with gr.Column():
|
|
|
|
| 328 |
"""
|
| 329 |
|
| 330 |
if __name__ == "__main__":
|
| 331 |
+
demo.launch(theme=gr.themes.Citrus(), css=css)
|
| 332 |
+
|