Solution for Gradio v3.2.1b0 (latest) #577
TheLastBen
started this conversation in
Feature suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the new Gradio, gr.update() works better if the component type is included, for example gr.Textbox.update(), also you need to include the label and the value in gr.update (preferably anything supported by gr.update to be included).
Fix :
Replace the two first functions change_image_editor_mode and update_image_mask in ui_functions.py :
Replace txt2img_submit_on_enter.change in webui.py by :
txt2img_submit_on_enter.change(lambda x: gr.Textbox.update(label="Prompt", placeholder="A corgi wearing a top hat as an oil painting.", value=txt2img_defaults['prompt'], show_label=False, max_lines=1 if x == 'Yes' else 25), txt2img_submit_on_enter, txt2img_prompt)
Beta Was this translation helpful? Give feedback.
All reactions