ovi054 commited on
Commit
da1c584
·
verified ·
1 Parent(s): 2e5b3cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -18,15 +18,15 @@ pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow
18
 
19
 
20
  @spaces.GPU()
21
- def generate(prompt, 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=28,
30
  guidance_scale=5.0,
31
  )
32
  image = output.frames[0][0]
@@ -42,6 +42,12 @@ iface = gr.Interface(
42
  # gr.Textbox(label="Lora ID", placeholder="Optional"),
43
  # gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label="Lora Scale", value=1)
44
  ],
 
 
 
 
 
 
45
  outputs=gr.Image(label="output"),
46
  )
47
 
 
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,
31
  )
32
  image = output.frames[0][0]
 
42
  # gr.Textbox(label="Lora ID", placeholder="Optional"),
43
  # gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label="Lora Scale", value=1)
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"),
52
  )
53