GiorgioV commited on
Commit
ff89f6c
·
verified ·
1 Parent(s): 710d7c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -22
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, steps, 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
 
 
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