Skip to content

Commit 9ae30b3

Browse files
committed
remove cmd args requirement for deepdanbooru
1 parent 828438b commit 9ae30b3

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

modules/ui.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,7 @@ def create_toprow(is_img2img):
478478
if is_img2img:
479479
with gr.Column(scale=1, elem_id="interrogate_col"):
480480
button_interrogate = gr.Button('Interrogate\nCLIP', elem_id="interrogate")
481-
482-
if cmd_opts.deepdanbooru:
483-
button_deepbooru = gr.Button('Interrogate\nDeepBooru', elem_id="deepbooru")
481+
button_deepbooru = gr.Button('Interrogate\nDeepBooru', elem_id="deepbooru")
484482

485483
with gr.Column(scale=1):
486484
with gr.Row():
@@ -1004,11 +1002,10 @@ def create_ui(wrap_gradio_gpu_call):
10041002
outputs=[img2img_prompt],
10051003
)
10061004

1007-
if cmd_opts.deepdanbooru:
1008-
img2img_deepbooru.click(
1009-
fn=interrogate_deepbooru,
1010-
inputs=[init_img],
1011-
outputs=[img2img_prompt],
1005+
img2img_deepbooru.click(
1006+
fn=interrogate_deepbooru,
1007+
inputs=[init_img],
1008+
outputs=[img2img_prompt],
10121009
)
10131010

10141011

@@ -1240,7 +1237,7 @@ def create_ui(wrap_gradio_gpu_call):
12401237
process_split = gr.Checkbox(label='Split oversized images')
12411238
process_focal_crop = gr.Checkbox(label='Auto focal point crop')
12421239
process_caption = gr.Checkbox(label='Use BLIP for caption')
1243-
process_caption_deepbooru = gr.Checkbox(label='Use deepbooru for caption', visible=True if cmd_opts.deepdanbooru else False)
1240+
process_caption_deepbooru = gr.Checkbox(label='Use deepbooru for caption', visible=True)
12441241

12451242
with gr.Row(visible=False) as process_split_extra_row:
12461243
process_split_threshold = gr.Slider(label='Split image threshold', value=0.5, minimum=0.0, maximum=1.0, step=0.05)

0 commit comments

Comments
 (0)