John6666 commited on
Commit
d0eb327
·
verified ·
1 Parent(s): 821a6d5

Upload 2 files

Browse files
Files changed (1) hide show
  1. app.py +12 -2
app.py CHANGED
@@ -720,6 +720,14 @@ class GuiSD:
720
 
721
  sd_gen = GuiSD()
722
 
 
 
 
 
 
 
 
 
723
  ## BEGIN MOD
724
  CSS ="""
725
  .gradio-container, #main { width:100%; height:100%; max-width:100%; padding-left:0; padding-right:0; margin-left:0; margin-right:0; !important; }
@@ -1415,7 +1423,8 @@ with gr.Blocks(theme='NoCrypt/miku@>=1.2.2', elem_id="main", fill_width=True, cs
1415
  translate_prompt_button.click(translate_prompt, [series_dbt], [series_dbt], queue=False)
1416
 
1417
  generate_button.click(
1418
- fn=sd_gen.load_new_model,
 
1419
  inputs=[
1420
  model_name_gui,
1421
  vae_model_gui,
@@ -1425,7 +1434,8 @@ with gr.Blocks(theme='NoCrypt/miku@>=1.2.2', elem_id="main", fill_width=True, cs
1425
  queue=True,
1426
  show_progress="minimal",
1427
  ).success(
1428
- fn=sd_gen.generate_pipeline,
 
1429
  inputs=[
1430
  prompt_gui,
1431
  neg_prompt_gui,
 
720
 
721
  sd_gen = GuiSD()
722
 
723
+ @spaces.GPU
724
+ def sd_gen_load_new_model(*args):
725
+ yield from sd_gen.load_new_model(*args)
726
+
727
+ @spaces.GPU
728
+ def sd_gen_generate_pipeline(*args):
729
+ yield from sd_gen.generate_pipeline(*args)
730
+
731
  ## BEGIN MOD
732
  CSS ="""
733
  .gradio-container, #main { width:100%; height:100%; max-width:100%; padding-left:0; padding-right:0; margin-left:0; margin-right:0; !important; }
 
1423
  translate_prompt_button.click(translate_prompt, [series_dbt], [series_dbt], queue=False)
1424
 
1425
  generate_button.click(
1426
+ #fn=sd_gen.load_new_model,
1427
+ fn=sd_gen_load_new_model,
1428
  inputs=[
1429
  model_name_gui,
1430
  vae_model_gui,
 
1434
  queue=True,
1435
  show_progress="minimal",
1436
  ).success(
1437
+ #fn=sd_gen.generate_pipeline,
1438
+ fn=sd_gen_generate_pipeline,
1439
  inputs=[
1440
  prompt_gui,
1441
  neg_prompt_gui,