zerhero commited on
Commit
5053261
1 Parent(s): 64a5fa6

change default model

Browse files
Files changed (1) hide show
  1. app.py +23 -7
app.py CHANGED
@@ -546,7 +546,11 @@ class GuiSD:
546
  model_is_xl = "xl" in model_name.lower()
547
  sdxl_in_vae = vae_model and "sdxl" in vae_model.lower()
548
  model_type = "SDXL" if model_is_xl else "SD 1.5"
549
- incompatible_vae = (model_is_xl and vae_model and not sdxl_in_vae) or (not model_is_xl and sdxl_in_vae)
 
 
 
 
550
 
551
  if incompatible_vae:
552
  msg_inc_vae = (
@@ -791,9 +795,15 @@ def update_task_options(model_name, task_name):
791
  if task_name not in new_choices:
792
  task_name = "txt2img"
793
 
794
- return gr.update(value=task_name, choices=new_choices)
 
 
 
795
  else:
796
- return gr.update(value=task_name, choices=task_model_list)
 
 
 
797
 
798
 
799
  with gr.Blocks(css=CSS) as app:
@@ -817,12 +827,12 @@ with gr.Blocks(css=CSS) as app:
817
  prompt_gui = gr.Textbox(
818
  lines=5,
819
  placeholder="Enter Positive prompt",
820
- label="Prompt",
821
  value=DEFAULT_POSITIVE_PROMPT
822
  )
823
  neg_prompt_gui = gr.Textbox(
824
  lines=3,
825
- placeholder="Enter Neg prompt",
826
  label="Negative prompt",
827
  value=DEFAULT_NEGATIVE_PROMPT
828
  )
@@ -899,8 +909,14 @@ with gr.Blocks(css=CSS) as app:
899
  label="Seed"
900
  )
901
  with gr.Row():
902
- clip_skip_gui = gr.Checkbox(value=True, label="Layer 2 Clip Skip")
903
- free_u_gui = gr.Checkbox(value=True, label="FreeU")
 
 
 
 
 
 
904
 
905
  with gr.Row(equal_height=False):
906
 
 
546
  model_is_xl = "xl" in model_name.lower()
547
  sdxl_in_vae = vae_model and "sdxl" in vae_model.lower()
548
  model_type = "SDXL" if model_is_xl else "SD 1.5"
549
+ incompatible_vae = ((model_is_xl and
550
+ vae_model and
551
+ not sdxl_in_vae) or
552
+ (not model_is_xl and
553
+ sdxl_in_vae))
554
 
555
  if incompatible_vae:
556
  msg_inc_vae = (
 
795
  if task_name not in new_choices:
796
  task_name = "txt2img"
797
 
798
+ return gr.update(
799
+ value=task_name,
800
+ choices=new_choices
801
+ )
802
  else:
803
+ return gr.update(
804
+ value=task_name,
805
+ choices=task_model_list
806
+ )
807
 
808
 
809
  with gr.Blocks(css=CSS) as app:
 
827
  prompt_gui = gr.Textbox(
828
  lines=5,
829
  placeholder="Enter Positive prompt",
830
+ label="Positive Prompt",
831
  value=DEFAULT_POSITIVE_PROMPT
832
  )
833
  neg_prompt_gui = gr.Textbox(
834
  lines=3,
835
+ placeholder="Enter Negative prompt",
836
  label="Negative prompt",
837
  value=DEFAULT_NEGATIVE_PROMPT
838
  )
 
909
  label="Seed"
910
  )
911
  with gr.Row():
912
+ clip_skip_gui = gr.Checkbox(
913
+ value=True,
914
+ label="Layer 2 Clip Skip"
915
+ )
916
+ free_u_gui = gr.Checkbox(
917
+ value=True,
918
+ label="FreeU"
919
+ )
920
 
921
  with gr.Row(equal_height=False):
922