sand74 commited on
Commit
5e2e69a
·
verified ·
1 Parent(s): cf9952e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -47
app.py CHANGED
@@ -184,12 +184,12 @@ with gr.Blocks(css=css) as demo:
184
  label="LoRA Strength"
185
  )
186
 
187
- # Показывать/скрывать секцию LoRA в зависимости от модели
188
- model_id.change(
189
- fn=lambda x: gr.update(visible=is_lora(x)),
190
- inputs=model_id,
191
- outputs=lora_section
192
- )
193
 
194
  with gr.Group():
195
  title = gr.Markdown(" ### ControlNet section")
@@ -300,55 +300,31 @@ with gr.Blocks(css=css) as demo:
300
 
301
  gr.Examples(examples=examples, inputs=[prompt])
302
 
303
- # gr.on(
304
- # triggers=[run_button.click, prompt.submit],
305
- # fn=infer,
306
- # inputs=[
307
- # model_id,
308
- # prompt,
309
- # negative_prompt,
310
- # seed,
311
- # randomize_seed,
312
- # width,
313
- # height,
314
- # guidance_scale,
315
- # num_inference_steps,
316
- # lora_scale,
317
- # use_controlnet,
318
- # controlnet_image,
319
- # controlnet_strength,
320
- # controlnet_mode,
321
- # use_ip_adapter,
322
- # ip_adapter_image,
323
- # ip_adapter_scale,
324
- # ],
325
- # outputs=[result, seed],
326
- # )
327
-
328
  gr.on(
329
  triggers=[run_button.click, prompt.submit],
330
  fn=infer,
331
  inputs=[
332
  model_id,
333
- model_id,
334
- model_id,
335
- model_id,
336
- model_id,
337
- model_id,
338
- model_id,
339
- model_id,
340
- model_id,
341
- model_id,
342
- model_id,
343
- model_id,
344
- model_id,
345
- model_id,
346
- model_id,
347
- model_id,
348
- model_id,
349
  ],
350
  outputs=[result, seed],
351
  )
352
 
 
353
  if __name__ == "__main__":
354
  demo.launch()
 
184
  label="LoRA Strength"
185
  )
186
 
187
+ # # Показывать/скрывать секцию LoRA в зависимости от модели
188
+ # model_id.change(
189
+ # fn=lambda x: gr.update(visible=is_lora(x)),
190
+ # inputs=model_id,
191
+ # outputs=lora_section
192
+ # )
193
 
194
  with gr.Group():
195
  title = gr.Markdown(" ### ControlNet section")
 
300
 
301
  gr.Examples(examples=examples, inputs=[prompt])
302
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  gr.on(
304
  triggers=[run_button.click, prompt.submit],
305
  fn=infer,
306
  inputs=[
307
  model_id,
308
+ prompt,
309
+ negative_prompt,
310
+ seed,
311
+ randomize_seed,
312
+ width,
313
+ height,
314
+ guidance_scale,
315
+ num_inference_steps,
316
+ lora_scale,
317
+ use_controlnet,
318
+ controlnet_image,
319
+ controlnet_strength,
320
+ controlnet_mode,
321
+ use_ip_adapter,
322
+ ip_adapter_image,
323
+ ip_adapter_scale,
324
  ],
325
  outputs=[result, seed],
326
  )
327
 
328
+
329
  if __name__ == "__main__":
330
  demo.launch()