diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-01-21 06:14:27 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-01-21 06:14:27 +0000 |
commit | 6d805b669e86233432f56ee1892d062103abe501 (patch) | |
tree | e76ace1a20b959f3a647740bc08085d4c82898aa /modules/ui.py | |
parent | 40ff6db5325fc34ad4fa35e80cb1e7768d9f7e75 (diff) | |
download | stable-diffusion-webui-gfx803-6d805b669e86233432f56ee1892d062103abe501.tar.gz stable-diffusion-webui-gfx803-6d805b669e86233432f56ee1892d062103abe501.tar.bz2 stable-diffusion-webui-gfx803-6d805b669e86233432f56ee1892d062103abe501.zip |
make CLIP interrogator download original text files if the directory does not exist
remove random artist built-in extension (to re-added as a normal extension on demand)
remove artists.csv (but what does it mean????????????????????)
make interrogate buttons show Loading... when you click them
Diffstat (limited to 'modules/ui.py')
-rw-r--r-- | modules/ui.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/ui.py b/modules/ui.py index d23b2b8e..164e0e93 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -228,17 +228,17 @@ def process_interrogate(interrogation_function, mode, ii_input_dir, ii_output_di left, _ = os.path.splitext(filename)
print(interrogation_function(img), file=open(os.path.join(ii_output_dir, left + ".txt"), 'a'))
- return [gr_show(True), None]
+ return [gr.update(), None]
def interrogate(image):
prompt = shared.interrogator.interrogate(image.convert("RGB"))
- return gr_show(True) if prompt is None else prompt
+ return gr.update() if prompt is None else prompt
def interrogate_deepbooru(image):
prompt = deepbooru.model.tag(image)
- return gr_show(True) if prompt is None else prompt
+ return gr.update() if prompt is None else prompt
def create_seed_inputs(target_interface):
@@ -1039,19 +1039,18 @@ def create_ui(): init_img_inpaint,
],
outputs=[img2img_prompt, dummy_component],
- show_progress=False,
)
img2img_prompt.submit(**img2img_args)
submit.click(**img2img_args)
img2img_interrogate.click(
- fn=lambda *args : process_interrogate(interrogate, *args),
+ fn=lambda *args: process_interrogate(interrogate, *args),
**interrogate_args,
)
img2img_deepbooru.click(
- fn=lambda *args : process_interrogate(interrogate_deepbooru, *args),
+ fn=lambda *args: process_interrogate(interrogate_deepbooru, *args),
**interrogate_args,
)
|