hysts HF staff commited on
Commit
59bd43d
β€’
1 Parent(s): d8fa9a9
Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +25 -67
  3. requirements.txt +5 -5
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🌍
4
  colorFrom: gray
5
  colorTo: purple
6
  sdk: gradio
7
- sdk_version: 3.42.0
8
  app_file: app.py
9
  license: mit
10
  pinned: false
 
4
  colorFrom: gray
5
  colorTo: purple
6
  sdk: gradio
7
+ sdk_version: 3.45.2
8
  app_file: app.py
9
  license: mit
10
  pinned: false
app.py CHANGED
@@ -269,24 +269,14 @@ with gr.Blocks(css="style.css") as demo:
269
  api_name=False,
270
  )
271
 
272
- inputs = [
273
- prompt,
274
- negative_prompt,
275
- prompt_2,
276
- negative_prompt_2,
277
- use_negative_prompt,
278
- use_prompt_2,
279
- use_negative_prompt_2,
280
- seed,
281
- width,
282
- height,
283
- guidance_scale_base,
284
- guidance_scale_refiner,
285
- num_inference_steps_base,
286
- num_inference_steps_refiner,
287
- apply_refiner,
288
- ]
289
- prompt.submit(
290
  fn=randomize_seed_fn,
291
  inputs=[seed, randomize_seed],
292
  outputs=seed,
@@ -294,58 +284,26 @@ with gr.Blocks(css="style.css") as demo:
294
  api_name=False,
295
  ).then(
296
  fn=generate,
297
- inputs=inputs,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
298
  outputs=result,
299
  api_name="run",
300
  )
301
- negative_prompt.submit(
302
- fn=randomize_seed_fn,
303
- inputs=[seed, randomize_seed],
304
- outputs=seed,
305
- queue=False,
306
- api_name=False,
307
- ).then(
308
- fn=generate,
309
- inputs=inputs,
310
- outputs=result,
311
- api_name=False,
312
- )
313
- prompt_2.submit(
314
- fn=randomize_seed_fn,
315
- inputs=[seed, randomize_seed],
316
- outputs=seed,
317
- queue=False,
318
- api_name=False,
319
- ).then(
320
- fn=generate,
321
- inputs=inputs,
322
- outputs=result,
323
- api_name=False,
324
- )
325
- negative_prompt_2.submit(
326
- fn=randomize_seed_fn,
327
- inputs=[seed, randomize_seed],
328
- outputs=seed,
329
- queue=False,
330
- api_name=False,
331
- ).then(
332
- fn=generate,
333
- inputs=inputs,
334
- outputs=result,
335
- api_name=False,
336
- )
337
- run_button.click(
338
- fn=randomize_seed_fn,
339
- inputs=[seed, randomize_seed],
340
- outputs=seed,
341
- queue=False,
342
- api_name=False,
343
- ).then(
344
- fn=generate,
345
- inputs=inputs,
346
- outputs=result,
347
- api_name=False,
348
- )
349
 
350
  if __name__ == "__main__":
351
  demo.queue(max_size=20).launch()
 
269
  api_name=False,
270
  )
271
 
272
+ gr.on(
273
+ triggers=[
274
+ prompt.submit,
275
+ negative_prompt.submit,
276
+ prompt_2.submit,
277
+ negative_prompt_2.submit,
278
+ run_button.click,
279
+ ],
 
 
 
 
 
 
 
 
 
 
280
  fn=randomize_seed_fn,
281
  inputs=[seed, randomize_seed],
282
  outputs=seed,
 
284
  api_name=False,
285
  ).then(
286
  fn=generate,
287
+ inputs=[
288
+ prompt,
289
+ negative_prompt,
290
+ prompt_2,
291
+ negative_prompt_2,
292
+ use_negative_prompt,
293
+ use_prompt_2,
294
+ use_negative_prompt_2,
295
+ seed,
296
+ width,
297
+ height,
298
+ guidance_scale_base,
299
+ guidance_scale_refiner,
300
+ num_inference_steps_base,
301
+ num_inference_steps_refiner,
302
+ apply_refiner,
303
+ ],
304
  outputs=result,
305
  api_name="run",
306
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
 
308
  if __name__ == "__main__":
309
  demo.queue(max_size=20).launch()
requirements.txt CHANGED
@@ -1,7 +1,7 @@
1
- accelerate==0.22.0
2
- diffusers==0.20.2
3
- gradio==3.42.0
4
  invisible-watermark==0.2.0
5
- Pillow==10.0.0
6
  torch==2.0.1
7
- transformers==4.32.1
 
1
+ accelerate==0.23.0
2
+ diffusers==0.21.3
3
+ gradio==3.45.2
4
  invisible-watermark==0.2.0
5
+ Pillow==10.0.1
6
  torch==2.0.1
7
+ transformers==4.33.3