Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -263,7 +263,23 @@ print("=" * 80)
|
|
| 263 |
print("Pipeline fully loaded and ready!")
|
| 264 |
print("=" * 80)
|
| 265 |
|
| 266 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 267 |
def generate_video(
|
| 268 |
input_image,
|
| 269 |
prompt: str,
|
|
|
|
| 263 |
print("Pipeline fully loaded and ready!")
|
| 264 |
print("=" * 80)
|
| 265 |
|
| 266 |
+
def get_duration(
|
| 267 |
+
input_image,
|
| 268 |
+
prompt,
|
| 269 |
+
duration,
|
| 270 |
+
enhance_prompt,
|
| 271 |
+
seed,
|
| 272 |
+
randomize_seed,
|
| 273 |
+
height,
|
| 274 |
+
width,
|
| 275 |
+
progress)
|
| 276 |
+
):
|
| 277 |
+
if duration <= 5:
|
| 278 |
+
return 80
|
| 279 |
+
else:
|
| 280 |
+
return 120
|
| 281 |
+
|
| 282 |
+
@spaces.GPU(duration=get_duration)
|
| 283 |
def generate_video(
|
| 284 |
input_image,
|
| 285 |
prompt: str,
|