ovi054 commited on
Commit
cc9b68f
·
verified ·
1 Parent(s): 78004f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -18,13 +18,13 @@ pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow
18
 
19
 
20
  @spaces.GPU()
21
- def generate(prompt, negative_prompt, width=720, height=1280, num_inference_steps=50, progress=gr.Progress(track_tqdm=True)):
22
  pipe.to("cuda")
23
  output = pipe(
24
  prompt=prompt,
25
  negative_prompt=negative_prompt,
26
- height=720,
27
- width=1280,
28
  num_frames=1,
29
  num_inference_steps=num_inference_steps,
30
  guidance_scale=5.0,
@@ -44,8 +44,8 @@ iface = gr.Interface(
44
  ],
45
  additional_inputs = [
46
  gr.Textbox(label="Negative prompt", value = "Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards"),
47
- gr.Slider(label="Width", minimum=480, maximum=1280, step=8, value=720),
48
- gr.Slider(label="Height", minimum=480, maximum=1280, step=8, value=1280),
49
  gr.Slider(minimum=20, maximum=100, step=1, label="Inference Steps", value=50)
50
  ],
51
  outputs=gr.Image(label="output"),
 
18
 
19
 
20
  @spaces.GPU()
21
+ def generate(prompt, negative_prompt, width=1280, height=720, num_inference_steps=50, progress=gr.Progress(track_tqdm=True)):
22
  pipe.to("cuda")
23
  output = pipe(
24
  prompt=prompt,
25
  negative_prompt=negative_prompt,
26
+ height=height,
27
+ width=width,
28
  num_frames=1,
29
  num_inference_steps=num_inference_steps,
30
  guidance_scale=5.0,
 
44
  ],
45
  additional_inputs = [
46
  gr.Textbox(label="Negative prompt", value = "Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards"),
47
+ gr.Slider(label="Width", minimum=480, maximum=1280, step=8, value=1280),
48
+ gr.Slider(label="Height", minimum=480, maximum=1280, step=8, value=720),
49
  gr.Slider(minimum=20, maximum=100, step=1, label="Inference Steps", value=50)
50
  ],
51
  outputs=gr.Image(label="output"),