Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,10 @@ LTX_COMMIT = "ae855f8538843825f9015a419cf4ba5edaf5eec2" # known working commit
|
|
| 18 |
if not os.path.exists(LTX_REPO_DIR):
|
| 19 |
print(f"Cloning {LTX_REPO_URL}...")
|
| 20 |
subprocess.run(["git", "clone", LTX_REPO_URL, LTX_REPO_DIR], check=True)
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
print("Installing ltx-core and ltx-pipelines from cloned repo...")
|
| 24 |
subprocess.run(
|
|
@@ -339,7 +342,7 @@ print(f"Gemma root: {gemma_root}")
|
|
| 339 |
|
| 340 |
# Initialize pipeline WITH text encoder and optional audio support
|
| 341 |
# ---- Replace block (pipeline init) lines 275-281 ----
|
| 342 |
-
pipeline =
|
| 343 |
distilled_checkpoint_path=checkpoint_path,
|
| 344 |
spatial_upsampler_path=spatial_upsampler_path,
|
| 345 |
gemma_root=gemma_root,
|
|
@@ -658,7 +661,7 @@ def generate_video(
|
|
| 658 |
|
| 659 |
log_memory("before pipeline call")
|
| 660 |
|
| 661 |
-
|
| 662 |
|
| 663 |
video, audio = pipeline(
|
| 664 |
prompt=prompt,
|
|
|
|
| 18 |
if not os.path.exists(LTX_REPO_DIR):
|
| 19 |
print(f"Cloning {LTX_REPO_URL}...")
|
| 20 |
subprocess.run(["git", "clone", LTX_REPO_URL, LTX_REPO_DIR], check=True)
|
| 21 |
+
|
| 22 |
+
print(f"Checking out pinned commit {LTX_COMMIT}...")
|
| 23 |
+
subprocess.run(["git", "fetch", "--all", "--tags"], cwd=LTX_REPO_DIR, check=True)
|
| 24 |
+
subprocess.run(["git", "checkout", LTX_COMMIT], cwd=LTX_REPO_DIR, check=True)
|
| 25 |
|
| 26 |
print("Installing ltx-core and ltx-pipelines from cloned repo...")
|
| 27 |
subprocess.run(
|
|
|
|
| 342 |
|
| 343 |
# Initialize pipeline WITH text encoder and optional audio support
|
| 344 |
# ---- Replace block (pipeline init) lines 275-281 ----
|
| 345 |
+
pipeline = LTX23NegativePromptTwoStagePipeline(
|
| 346 |
distilled_checkpoint_path=checkpoint_path,
|
| 347 |
spatial_upsampler_path=spatial_upsampler_path,
|
| 348 |
gemma_root=gemma_root,
|
|
|
|
| 661 |
|
| 662 |
log_memory("before pipeline call")
|
| 663 |
|
| 664 |
+
apply_prepared_lora_config_to_pipeline()
|
| 665 |
|
| 666 |
video, audio = pipeline(
|
| 667 |
prompt=prompt,
|