Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -335,6 +335,17 @@ class GuiSD:
|
|
335 |
controlnet_stop_threshold,
|
336 |
textual_inversion,
|
337 |
syntax_weights,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
338 |
loop_generation,
|
339 |
leave_progress_bar,
|
340 |
disable_progress_bar,
|
@@ -348,17 +359,6 @@ class GuiSD:
|
|
348 |
t2i_adapter_preprocessor,
|
349 |
t2i_adapter_conditioning_scale,
|
350 |
t2i_adapter_conditioning_factor,
|
351 |
-
upscaler_model_path,
|
352 |
-
upscaler_increases_size,
|
353 |
-
esrgan_tile,
|
354 |
-
esrgan_tile_overlap,
|
355 |
-
hires_steps,
|
356 |
-
hires_denoising_strength,
|
357 |
-
hires_sampler,
|
358 |
-
hires_prompt,
|
359 |
-
hires_negative_prompt,
|
360 |
-
hires_before_adetailer,
|
361 |
-
hires_after_adetailer,
|
362 |
xformers_memory_efficient_attention,
|
363 |
freeu,
|
364 |
generator_in_cpu,
|
@@ -741,6 +741,273 @@ with gr.Blocks(theme="NoCrypt/miku", css=CSS) as app:
|
|
741 |
retain_hires_model_previous_load_gui = gr.Checkbox(value=False, label="Retain Hires Model Previous Load")
|
742 |
xformers_memory_efficient_attention_gui = gr.Checkbox(value=False, label="Xformers Memory Efficient Attention")
|
743 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
744 |
with gr.Tab("Inpaint mask maker", render=True):
|
745 |
|
746 |
def create_mask_now(img, invert):
|
@@ -847,6 +1114,17 @@ with gr.Blocks(theme="NoCrypt/miku", css=CSS) as app:
|
|
847 |
control_net_stop_threshold_gui,
|
848 |
active_textual_inversion_gui,
|
849 |
prompt_syntax_gui,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
850 |
loop_generation_gui,
|
851 |
leave_progress_bar_gui,
|
852 |
disable_progress_bar_gui,
|
@@ -860,17 +1138,6 @@ with gr.Blocks(theme="NoCrypt/miku", css=CSS) as app:
|
|
860 |
t2i_adapter_preprocessor_gui,
|
861 |
adapter_conditioning_scale_gui,
|
862 |
adapter_conditioning_factor_gui,
|
863 |
-
upscaler_model_path_gui,
|
864 |
-
upscaler_increases_size_gui,
|
865 |
-
esrgan_tile_gui,
|
866 |
-
esrgan_tile_overlap_gui,
|
867 |
-
hires_steps_gui,
|
868 |
-
hires_denoising_strength_gui,
|
869 |
-
hires_sampler_gui,
|
870 |
-
hires_prompt_gui,
|
871 |
-
hires_negative_prompt_gui,
|
872 |
-
hires_before_adetailer_gui,
|
873 |
-
hires_after_adetailer_gui,
|
874 |
xformers_memory_efficient_attention_gui,
|
875 |
free_u_gui,
|
876 |
generator_in_cpu_gui,
|
|
|
335 |
controlnet_stop_threshold,
|
336 |
textual_inversion,
|
337 |
syntax_weights,
|
338 |
+
upscaler_model_path,
|
339 |
+
upscaler_increases_size,
|
340 |
+
esrgan_tile,
|
341 |
+
esrgan_tile_overlap,
|
342 |
+
hires_steps,
|
343 |
+
hires_denoising_strength,
|
344 |
+
hires_sampler,
|
345 |
+
hires_prompt,
|
346 |
+
hires_negative_prompt,
|
347 |
+
hires_before_adetailer,
|
348 |
+
hires_after_adetailer,
|
349 |
loop_generation,
|
350 |
leave_progress_bar,
|
351 |
disable_progress_bar,
|
|
|
359 |
t2i_adapter_preprocessor,
|
360 |
t2i_adapter_conditioning_scale,
|
361 |
t2i_adapter_conditioning_factor,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
xformers_memory_efficient_attention,
|
363 |
freeu,
|
364 |
generator_in_cpu,
|
|
|
741 |
retain_hires_model_previous_load_gui = gr.Checkbox(value=False, label="Retain Hires Model Previous Load")
|
742 |
xformers_memory_efficient_attention_gui = gr.Checkbox(value=False, label="Xformers Memory Efficient Attention")
|
743 |
|
744 |
+
with gr.Accordion("Examples", open=False, visible=True):
|
745 |
+
gr.Examples(
|
746 |
+
examples=[
|
747 |
+
[
|
748 |
+
"1girl, souryuu asuka langley, neon genesis evangelion, plugsuit, pilot suit, red bodysuit, sitting, crossing legs, black eye patch, cat hat, throne, symmetrical, looking down, from bottom, looking at viewer, outdoors, masterpiece, best quality, very aesthetic, absurdres",
|
749 |
+
"nsfw, lowres, (bad), text, error, fewer, extra, missing, worst quality, jpeg artifacts, low quality, watermark, unfinished, displeasing, oldest, early, chromatic aberration, signature, extra digits, artistic error, username, scan, [abstract]",
|
750 |
+
1,
|
751 |
+
30,
|
752 |
+
7.5,
|
753 |
+
True,
|
754 |
+
-1,
|
755 |
+
None,
|
756 |
+
1.0,
|
757 |
+
None,
|
758 |
+
1.0,
|
759 |
+
None,
|
760 |
+
1.0,
|
761 |
+
None,
|
762 |
+
1.0,
|
763 |
+
None,
|
764 |
+
1.0,
|
765 |
+
"Euler a",
|
766 |
+
1024,
|
767 |
+
1024,
|
768 |
+
"cagliostrolab/animagine-xl-3.1",
|
769 |
+
None, # vae
|
770 |
+
"txt2img",
|
771 |
+
None, # img conttol
|
772 |
+
"Canny", # preprocessor
|
773 |
+
512, # preproc resolution
|
774 |
+
1024, # img resolution
|
775 |
+
None, # Style prompt
|
776 |
+
None, # Style json
|
777 |
+
None, # img Mask
|
778 |
+
0.35, # strength
|
779 |
+
100, # low th canny
|
780 |
+
200, # high th canny
|
781 |
+
0.1, # value mstd
|
782 |
+
0.1, # distance mstd
|
783 |
+
1.0, # cn scale
|
784 |
+
0., # cn start
|
785 |
+
1., # cn end
|
786 |
+
False, # ti
|
787 |
+
"Classic",
|
788 |
+
"Nearest",
|
789 |
+
],
|
790 |
+
[
|
791 |
+
"score_9, score_8_up, score_8, medium breasts, cute, eyelashes , princess Zelda OOT, cute small face, long hair, crown braid, hairclip, pointy ears, soft curvy body, solo, looking at viewer, smile, blush, white dress, medium body, (((holding the Master Sword))), standing, deep forest in the background",
|
792 |
+
"score_6, score_5, score_4, busty, ugly face, mutated hands, low res, blurry face, black and white,",
|
793 |
+
1,
|
794 |
+
30,
|
795 |
+
5.,
|
796 |
+
True,
|
797 |
+
-1,
|
798 |
+
None,
|
799 |
+
1.0,
|
800 |
+
None,
|
801 |
+
1.0,
|
802 |
+
None,
|
803 |
+
1.0,
|
804 |
+
None,
|
805 |
+
1.0,
|
806 |
+
None,
|
807 |
+
1.0,
|
808 |
+
"DPM++ 2M Karras",
|
809 |
+
1024,
|
810 |
+
1024,
|
811 |
+
"kitty7779/ponyDiffusionV6XL",
|
812 |
+
None, # vae
|
813 |
+
"txt2img",
|
814 |
+
None, # img conttol
|
815 |
+
"Canny", # preprocessor
|
816 |
+
512, # preproc resolution
|
817 |
+
1024, # img resolution
|
818 |
+
None, # Style prompt
|
819 |
+
None, # Style json
|
820 |
+
None, # img Mask
|
821 |
+
0.35, # strength
|
822 |
+
100, # low th canny
|
823 |
+
200, # high th canny
|
824 |
+
0.1, # value mstd
|
825 |
+
0.1, # distance mstd
|
826 |
+
1.0, # cn scale
|
827 |
+
0., # cn start
|
828 |
+
1., # cn end
|
829 |
+
False, # ti
|
830 |
+
"Classic",
|
831 |
+
"Nearest",
|
832 |
+
],
|
833 |
+
[
|
834 |
+
"in this scene, a man wearing an elaborate, multicolored suit that looks like a patchwork of different geometric patterns and hues stands against a stark white background. his eyes are hidden behind a pair of reflective sunglasses, casting an air of mystery around him. he holds a gold pocket watch in his left hand, its intricate details glinting under the light. the room is silent, with only the faint ticking sound of the pocket watch breaking the eerie silence. a cloud of suspense hangs in the air as if something momentous is about to happen. the anticipation is palpable, and every eye is on him, waiting for the second hand to complete its revolution, best quality, masterpiece, high quality, highres,",
|
835 |
+
"(worst quality:1.2), (bad quality:1.2), (poor quality:1.2), (missing fingers:1.2), bad-artist-anime, bad-artist, bad-picture-chill-75v",
|
836 |
+
1,
|
837 |
+
52,
|
838 |
+
7.5,
|
839 |
+
True,
|
840 |
+
-1,
|
841 |
+
None,
|
842 |
+
1.0,
|
843 |
+
None,
|
844 |
+
1.0,
|
845 |
+
None,
|
846 |
+
1.0,
|
847 |
+
None,
|
848 |
+
1.0,
|
849 |
+
None,
|
850 |
+
1.0,
|
851 |
+
"DPM++ 2M Ef",
|
852 |
+
1024,
|
853 |
+
1024,
|
854 |
+
"misri/epicrealismXL_v7FinalDestination",
|
855 |
+
None, # vae
|
856 |
+
"txt2img",
|
857 |
+
None, # img conttol
|
858 |
+
"Canny", # preprocessor
|
859 |
+
512, # preproc resolution
|
860 |
+
1024, # img resolution
|
861 |
+
None, # Style prompt
|
862 |
+
None, # Style json
|
863 |
+
None, # img Mask
|
864 |
+
0.35, # strength
|
865 |
+
100, # low th canny
|
866 |
+
200, # high th canny
|
867 |
+
0.1, # value mstd
|
868 |
+
0.1, # distance mstd
|
869 |
+
1.0, # cn scale
|
870 |
+
0., # cn start
|
871 |
+
1., # cn end
|
872 |
+
False, # ti
|
873 |
+
"Classic",
|
874 |
+
None,
|
875 |
+
],
|
876 |
+
[
|
877 |
+
"masterpiece,high resolution,japanese town street background,fantasy world,magical,mountains forest background,stairs,(torii:1.2),masterpiece,cinematic,visual key,best quality,by hayao miyazaki,by makoto shinkai,soft dim lighting,pastel colors,night,stars",
|
878 |
+
"(low quality, worst quality:1.4), (bad_prompt:0.8), (monochrome:1.1), (greyscale), painting, cartoon, comic, anime, manga, drawing, 2d, flat, crayon, sketch",
|
879 |
+
1,
|
880 |
+
50,
|
881 |
+
4.,
|
882 |
+
True,
|
883 |
+
-1,
|
884 |
+
None,
|
885 |
+
1.0,
|
886 |
+
None,
|
887 |
+
1.0,
|
888 |
+
None,
|
889 |
+
1.0,
|
890 |
+
None,
|
891 |
+
1.0,
|
892 |
+
None,
|
893 |
+
1.0,
|
894 |
+
"DPM++ 2M Karras",
|
895 |
+
1024,
|
896 |
+
1024,
|
897 |
+
"misri/juggernautXL_juggernautX",
|
898 |
+
None, # vae
|
899 |
+
"txt2img",
|
900 |
+
None, # img conttol
|
901 |
+
"Canny", # preprocessor
|
902 |
+
512, # preproc resolution
|
903 |
+
1024, # img resolution
|
904 |
+
None, # Style prompt
|
905 |
+
None, # Style json
|
906 |
+
None, # img Mask
|
907 |
+
0.35, # strength
|
908 |
+
100, # low th canny
|
909 |
+
200, # high th canny
|
910 |
+
0.1, # value mstd
|
911 |
+
0.1, # distance mstd
|
912 |
+
1.0, # cn scale
|
913 |
+
0., # cn start
|
914 |
+
1., # cn end
|
915 |
+
False, # ti
|
916 |
+
"Classic",
|
917 |
+
None,
|
918 |
+
],
|
919 |
+
[
|
920 |
+
"1girl, solo, black dress, black hair, black theme, dress, eyelashes, jewelry, makeup, parted lips, purple eyes, ring, short hair, silk, silver hair, snake, masterpiece, best quality",
|
921 |
+
"(low quality, worst quality:1.4), (bad_prompt:0.8), (monochrome:1.1), (greyscale), painting, cartoon, comic, anime, manga, drawing, 2d, flat, crayon, sketch",
|
922 |
+
1,
|
923 |
+
50,
|
924 |
+
4.,
|
925 |
+
True,
|
926 |
+
-1,
|
927 |
+
None,
|
928 |
+
1.0,
|
929 |
+
None,
|
930 |
+
1.0,
|
931 |
+
None,
|
932 |
+
1.0,
|
933 |
+
None,
|
934 |
+
1.0,
|
935 |
+
None,
|
936 |
+
1.0,
|
937 |
+
"DPM++ 2M Karras",
|
938 |
+
1344,
|
939 |
+
896,
|
940 |
+
"misri/anima_pencil-XL-v4.0.0",
|
941 |
+
None, # vae
|
942 |
+
"txt2img",
|
943 |
+
None, # img conttol
|
944 |
+
"Canny", # preprocessor
|
945 |
+
512, # preproc resolution
|
946 |
+
1024, # img resolution
|
947 |
+
None, # Style prompt
|
948 |
+
None, # Style json
|
949 |
+
None, # img Mask
|
950 |
+
0.35, # strength
|
951 |
+
100, # low th canny
|
952 |
+
200, # high th canny
|
953 |
+
0.1, # value mstd
|
954 |
+
0.1, # distance mstd
|
955 |
+
1.0, # cn scale
|
956 |
+
0., # cn start
|
957 |
+
1., # cn end
|
958 |
+
False, # ti
|
959 |
+
"Classic",
|
960 |
+
None,
|
961 |
+
],
|
962 |
+
],
|
963 |
+
fn=sd_gen.generate_pipeline,
|
964 |
+
inputs=[
|
965 |
+
prompt_gui,
|
966 |
+
neg_prompt_gui,
|
967 |
+
num_images_gui,
|
968 |
+
steps_gui,
|
969 |
+
cfg_gui,
|
970 |
+
clip_skip_gui,
|
971 |
+
seed_gui,
|
972 |
+
lora1_gui,
|
973 |
+
lora_scale_1_gui,
|
974 |
+
lora2_gui,
|
975 |
+
lora_scale_2_gui,
|
976 |
+
lora3_gui,
|
977 |
+
lora_scale_3_gui,
|
978 |
+
lora4_gui,
|
979 |
+
lora_scale_4_gui,
|
980 |
+
lora5_gui,
|
981 |
+
lora_scale_5_gui,
|
982 |
+
sampler_gui,
|
983 |
+
img_height_gui,
|
984 |
+
img_width_gui,
|
985 |
+
model_name_gui,
|
986 |
+
vae_model_gui,
|
987 |
+
task_gui,
|
988 |
+
image_control,
|
989 |
+
preprocessor_name_gui,
|
990 |
+
preprocess_resolution_gui,
|
991 |
+
image_resolution_gui,
|
992 |
+
style_prompt_gui,
|
993 |
+
style_json_gui,
|
994 |
+
image_mask_gui,
|
995 |
+
strength_gui,
|
996 |
+
low_threshold_gui,
|
997 |
+
high_threshold_gui,
|
998 |
+
value_threshold_gui,
|
999 |
+
distance_threshold_gui,
|
1000 |
+
control_net_output_scaling_gui,
|
1001 |
+
control_net_start_threshold_gui,
|
1002 |
+
control_net_stop_threshold_gui,
|
1003 |
+
active_textual_inversion_gui,
|
1004 |
+
prompt_syntax_gui,
|
1005 |
+
upscaler_model_path_gui,
|
1006 |
+
],
|
1007 |
+
outputs=[result_images],
|
1008 |
+
cache_examples=False,
|
1009 |
+
)
|
1010 |
+
|
1011 |
with gr.Tab("Inpaint mask maker", render=True):
|
1012 |
|
1013 |
def create_mask_now(img, invert):
|
|
|
1114 |
control_net_stop_threshold_gui,
|
1115 |
active_textual_inversion_gui,
|
1116 |
prompt_syntax_gui,
|
1117 |
+
upscaler_model_path_gui,
|
1118 |
+
upscaler_increases_size_gui,
|
1119 |
+
esrgan_tile_gui,
|
1120 |
+
esrgan_tile_overlap_gui,
|
1121 |
+
hires_steps_gui,
|
1122 |
+
hires_denoising_strength_gui,
|
1123 |
+
hires_sampler_gui,
|
1124 |
+
hires_prompt_gui,
|
1125 |
+
hires_negative_prompt_gui,
|
1126 |
+
hires_before_adetailer_gui,
|
1127 |
+
hires_after_adetailer_gui,
|
1128 |
loop_generation_gui,
|
1129 |
leave_progress_bar_gui,
|
1130 |
disable_progress_bar_gui,
|
|
|
1138 |
t2i_adapter_preprocessor_gui,
|
1139 |
adapter_conditioning_scale_gui,
|
1140 |
adapter_conditioning_factor_gui,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1141 |
xformers_memory_efficient_attention_gui,
|
1142 |
free_u_gui,
|
1143 |
generator_in_cpu_gui,
|