Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,6 @@ import subprocess
|
|
| 8 |
import sys
|
| 9 |
import time
|
| 10 |
from pathlib import Path
|
| 11 |
-
import spaces
|
| 12 |
|
| 13 |
# Clone LTX-2 repo and install packages
|
| 14 |
LTX_REPO_URL = "https://github.com/Lightricks/LTX-2.git"
|
|
@@ -18,21 +17,19 @@ if not os.path.exists(LTX_REPO_DIR):
|
|
| 18 |
print(f"Cloning {LTX_REPO_URL}...")
|
| 19 |
subprocess.run(["git", "clone", "--depth", "1", LTX_REPO_URL, LTX_REPO_DIR], check=True)
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
"-e", os.path.join(LTX_REPO_DIR, "packages", "ltx-pipelines")],
|
| 29 |
-
check=True,
|
| 30 |
-
)
|
| 31 |
|
| 32 |
sys.path.insert(0, os.path.join(LTX_REPO_DIR, "packages", "ltx-pipelines", "src"))
|
| 33 |
sys.path.insert(0, os.path.join(LTX_REPO_DIR, "packages", "ltx-core", "src"))
|
| 34 |
|
| 35 |
import numpy as np
|
|
|
|
| 36 |
import gradio as gr
|
| 37 |
import torch
|
| 38 |
from huggingface_hub import hf_hub_download, snapshot_download
|
|
|
|
| 8 |
import sys
|
| 9 |
import time
|
| 10 |
from pathlib import Path
|
|
|
|
| 11 |
|
| 12 |
# Clone LTX-2 repo and install packages
|
| 13 |
LTX_REPO_URL = "https://github.com/Lightricks/LTX-2.git"
|
|
|
|
| 17 |
print(f"Cloning {LTX_REPO_URL}...")
|
| 18 |
subprocess.run(["git", "clone", "--depth", "1", LTX_REPO_URL, LTX_REPO_DIR], check=True)
|
| 19 |
|
| 20 |
+
print("Installing ltx-core and ltx-pipelines from cloned repo...")
|
| 21 |
+
subprocess.run(
|
| 22 |
+
[sys.executable, "-m", "pip", "install", "--force-reinstall", "--no-deps", "-e",
|
| 23 |
+
os.path.join(LTX_REPO_DIR, "packages", "ltx-core"),
|
| 24 |
+
"-e", os.path.join(LTX_REPO_DIR, "packages", "ltx-pipelines")],
|
| 25 |
+
check=True,
|
| 26 |
+
)
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
sys.path.insert(0, os.path.join(LTX_REPO_DIR, "packages", "ltx-pipelines", "src"))
|
| 29 |
sys.path.insert(0, os.path.join(LTX_REPO_DIR, "packages", "ltx-core", "src"))
|
| 30 |
|
| 31 |
import numpy as np
|
| 32 |
+
import spaces
|
| 33 |
import gradio as gr
|
| 34 |
import torch
|
| 35 |
from huggingface_hub import hf_hub_download, snapshot_download
|