cocktailpeanut commited on
Commit
b4146cd
·
1 Parent(s): f1a6530
Files changed (1) hide show
  1. app.py +4 -22
app.py CHANGED
@@ -51,8 +51,6 @@ def generate_image(
51
  prompt,
52
  ckpt,
53
  num_inference_steps,
54
- width,
55
- height,
56
  progress=gr.Progress(track_tqdm=True),
57
  mode="sdxl",
58
  ):
@@ -79,7 +77,7 @@ def generate_image(
79
  )
80
 
81
  results = pipe(
82
- prompt, num_inference_steps=num_inference_steps, guidance_scale=guidance_scale, width=width, height=height
83
  )
84
 
85
  # if SAFETY_CHECKER:
@@ -130,22 +128,6 @@ PCM outperforms LCM across various generation settings and achieves state-of-the
130
  value=2,
131
  interactive=False,
132
  )
133
- width = gr.Slider(
134
- label="Width",
135
- minimum=512,
136
- maximum=1024,
137
- step=256,
138
- value=512,
139
- interactive=True
140
- )
141
- height = gr.Slider(
142
- label="Height",
143
- minimum=512,
144
- maximum=1024,
145
- step=256,
146
- value=512,
147
- interactive=True
148
- )
149
  ckpt.change(
150
  fn=update_steps,
151
  inputs=[ckpt],
@@ -187,7 +169,7 @@ PCM outperforms LCM across various generation settings and achieves state-of-the
187
  4,
188
  ],
189
  ],
190
- inputs=[prompt, ckpt, steps, width, height],
191
  outputs=[img],
192
  fn=generate_image,
193
  #cache_examples="lazy",
@@ -196,13 +178,13 @@ PCM outperforms LCM across various generation settings and achieves state-of-the
196
  gr.on(
197
  fn=generate_image,
198
  triggers=[ckpt.change, prompt.submit, submit_sdxl.click],
199
- inputs=[prompt, ckpt, steps, width, height],
200
  outputs=[img],
201
  )
202
  gr.on(
203
  fn=lambda *args: generate_image(*args, mode="sd15"),
204
  triggers=[submit_sd15.click],
205
- inputs=[prompt, ckpt, steps, width, height],
206
  outputs=[img],
207
  )
208
 
 
51
  prompt,
52
  ckpt,
53
  num_inference_steps,
 
 
54
  progress=gr.Progress(track_tqdm=True),
55
  mode="sdxl",
56
  ):
 
77
  )
78
 
79
  results = pipe(
80
+ prompt, num_inference_steps=num_inference_steps, guidance_scale=guidance_scale
81
  )
82
 
83
  # if SAFETY_CHECKER:
 
128
  value=2,
129
  interactive=False,
130
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  ckpt.change(
132
  fn=update_steps,
133
  inputs=[ckpt],
 
169
  4,
170
  ],
171
  ],
172
+ inputs=[prompt, ckpt, steps],
173
  outputs=[img],
174
  fn=generate_image,
175
  #cache_examples="lazy",
 
178
  gr.on(
179
  fn=generate_image,
180
  triggers=[ckpt.change, prompt.submit, submit_sdxl.click],
181
+ inputs=[prompt, ckpt, steps],
182
  outputs=[img],
183
  )
184
  gr.on(
185
  fn=lambda *args: generate_image(*args, mode="sd15"),
186
  triggers=[submit_sd15.click],
187
+ inputs=[prompt, ckpt, steps],
188
  outputs=[img],
189
  )
190