Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
@@ -21,6 +21,7 @@ from tagger.tagger import (
|
|
21 |
remove_specific_prompt,
|
22 |
convert_danbooru_to_e621_prompt,
|
23 |
insert_recom_prompt,
|
|
|
24 |
)
|
25 |
from tagger.fl2sd3longcap import predict_tags_fl2_sd3
|
26 |
from tagger.v2 import (
|
@@ -45,7 +46,7 @@ css = """
|
|
45 |
|
46 |
with gr.Blocks(theme="NoCrypt/miku@>=1.2.2", css=css) as demo:
|
47 |
with gr.Column():
|
48 |
-
with gr.Accordion("Advanced settings", open=
|
49 |
with gr.Accordion("Recommended Prompt", open=False):
|
50 |
recom_prompt_preset = gr.Radio(label="Set Presets", choices=get_recom_prompt_type(), value="Common")
|
51 |
with gr.Row():
|
@@ -143,7 +144,7 @@ with gr.Blocks(theme="NoCrypt/miku@>=1.2.2", css=css) as demo:
|
|
143 |
convert_danbooru_to_e621_prompt, [prompt, v2_tag_type], [prompt], queue=False, show_api=False,
|
144 |
)
|
145 |
tagger_generate_from_image.click(
|
146 |
-
lambda: ("", "", ""), None, [v2_series, v2_character, prompt], queue=False,
|
147 |
).success(
|
148 |
predict_tags_wd,
|
149 |
[tagger_image, prompt, tagger_algorithms, tagger_general_threshold, tagger_character_threshold],
|
@@ -157,6 +158,8 @@ with gr.Blocks(theme="NoCrypt/miku@>=1.2.2", css=css) as demo:
|
|
157 |
convert_danbooru_to_e621_prompt, [prompt, tagger_tag_type], [prompt], queue=False, show_api=False,
|
158 |
).success(
|
159 |
insert_recom_prompt, [prompt, neg_prompt, tagger_recom_prompt], [prompt, neg_prompt], queue=False, show_api=False,
|
|
|
|
|
160 |
)
|
161 |
|
162 |
demo.queue()
|
|
|
21 |
remove_specific_prompt,
|
22 |
convert_danbooru_to_e621_prompt,
|
23 |
insert_recom_prompt,
|
24 |
+
compose_prompt_to_copy,
|
25 |
)
|
26 |
from tagger.fl2sd3longcap import predict_tags_fl2_sd3
|
27 |
from tagger.v2 import (
|
|
|
46 |
|
47 |
with gr.Blocks(theme="NoCrypt/miku@>=1.2.2", css=css) as demo:
|
48 |
with gr.Column():
|
49 |
+
with gr.Accordion("Advanced settings", open=False):
|
50 |
with gr.Accordion("Recommended Prompt", open=False):
|
51 |
recom_prompt_preset = gr.Radio(label="Set Presets", choices=get_recom_prompt_type(), value="Common")
|
52 |
with gr.Row():
|
|
|
144 |
convert_danbooru_to_e621_prompt, [prompt, v2_tag_type], [prompt], queue=False, show_api=False,
|
145 |
)
|
146 |
tagger_generate_from_image.click(
|
147 |
+
lambda: ("", "", ""), None, [v2_series, v2_character, prompt], queue=False, show_api=False,
|
148 |
).success(
|
149 |
predict_tags_wd,
|
150 |
[tagger_image, prompt, tagger_algorithms, tagger_general_threshold, tagger_character_threshold],
|
|
|
158 |
convert_danbooru_to_e621_prompt, [prompt, tagger_tag_type], [prompt], queue=False, show_api=False,
|
159 |
).success(
|
160 |
insert_recom_prompt, [prompt, neg_prompt, tagger_recom_prompt], [prompt, neg_prompt], queue=False, show_api=False,
|
161 |
+
).success(
|
162 |
+
compose_prompt_to_copy, [v2_character, v2_series, prompt], [prompt], queue=False, show_api=False,
|
163 |
)
|
164 |
|
165 |
demo.queue()
|