multimodalart HF staff commited on
Commit
e26c748
1 Parent(s): ad0cea8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -64,7 +64,7 @@ model = load_model()
64
  # Text-to-video generation function
65
  @spaces.GPU(duration=240)
66
  def generate_video(image, prompt, duration, guidance_scale, video_guidance_scale):
67
- temp = int(duration * 2.4) # Convert seconds to temp value (assuming 24 FPS)
68
  torch_dtype = torch.bfloat16 if MODEL_DTYPE == "bf16" else torch.float32
69
  if(image):
70
  cropped_image = center_crop(image, 1280, 720)
@@ -95,7 +95,7 @@ def generate_video(image, prompt, duration, guidance_scale, video_guidance_scale
95
  save_memory=True,
96
  )
97
  output_path = f"{str(uuid.uuid4())}_output_video.mp4"
98
- export_to_video(frames, output_path, fps=24)
99
  return output_path
100
 
101
  # Image-to-video generation function
 
64
  # Text-to-video generation function
65
  @spaces.GPU(duration=240)
66
  def generate_video(image, prompt, duration, guidance_scale, video_guidance_scale):
67
+ temp = int(duration * 0.8) # Convert seconds to temp value (assuming 24 FPS)
68
  torch_dtype = torch.bfloat16 if MODEL_DTYPE == "bf16" else torch.float32
69
  if(image):
70
  cropped_image = center_crop(image, 1280, 720)
 
95
  save_memory=True,
96
  )
97
  output_path = f"{str(uuid.uuid4())}_output_video.mp4"
98
+ export_to_video(frames, output_path, fps=8)
99
  return output_path
100
 
101
  # Image-to-video generation function