rahul7star commited on
Commit
d2b6d4d
·
verified ·
1 Parent(s): 0cb8f5b

Update app_t2v.py

Browse files
Files changed (1) hide show
  1. app_t2v.py +2 -0
app_t2v.py CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
2
  import torch
3
  from diffusers import WanPipeline, AutoencoderKLWan
4
  from diffusers.utils import export_to_video
 
5
  import os
6
  import uuid
7
 
@@ -29,6 +30,7 @@ DEFAULT_NEGATIVE_PROMPT = (
29
  )
30
 
31
  # Inference function
 
32
  def generate_video(prompt, num_frames=81, steps=40, scale=4.0, scale2=3.0):
33
  if not prompt.strip():
34
  return "Prompt is empty.", None
 
2
  import torch
3
  from diffusers import WanPipeline, AutoencoderKLWan
4
  from diffusers.utils import export_to_video
5
+ import spaces
6
  import os
7
  import uuid
8
 
 
30
  )
31
 
32
  # Inference function
33
+ @spaces.GPU(duration=150)
34
  def generate_video(prompt, num_frames=81, steps=40, scale=4.0, scale2=3.0):
35
  if not prompt.strip():
36
  return "Prompt is empty.", None