Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -81,39 +81,6 @@ pipeline = TI2VidTwoStagesPipeline(
|
|
| 81 |
local_files_only=False
|
| 82 |
)
|
| 83 |
|
| 84 |
-
# print("=" * 80)
|
| 85 |
-
# print("Warming up pipeline (loading Gemma text encoder)...")
|
| 86 |
-
# print("=" * 80)
|
| 87 |
-
|
| 88 |
-
# # Do a dummy warmup to load all models including Gemma
|
| 89 |
-
# import tempfile
|
| 90 |
-
# import os
|
| 91 |
-
# warmup_output = tempfile.mktemp(suffix=".mp4")
|
| 92 |
-
# try:
|
| 93 |
-
# pipeline(
|
| 94 |
-
# prompt="warmup",
|
| 95 |
-
# negative_prompt="",
|
| 96 |
-
# output_path=warmup_output,
|
| 97 |
-
# seed=42,
|
| 98 |
-
# height=256,
|
| 99 |
-
# width=256,
|
| 100 |
-
# num_frames=9,
|
| 101 |
-
# frame_rate=8,
|
| 102 |
-
# num_inference_steps=1,
|
| 103 |
-
# cfg_guidance_scale=1.0,
|
| 104 |
-
# images=[],
|
| 105 |
-
# tiling_config=TilingConfig.default(),
|
| 106 |
-
# )
|
| 107 |
-
# # Clean up warmup output
|
| 108 |
-
# if os.path.exists(warmup_output):
|
| 109 |
-
# os.remove(warmup_output)
|
| 110 |
-
# except Exception as e:
|
| 111 |
-
# print(f"Warmup completed with note: {e}")
|
| 112 |
-
|
| 113 |
-
# print("=" * 80)
|
| 114 |
-
# print("Pipeline fully loaded and ready!")
|
| 115 |
-
# print("=" * 80)
|
| 116 |
-
|
| 117 |
@spaces.GPU(duration=300)
|
| 118 |
def generate_video(
|
| 119 |
input_image,
|
|
@@ -187,7 +154,7 @@ with gr.Blocks(title="LTX-2 Video 🎥🔈") as demo:
|
|
| 187 |
with gr.Row():
|
| 188 |
with gr.Column():
|
| 189 |
input_image = gr.Image(
|
| 190 |
-
label="Input Image",
|
| 191 |
type="pil",
|
| 192 |
)
|
| 193 |
|
|
|
|
| 81 |
local_files_only=False
|
| 82 |
)
|
| 83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
@spaces.GPU(duration=300)
|
| 85 |
def generate_video(
|
| 86 |
input_image,
|
|
|
|
| 154 |
with gr.Row():
|
| 155 |
with gr.Column():
|
| 156 |
input_image = gr.Image(
|
| 157 |
+
label="Input Image (Optional)",
|
| 158 |
type="pil",
|
| 159 |
)
|
| 160 |
|