gunship999 commited on
Commit
b163db6
·
verified ·
1 Parent(s): ced6b6e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -251,22 +251,22 @@ with gr.Blocks(theme='NoCrypt/miku@>=1.2.2', fill_width=True, css=CSS) as demo:
251
  model_choice.change(extend_choices, model_choice, current_models)
252
  random_button.click(random_choices, None, model_choice)
253
 
254
-
255
  for m, o in zip(current_models, output):
256
  gen_event = gr.on(
257
  triggers=[gen_button.click, txt_input.submit],
258
- fn=lambda m=m, *args: gen_fn(m.value, *args) if m.value != 'NA' else None,
 
259
  inputs=[txt_input, neg_input, height, width, steps, cfg, seed],
260
  outputs=[o],
261
  concurrency_limit=None,
262
  queue=False
263
  )
264
  o.change(
265
- fn=lambda img, g, m=m: add_gallery(img, m.value, g) if m.value != 'NA' else g,
 
266
  inputs=[o, gallery],
267
  outputs=[gallery]
268
  )
269
-
270
 
271
 
272
  demo.launch(show_api=False, max_threads=400)
 
251
  model_choice.change(extend_choices, model_choice, current_models)
252
  random_button.click(random_choices, None, model_choice)
253
 
 
254
  for m, o in zip(current_models, output):
255
  gen_event = gr.on(
256
  triggers=[gen_button.click, txt_input.submit],
257
+ # 수정된 부분: m.value 대신 m 직접 사용
258
+ fn=lambda m=m, *args: gen_fn(m, *args) if m != 'NA' else None,
259
  inputs=[txt_input, neg_input, height, width, steps, cfg, seed],
260
  outputs=[o],
261
  concurrency_limit=None,
262
  queue=False
263
  )
264
  o.change(
265
+ # 수정된 부분: m.value 대신 m 직접 사용
266
+ fn=lambda img, g, m=m: add_gallery(img, m, g) if m != 'NA' else g,
267
  inputs=[o, gallery],
268
  outputs=[gallery]
269
  )
 
270
 
271
 
272
  demo.launch(show_api=False, max_threads=400)