hanzla commited on
Commit
f9a5dfd
·
1 Parent(s): c19b47e

sliders added

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -20,12 +20,12 @@ scheduler = DDIMScheduler.from_pretrained(
20
  )
21
  pipe.scheduler = scheduler
22
  @spaces.GPU
23
- def generate_video(prompt, guidance_scale, num_inference_steps):
24
  pipe.to(device)
25
  output = pipe(
26
  prompt=prompt,
27
  negative_prompt="bad quality, worse quality",
28
- num_frames=16,
29
  guidance_scale=guidance_scale,
30
  num_inference_steps=num_inference_steps,
31
  )
@@ -41,6 +41,7 @@ iface = gr.Interface(
41
  gr.Textbox(label="Enter your prompt"),
42
  gr.Slider(minimum=0.5, maximum=10, value=7.5, label="Guidance Scale"),
43
  gr.Slider(minimum=4, maximum=24, step=4, value=4, label="Inference Steps"),
 
44
  ],
45
  outputs=gr.Video(label="Generated Video"),
46
  )
 
20
  )
21
  pipe.scheduler = scheduler
22
  @spaces.GPU
23
+ def generate_video(prompt, guidance_scale, num_inference_steps,num_frames):
24
  pipe.to(device)
25
  output = pipe(
26
  prompt=prompt,
27
  negative_prompt="bad quality, worse quality",
28
+ num_frames=num_frames,
29
  guidance_scale=guidance_scale,
30
  num_inference_steps=num_inference_steps,
31
  )
 
41
  gr.Textbox(label="Enter your prompt"),
42
  gr.Slider(minimum=0.5, maximum=10, value=7.5, label="Guidance Scale"),
43
  gr.Slider(minimum=4, maximum=24, step=4, value=4, label="Inference Steps"),
44
+ gr.Slider(minimum=16, maximum=64, step = 1, value = 16, label = "Frames")
45
  ],
46
  outputs=gr.Video(label="Generated Video"),
47
  )