Merge branch 'feature/automatically-describe-uov-image'
# Conflicts: # webui.py
This commit is contained in:
commit
3e9d66c5f6
|
|
@ -24,6 +24,7 @@ Included adjustments:
|
|||
* ✨ https://github.com/lllyasviel/Fooocus/pull/1809 - reduce file size of preview images
|
||||
* ✨ https://github.com/lllyasviel/Fooocus/pull/1932 - use consistent file name in gradio
|
||||
* ✨ https://github.com/lllyasviel/Fooocus/pull/1863 - image extension support (png, jpg, webp)
|
||||
* ✨ https://github.com/lllyasviel/Fooocus/pull/1938 - automatically describe image on uov image upload if prompt is empty
|
||||
|
||||
✨ = new feature<br>
|
||||
🐛 = bugfix<br>
|
||||
|
|
|
|||
9
webui.py
9
webui.py
|
|
@ -688,6 +688,15 @@ with shared.gradio_root:
|
|||
desc_btn.click(trigger_describe, inputs=[desc_method, desc_input_image],
|
||||
outputs=[prompt, style_selections], show_progress=True, queue=True)
|
||||
|
||||
def trigger_uov_describe(mode, img, prompt):
|
||||
# keep prompt if not empty
|
||||
if prompt == '':
|
||||
return trigger_describe(mode, img)
|
||||
return gr.update(), gr.update()
|
||||
|
||||
uov_input_image.upload(trigger_uov_describe, inputs=[desc_method, uov_input_image, prompt],
|
||||
outputs=[prompt, style_selections], show_progress=True, queue=True)
|
||||
|
||||
def dump_default_english_config():
|
||||
from modules.localization import dump_english_config
|
||||
dump_english_config(grh.all_components)
|
||||
|
|
|
|||
Loading…
Reference in New Issue