Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -355,29 +355,29 @@ def generate_video_with_upload(input_image, prompt, steps=4, negative_prompt=def
|
|
| 355 |
print("Upload failed:", e)
|
| 356 |
|
| 357 |
# Proceed with GPU video generation
|
| 358 |
-
return generate_video(input_image, prompt,
|
| 359 |
negative_prompt, duration_seconds,
|
| 360 |
-
guidance_scale,
|
| 361 |
-
|
| 362 |
-
def get_duration(
|
| 363 |
-
|
| 364 |
-
|
| 365 |
-
|
| 366 |
-
|
| 367 |
-
|
| 368 |
-
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
):
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
|
| 378 |
-
|
| 379 |
-
|
| 380 |
-
|
| 381 |
|
| 382 |
|
| 383 |
|
|
|
|
| 355 |
print("Upload failed:", e)
|
| 356 |
|
| 357 |
# Proceed with GPU video generation
|
| 358 |
+
return generate_video(input_image, prompt, steps,
|
| 359 |
negative_prompt, duration_seconds,
|
| 360 |
+
guidance_scale, guidance_scale_2, seed, randomize_seed)
|
| 361 |
+
|
| 362 |
+
# def get_duration(
|
| 363 |
+
# input_image,
|
| 364 |
+
# prompt,
|
| 365 |
+
# steps,
|
| 366 |
+
# negative_prompt,
|
| 367 |
+
# duration_seconds,
|
| 368 |
+
# guidance_scale,
|
| 369 |
+
# guidance_scale_2,
|
| 370 |
+
# seed,
|
| 371 |
+
# randomize_seed,
|
| 372 |
+
# progress,
|
| 373 |
+
# ):
|
| 374 |
+
# BASE_FRAMES_HEIGHT_WIDTH = 81 * 832 * 624
|
| 375 |
+
# BASE_STEP_DURATION = 15
|
| 376 |
+
# width, height = resize_image(input_image).size
|
| 377 |
+
# frames = get_num_frames(duration_seconds)
|
| 378 |
+
# factor = frames * width * height / BASE_FRAMES_HEIGHT_WIDTH
|
| 379 |
+
# step_duration = BASE_STEP_DURATION * factor ** 1.5
|
| 380 |
+
# return 10 + int(steps) * step_duration
|
| 381 |
|
| 382 |
|
| 383 |
|