Update app.py
Browse files
app.py
CHANGED
|
@@ -13,9 +13,12 @@ subprocess.run([sys.executable, "-m", "pip", "install", "xformers==0.0.32.post2"
|
|
| 13 |
LTX_REPO_URL = "https://github.com/Lightricks/LTX-2.git"
|
| 14 |
LTX_REPO_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "LTX-2")
|
| 15 |
|
|
|
|
|
|
|
| 16 |
if not os.path.exists(LTX_REPO_DIR):
|
| 17 |
print(f"Cloning {LTX_REPO_URL}...")
|
| 18 |
-
subprocess.run(["git", "clone",
|
|
|
|
| 19 |
|
| 20 |
print("Installing ltx-core and ltx-pipelines from cloned repo...")
|
| 21 |
subprocess.run(
|
|
@@ -48,8 +51,7 @@ from ltx_core.components.diffusion_steps import EulerDiffusionStep
|
|
| 48 |
from ltx_core.components.noisers import GaussianNoiser
|
| 49 |
from ltx_core.model.audio_vae import encode_audio as vae_encode_audio
|
| 50 |
from ltx_core.model.upsampler import upsample_video
|
| 51 |
-
from ltx_core.model.video_vae import TilingConfig, get_video_chunks_number
|
| 52 |
-
from ltx_core.model.video_vae.video_vae import decode_video as vae_decode_video
|
| 53 |
from ltx_core.quantization import QuantizationPolicy
|
| 54 |
from ltx_core.types import Audio, AudioLatentShape, VideoPixelShape
|
| 55 |
from ltx_pipelines.distilled import DistilledPipeline
|
|
|
|
| 13 |
LTX_REPO_URL = "https://github.com/Lightricks/LTX-2.git"
|
| 14 |
LTX_REPO_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "LTX-2")
|
| 15 |
|
| 16 |
+
LTX_COMMIT = "9f6f8b6" # known working commit with decode_video
|
| 17 |
+
|
| 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 |
+
subprocess.run(["git", "checkout", LTX_COMMIT], cwd=LTX_REPO_DIR, check=True)
|
| 22 |
|
| 23 |
print("Installing ltx-core and ltx-pipelines from cloned repo...")
|
| 24 |
subprocess.run(
|
|
|
|
| 51 |
from ltx_core.components.noisers import GaussianNoiser
|
| 52 |
from ltx_core.model.audio_vae import encode_audio as vae_encode_audio
|
| 53 |
from ltx_core.model.upsampler import upsample_video
|
| 54 |
+
from ltx_core.model.video_vae import TilingConfig, get_video_chunks_number, decode_video as vae_decode_video
|
|
|
|
| 55 |
from ltx_core.quantization import QuantizationPolicy
|
| 56 |
from ltx_core.types import Audio, AudioLatentShape, VideoPixelShape
|
| 57 |
from ltx_pipelines.distilled import DistilledPipeline
|