Spaces:
Running
on
Zero
Running
on
Zero
Upload 3 files
Browse files- app.py +33 -33
- lora_dict.json +49 -0
- modutils.py +5 -5
app.py
CHANGED
@@ -73,7 +73,7 @@ preprocessor_controlnet = {
|
|
73 |
],
|
74 |
"ip2p": [
|
75 |
"ip2p"
|
76 |
-
]
|
77 |
}
|
78 |
|
79 |
task_stablepy = {
|
@@ -1112,6 +1112,38 @@ with gr.Blocks(theme="NoCrypt/miku@>=1.2.2", elem_id="main", css=CSS) as app:
|
|
1112 |
file_output_lora = gr.File(label="Uploaded LoRA", file_types=['.ckpt', '.pt', '.pth', '.safetensors', '.bin'], file_count="multiple", interactive=False, visible=False)
|
1113 |
upload_button_lora = gr.UploadButton(label="Upload LoRA from your disk (very slow)", file_types=['.ckpt' , '.pt', '.pth', '.safetensors', '.bin'], file_count="multiple")
|
1114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1115 |
with gr.Accordion("Advanced functions", open=False, visible=True) as menu_advanced:
|
1116 |
with gr.Accordion("IP-Adapter", open=False, visible=True) as menu_ipa:##############
|
1117 |
|
@@ -1131,38 +1163,6 @@ with gr.Blocks(theme="NoCrypt/miku@>=1.2.2", elem_id="main", css=CSS) as app:
|
|
1131 |
mode_ip2 = gr.Dropdown(value="style", label="Mode", choices=MODE_IP_OPTIONS)
|
1132 |
scale_ip2 = gr.Slider(minimum=0., maximum=2., step=0.01, value=0.7, label="Scale")
|
1133 |
|
1134 |
-
with gr.Accordion("ControlNet / Img2img / Inpaint", open=False, visible=True) as menu_i2i:
|
1135 |
-
image_control = gr.Image(label="Image ControlNet/Inpaint/Img2img", type="filepath")
|
1136 |
-
image_mask_gui = gr.Image(label="Image Mask", type="filepath")
|
1137 |
-
strength_gui = gr.Slider(
|
1138 |
-
minimum=0.01, maximum=1.0, step=0.01, value=0.55, label="Strength",
|
1139 |
-
info="This option adjusts the level of changes for img2img and inpainting."
|
1140 |
-
)
|
1141 |
-
image_resolution_gui = gr.Slider(minimum=64, maximum=2048, step=64, value=1024, label="Image Resolution")
|
1142 |
-
preprocessor_name_gui = gr.Dropdown(label="Preprocessor Name", choices=preprocessor_controlnet["canny"], value=preprocessor_controlnet["canny"][0])
|
1143 |
-
|
1144 |
-
def change_preprocessor_choices(task):
|
1145 |
-
task = task_stablepy[task]
|
1146 |
-
if task in preprocessor_controlnet.keys():
|
1147 |
-
choices_task = preprocessor_controlnet[task]
|
1148 |
-
else:
|
1149 |
-
choices_task = preprocessor_controlnet["canny"]
|
1150 |
-
return gr.update(choices=choices_task, value=choices_task[0])
|
1151 |
-
|
1152 |
-
task_gui.change(
|
1153 |
-
change_preprocessor_choices,
|
1154 |
-
[task_gui],
|
1155 |
-
[preprocessor_name_gui],
|
1156 |
-
)
|
1157 |
-
preprocess_resolution_gui = gr.Slider(minimum=64, maximum=2048, step=64, value=512, label="Preprocess Resolution")
|
1158 |
-
low_threshold_gui = gr.Slider(minimum=1, maximum=255, step=1, value=100, label="Canny low threshold")
|
1159 |
-
high_threshold_gui = gr.Slider(minimum=1, maximum=255, step=1, value=200, label="Canny high threshold")
|
1160 |
-
value_threshold_gui = gr.Slider(minimum=1, maximum=2.0, step=0.01, value=0.1, label="Hough value threshold (MLSD)")
|
1161 |
-
distance_threshold_gui = gr.Slider(minimum=1, maximum=20.0, step=0.01, value=0.1, label="Hough distance threshold (MLSD)")
|
1162 |
-
control_net_output_scaling_gui = gr.Slider(minimum=0, maximum=5.0, step=0.1, value=1, label="ControlNet Output Scaling in UNet")
|
1163 |
-
control_net_start_threshold_gui = gr.Slider(minimum=0, maximum=1, step=0.01, value=0, label="ControlNet Start Threshold (%)")
|
1164 |
-
control_net_stop_threshold_gui = gr.Slider(minimum=0, maximum=1, step=0.01, value=1, label="ControlNet Stop Threshold (%)")
|
1165 |
-
|
1166 |
with gr.Accordion("T2I adapter", open=False, visible=True) as menu_t2i:
|
1167 |
t2i_adapter_preprocessor_gui = gr.Checkbox(value=True, label="T2i Adapter Preprocessor")
|
1168 |
adapter_conditioning_scale_gui = gr.Slider(minimum=0, maximum=5., step=0.1, value=1, label="Adapter Conditioning Scale")
|
|
|
73 |
],
|
74 |
"ip2p": [
|
75 |
"ip2p"
|
76 |
+
],
|
77 |
}
|
78 |
|
79 |
task_stablepy = {
|
|
|
1112 |
file_output_lora = gr.File(label="Uploaded LoRA", file_types=['.ckpt', '.pt', '.pth', '.safetensors', '.bin'], file_count="multiple", interactive=False, visible=False)
|
1113 |
upload_button_lora = gr.UploadButton(label="Upload LoRA from your disk (very slow)", file_types=['.ckpt' , '.pt', '.pth', '.safetensors', '.bin'], file_count="multiple")
|
1114 |
|
1115 |
+
with gr.Accordion("ControlNet / Img2img / Inpaint", open=False, visible=True) as menu_i2i:
|
1116 |
+
image_control = gr.Image(label="Image ControlNet/Inpaint/Img2img", type="filepath")
|
1117 |
+
image_mask_gui = gr.Image(label="Image Mask", type="filepath")
|
1118 |
+
strength_gui = gr.Slider(
|
1119 |
+
minimum=0.01, maximum=1.0, step=0.01, value=0.55, label="Strength",
|
1120 |
+
info="This option adjusts the level of changes for img2img and inpainting."
|
1121 |
+
)
|
1122 |
+
image_resolution_gui = gr.Slider(minimum=64, maximum=2048, step=64, value=1024, label="Image Resolution")
|
1123 |
+
preprocessor_name_gui = gr.Dropdown(label="Preprocessor Name", choices=preprocessor_controlnet["canny"], value=preprocessor_controlnet["canny"][0])
|
1124 |
+
|
1125 |
+
def change_preprocessor_choices(task):
|
1126 |
+
task = task_stablepy[task]
|
1127 |
+
if task in preprocessor_controlnet.keys():
|
1128 |
+
choices_task = preprocessor_controlnet[task]
|
1129 |
+
else:
|
1130 |
+
choices_task = preprocessor_controlnet["canny"]
|
1131 |
+
return gr.update(choices=choices_task, value=choices_task[0])
|
1132 |
+
|
1133 |
+
task_gui.change(
|
1134 |
+
change_preprocessor_choices,
|
1135 |
+
[task_gui],
|
1136 |
+
[preprocessor_name_gui],
|
1137 |
+
)
|
1138 |
+
preprocess_resolution_gui = gr.Slider(minimum=64, maximum=2048, step=64, value=512, label="Preprocess Resolution")
|
1139 |
+
low_threshold_gui = gr.Slider(minimum=1, maximum=255, step=1, value=100, label="Canny low threshold")
|
1140 |
+
high_threshold_gui = gr.Slider(minimum=1, maximum=255, step=1, value=200, label="Canny high threshold")
|
1141 |
+
value_threshold_gui = gr.Slider(minimum=1, maximum=2.0, step=0.01, value=0.1, label="Hough value threshold (MLSD)")
|
1142 |
+
distance_threshold_gui = gr.Slider(minimum=1, maximum=20.0, step=0.01, value=0.1, label="Hough distance threshold (MLSD)")
|
1143 |
+
control_net_output_scaling_gui = gr.Slider(minimum=0, maximum=5.0, step=0.1, value=1, label="ControlNet Output Scaling in UNet")
|
1144 |
+
control_net_start_threshold_gui = gr.Slider(minimum=0, maximum=1, step=0.01, value=0, label="ControlNet Start Threshold (%)")
|
1145 |
+
control_net_stop_threshold_gui = gr.Slider(minimum=0, maximum=1, step=0.01, value=1, label="ControlNet Stop Threshold (%)")
|
1146 |
+
|
1147 |
with gr.Accordion("Advanced functions", open=False, visible=True) as menu_advanced:
|
1148 |
with gr.Accordion("IP-Adapter", open=False, visible=True) as menu_ipa:##############
|
1149 |
|
|
|
1163 |
mode_ip2 = gr.Dropdown(value="style", label="Mode", choices=MODE_IP_OPTIONS)
|
1164 |
scale_ip2 = gr.Slider(minimum=0., maximum=2., step=0.01, value=0.7, label="Scale")
|
1165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1166 |
with gr.Accordion("T2I adapter", open=False, visible=True) as menu_t2i:
|
1167 |
t2i_adapter_preprocessor_gui = gr.Checkbox(value=True, label="T2i Adapter Preprocessor")
|
1168 |
adapter_conditioning_scale_gui = gr.Slider(minimum=0, maximum=5., step=0.1, value=1, label="Adapter Conditioning Scale")
|
lora_dict.json
CHANGED
@@ -244,6 +244,13 @@
|
|
244 |
"https://civitai.com/models/468990",
|
245 |
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/254c853f-e81f-4cd3-9888-7e5f66091103/width=450/13203782.jpeg"
|
246 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
"Blowjob_Depth_alpha1_0_rank4_noxattn_last": [
|
248 |
"",
|
249 |
"Pony",
|
@@ -279,6 +286,13 @@
|
|
279 |
"https://civitai.com/models/547794",
|
280 |
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/574d516b-f2f7-465f-850c-6ad1730aa746/width=450/17847694.jpeg"
|
281 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
"Cage_Sex": [
|
283 |
"inside cage",
|
284 |
"Pony",
|
@@ -1602,6 +1616,13 @@
|
|
1602 |
"https://civitai.com/models/376481",
|
1603 |
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/6069da54-b9d0-49e6-a0be-9c00b5509dff/width=450/11648008.jpeg"
|
1604 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1605 |
"_sdxl-manguri-pony": [
|
1606 |
"manguri, holding legs",
|
1607 |
"Pony",
|
@@ -1966,6 +1987,13 @@
|
|
1966 |
"https://civitai.com/models/356240",
|
1967 |
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/aec25cb2-e366-4ed1-87f2-1a44adb5913d/width=450/8151800.jpeg"
|
1968 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1969 |
"brushinghair_XL_v1": [
|
1970 |
"brushing hair",
|
1971 |
"SDXL 1.0",
|
@@ -2414,6 +2442,13 @@
|
|
2414 |
"https://civitai.com/models/492642",
|
2415 |
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/fc37e04d-b9f8-4b7d-b261-31960f963a6b/width=450/14453052.jpeg"
|
2416 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2417 |
"fetal_position_pony": [
|
2418 |
"fetal_position",
|
2419 |
"Pony",
|
@@ -3975,6 +4010,13 @@
|
|
3975 |
"https://civitai.com/models/551663",
|
3976 |
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/194d46db-e4f3-4467-b977-6b201815d1f5/width=450/18105813.jpeg"
|
3977 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3978 |
"sfw1": [
|
3979 |
"",
|
3980 |
"Pony",
|
@@ -4570,6 +4612,13 @@
|
|
4570 |
"https://civitai.com/models/512070",
|
4571 |
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/5b137756-e00e-482f-91bb-f84533f7ce53/width=450/15628078.jpeg"
|
4572 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4573 |
"wringingskirt_Pony_v1": [
|
4574 |
"wringing skirt",
|
4575 |
"Pony",
|
|
|
244 |
"https://civitai.com/models/468990",
|
245 |
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/254c853f-e81f-4cd3-9888-7e5f66091103/width=450/13203782.jpeg"
|
246 |
],
|
247 |
+
"Black_nipples": [
|
248 |
+
"Nipples",
|
249 |
+
"Pony",
|
250 |
+
"Dark Nipples Concept Pony",
|
251 |
+
"https://civitai.com/models/558202",
|
252 |
+
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/7b4da9f7-017a-4b6b-94e8-e2860ac0ddb1/width=450/18574976.jpeg"
|
253 |
+
],
|
254 |
"Blowjob_Depth_alpha1_0_rank4_noxattn_last": [
|
255 |
"",
|
256 |
"Pony",
|
|
|
286 |
"https://civitai.com/models/547794",
|
287 |
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/574d516b-f2f7-465f-850c-6ad1730aa746/width=450/17847694.jpeg"
|
288 |
],
|
289 |
+
"CUM_DONATION_ASSISTANCE": [
|
290 |
+
"CUM DONATION ASSISTANCE / FELLATIO / TITS SEX / HANDJOB / FOOTJOB / AFTER VAGINAL",
|
291 |
+
"SDXL 1.0",
|
292 |
+
"Cum Donate Assist",
|
293 |
+
"https://civitai.com/models/558851",
|
294 |
+
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/29612e59-dd1e-42e2-93f4-60c481e3a7cb/width=450/18581704.jpeg"
|
295 |
+
],
|
296 |
"Cage_Sex": [
|
297 |
"inside cage",
|
298 |
"Pony",
|
|
|
1616 |
"https://civitai.com/models/376481",
|
1617 |
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/6069da54-b9d0-49e6-a0be-9c00b5509dff/width=450/11648008.jpeg"
|
1618 |
],
|
1619 |
+
"_sdxl-manguri": [
|
1620 |
+
"manguri / holding legs, laying, butt up highter, spread legs",
|
1621 |
+
"SDXL 1.0",
|
1622 |
+
"for PONY & SDXL, Manguri Gaeshi pose - \u307e\u3093\u3050\u308a\u304c\u3048\u3057 \u30dd\u30fc\u30ba Lora",
|
1623 |
+
"https://civitai.com/models/337072",
|
1624 |
+
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/4c03b506-f898-4b2b-b040-c90e5df991dc/width=450/18527879.jpeg"
|
1625 |
+
],
|
1626 |
"_sdxl-manguri-pony": [
|
1627 |
"manguri, holding legs",
|
1628 |
"Pony",
|
|
|
1987 |
"https://civitai.com/models/356240",
|
1988 |
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/aec25cb2-e366-4ed1-87f2-1a44adb5913d/width=450/8151800.jpeg"
|
1989 |
],
|
1990 |
+
"breasts_size_slider_pdxl_goofy": [
|
1991 |
+
"",
|
1992 |
+
"Pony",
|
1993 |
+
"Breast size slider pdxl",
|
1994 |
+
"https://civitai.com/models/558208",
|
1995 |
+
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/8fe2a91b-96dc-4f55-8c1f-646ebf8fe050/width=450/18547446.jpeg"
|
1996 |
+
],
|
1997 |
"brushinghair_XL_v1": [
|
1998 |
"brushing hair",
|
1999 |
"SDXL 1.0",
|
|
|
2442 |
"https://civitai.com/models/492642",
|
2443 |
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/fc37e04d-b9f8-4b7d-b261-31960f963a6b/width=450/14453052.jpeg"
|
2444 |
],
|
2445 |
+
"fellatio_and_masturbation_pony_V1_0": [
|
2446 |
+
"fellatio and masturbation / fellatio / female masturbation / fingering / pussy / dildo",
|
2447 |
+
"Pony",
|
2448 |
+
"\u30d5\u30a7\u30e9\u30c1\u30aa\u3068\u30aa\u30ca\u30cb\u30fc/ fellatio and masturbation",
|
2449 |
+
"https://civitai.com/models/554142",
|
2450 |
+
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/98572df7-7c59-4079-a68a-e3bd1dc1fc85/width=450/18274457.jpeg"
|
2451 |
+
],
|
2452 |
"fetal_position_pony": [
|
2453 |
"fetal_position",
|
2454 |
"Pony",
|
|
|
4010 |
"https://civitai.com/models/551663",
|
4011 |
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/194d46db-e4f3-4467-b977-6b201815d1f5/width=450/18105813.jpeg"
|
4012 |
],
|
4013 |
+
"sentou_SDXL_V5": [
|
4014 |
+
"sentou, bathroom, , scenery, building, water, window, sink, door, indoors, painting (object), ",
|
4015 |
+
"SDXL 1.0",
|
4016 |
+
"\u92ad\u6e6f Sento / SDXL",
|
4017 |
+
"https://civitai.com/models/558803",
|
4018 |
+
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/b7d0dafe-2d28-4606-ae8f-b551e34c4b88/width=450/18577033.jpeg"
|
4019 |
+
],
|
4020 |
"sfw1": [
|
4021 |
"",
|
4022 |
"Pony",
|
|
|
4612 |
"https://civitai.com/models/512070",
|
4613 |
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/5b137756-e00e-482f-91bb-f84533f7ce53/width=450/15628078.jpeg"
|
4614 |
],
|
4615 |
+
"wrestling_uniform_pony_V1_0": [
|
4616 |
+
"uniform, wresting",
|
4617 |
+
"Pony",
|
4618 |
+
"\u30ec\u30b9\u30ea\u30f3\u30b0\u30e6\u30cb\u30d5\u30a9\u30fc\u30e0/wresting uniform",
|
4619 |
+
"https://civitai.com/models/557947",
|
4620 |
+
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/715fb718-2023-4587-b15c-1d349d44eef8/width=450/18523986.jpeg"
|
4621 |
+
],
|
4622 |
"wringingskirt_Pony_v1": [
|
4623 |
"wringing skirt",
|
4624 |
"Pony",
|
modutils.py
CHANGED
@@ -252,11 +252,11 @@ optimization_list = {
|
|
252 |
"DPO": [28, 7., 'Euler a', True, 'loras/sdxl-DPO-LoRA.safetensors', 1.],
|
253 |
"DPO Turbo": [8, 2.5, 'LCM', True, 'loras/sd_xl_dpo_turbo_lora_v1-128dim.safetensors', 1.],
|
254 |
"SDXL Turbo": [8, 2.5, 'LCM', True, 'loras/sd_xl_turbo_lora_v1.safetensors', 1.],
|
255 |
-
"Hyper-SDXL 12step": [12, 5., '
|
256 |
-
"Hyper-SDXL 8step": [8, 5., '
|
257 |
-
"Hyper-SDXL 4step": [4, 0, '
|
258 |
-
"Hyper-SDXL 2step": [2, 0, '
|
259 |
-
"Hyper-SDXL 1step": [1, 0, '
|
260 |
"PCM 16step": [16, 4., 'Euler a trailing', True, 'loras/pcm_sdxl_normalcfg_16step_converted.safetensors', 1.],
|
261 |
"PCM 8step": [8, 4., 'Euler a trailing', True, 'loras/pcm_sdxl_normalcfg_8step_converted.safetensors', 1.],
|
262 |
"PCM 4step": [4, 2., 'Euler a trailing', True, 'loras/pcm_sdxl_smallcfg_4step_converted.safetensors', 1.],
|
|
|
252 |
"DPO": [28, 7., 'Euler a', True, 'loras/sdxl-DPO-LoRA.safetensors', 1.],
|
253 |
"DPO Turbo": [8, 2.5, 'LCM', True, 'loras/sd_xl_dpo_turbo_lora_v1-128dim.safetensors', 1.],
|
254 |
"SDXL Turbo": [8, 2.5, 'LCM', True, 'loras/sd_xl_turbo_lora_v1.safetensors', 1.],
|
255 |
+
"Hyper-SDXL 12step": [12, 5., 'TCD', True, 'loras/Hyper-SDXL-12steps-CFG-lora.safetensors', 1.],
|
256 |
+
"Hyper-SDXL 8step": [8, 5., 'TCD', True, 'loras/Hyper-SDXL-8steps-CFG-lora.safetensors', 1.],
|
257 |
+
"Hyper-SDXL 4step": [4, 0, 'TCD', True, 'loras/Hyper-SDXL-4steps-lora.safetensors', 1.],
|
258 |
+
"Hyper-SDXL 2step": [2, 0, 'TCD', True, 'loras/Hyper-SDXL-2steps-lora.safetensors', 1.],
|
259 |
+
"Hyper-SDXL 1step": [1, 0, 'TCD', True, 'loras/Hyper-SDXL-1steps-lora.safetensors', 1.],
|
260 |
"PCM 16step": [16, 4., 'Euler a trailing', True, 'loras/pcm_sdxl_normalcfg_16step_converted.safetensors', 1.],
|
261 |
"PCM 8step": [8, 4., 'Euler a trailing', True, 'loras/pcm_sdxl_normalcfg_8step_converted.safetensors', 1.],
|
262 |
"PCM 4step": [4, 2., 'Euler a trailing', True, 'loras/pcm_sdxl_smallcfg_4step_converted.safetensors', 1.],
|