nyanko7 commited on
Commit
97a8826
1 Parent(s): 3c18f07

chore: update limits

Browse files
Files changed (1) hide show
  1. app.py +15 -3
app.py CHANGED
@@ -60,7 +60,7 @@ samplers_k_diffusion = [
60
  # ]
61
 
62
  start_time = time.time()
63
- timeout = 90
64
 
65
  scheduler = DDIMScheduler.from_pretrained(
66
  base_model,
@@ -628,7 +628,7 @@ with gr.Blocks(css=css) as demo:
628
  hr_scale = gr.Slider(
629
  label="Upscale factor",
630
  minimum=1.0,
631
- maximum=3,
632
  step=0.1,
633
  value=1.5,
634
  )
@@ -646,6 +646,7 @@ with gr.Blocks(css=css) as demo:
646
  ),
647
  inputs=[hr_enabled, hr_scale, width, height],
648
  outputs=hr_enabled,
 
649
  )
650
  hr_enabled.change(
651
  lambda g, x, w, h: gr.Checkbox.update(
@@ -653,6 +654,7 @@ with gr.Blocks(css=css) as demo:
653
  ),
654
  inputs=[hr_enabled, hr_scale, width, height],
655
  outputs=hr_enabled,
 
656
  )
657
 
658
  with gr.Tab("Embeddings/Loras"):
@@ -688,11 +690,13 @@ with gr.Blocks(css=css) as demo:
688
  add_net,
689
  inputs=[uploads, ti_state, lora_state],
690
  outputs=[ti_state, lora_state, ti_vals, lora_vals, uploads],
 
691
  )
692
  btn_del.click(
693
  clean_states,
694
  inputs=[ti_state, lora_state],
695
  outputs=[ti_state, lora_state, ti_vals, lora_vals, uploads],
 
696
  )
697
 
698
  # error_output = gr.Markdown()
@@ -775,26 +779,31 @@ with gr.Blocks(css=css) as demo:
775
  detect_text,
776
  inputs=[text, global_stats, width, height],
777
  outputs=[global_stats, sp, radio, rendered],
 
778
  )
779
  radio.change(
780
  switch_canvas,
781
  inputs=[radio, global_stats, width, height],
782
  outputs=[sp, strength, mask_outsides, rendered],
 
783
  )
784
  sp.edit(
785
  apply_canvas,
786
  inputs=[radio, sp, global_stats, width, height],
787
  outputs=[global_stats, rendered],
 
788
  )
789
  strength.change(
790
  apply_weight,
791
  inputs=[radio, strength, global_stats],
792
  outputs=[global_stats],
 
793
  )
794
  mask_outsides.change(
795
  apply_option,
796
  inputs=[radio, mask_outsides, global_stats],
797
  outputs=[global_stats],
 
798
  )
799
 
800
  with gr.Tab("UploadFile"):
@@ -807,7 +816,7 @@ with gr.Blocks(css=css) as demo:
807
 
808
  mask_outsides2 = gr.Checkbox(
809
  label="Mask other areas",
810
- value=False
811
  )
812
 
813
  strength2 = gr.Slider(
@@ -823,17 +832,20 @@ with gr.Blocks(css=css) as demo:
823
  apply_image,
824
  inputs=[sp2, radio, width, height, strength2, mask_outsides2, global_stats],
825
  outputs=[global_stats, rendered],
 
826
  )
827
 
828
  width.change(
829
  apply_new_res,
830
  inputs=[width, height, global_stats],
831
  outputs=[global_stats, rendered],
 
832
  )
833
  height.change(
834
  apply_new_res,
835
  inputs=[width, height, global_stats],
836
  outputs=[global_stats, rendered],
 
837
  )
838
 
839
  # color_stats = gr.State(value={})
 
60
  # ]
61
 
62
  start_time = time.time()
63
+ timeout = 60
64
 
65
  scheduler = DDIMScheduler.from_pretrained(
66
  base_model,
 
628
  hr_scale = gr.Slider(
629
  label="Upscale factor",
630
  minimum=1.0,
631
+ maximum=2.0,
632
  step=0.1,
633
  value=1.5,
634
  )
 
646
  ),
647
  inputs=[hr_enabled, hr_scale, width, height],
648
  outputs=hr_enabled,
649
+ queue=False,
650
  )
651
  hr_enabled.change(
652
  lambda g, x, w, h: gr.Checkbox.update(
 
654
  ),
655
  inputs=[hr_enabled, hr_scale, width, height],
656
  outputs=hr_enabled,
657
+ queue=False,
658
  )
659
 
660
  with gr.Tab("Embeddings/Loras"):
 
690
  add_net,
691
  inputs=[uploads, ti_state, lora_state],
692
  outputs=[ti_state, lora_state, ti_vals, lora_vals, uploads],
693
+ queue=False,
694
  )
695
  btn_del.click(
696
  clean_states,
697
  inputs=[ti_state, lora_state],
698
  outputs=[ti_state, lora_state, ti_vals, lora_vals, uploads],
699
+ queue=False,
700
  )
701
 
702
  # error_output = gr.Markdown()
 
779
  detect_text,
780
  inputs=[text, global_stats, width, height],
781
  outputs=[global_stats, sp, radio, rendered],
782
+ queue=False,
783
  )
784
  radio.change(
785
  switch_canvas,
786
  inputs=[radio, global_stats, width, height],
787
  outputs=[sp, strength, mask_outsides, rendered],
788
+ queue=False,
789
  )
790
  sp.edit(
791
  apply_canvas,
792
  inputs=[radio, sp, global_stats, width, height],
793
  outputs=[global_stats, rendered],
794
+ queue=False,
795
  )
796
  strength.change(
797
  apply_weight,
798
  inputs=[radio, strength, global_stats],
799
  outputs=[global_stats],
800
+ queue=False,
801
  )
802
  mask_outsides.change(
803
  apply_option,
804
  inputs=[radio, mask_outsides, global_stats],
805
  outputs=[global_stats],
806
+ queue=False,
807
  )
808
 
809
  with gr.Tab("UploadFile"):
 
816
 
817
  mask_outsides2 = gr.Checkbox(
818
  label="Mask other areas",
819
+ value=False,
820
  )
821
 
822
  strength2 = gr.Slider(
 
832
  apply_image,
833
  inputs=[sp2, radio, width, height, strength2, mask_outsides2, global_stats],
834
  outputs=[global_stats, rendered],
835
+ queue=False,
836
  )
837
 
838
  width.change(
839
  apply_new_res,
840
  inputs=[width, height, global_stats],
841
  outputs=[global_stats, rendered],
842
+ queue=False,
843
  )
844
  height.change(
845
  apply_new_res,
846
  inputs=[width, height, global_stats],
847
  outputs=[global_stats, rendered],
848
+ queue=False,
849
  )
850
 
851
  # color_stats = gr.State(value={})