Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Region control prompt text boxes reset to default size EVERY time you press Enter/Return #391

Open
SunGod opened this issue May 7, 2024 · 1 comment

Comments

@SunGod
Copy link

SunGod commented May 7, 2024

I've run into an EXTREMELY frustrating issue that will hopefully be an easy fix.

When using regional control prompts that are several lines long, you need to expand the text area vertically to see this entire prompt - this is normal. However, whenever you press Enter/Return while editing that long prompt (and without changing focus from that text area), the text area size will immediately return to the default size -- this is insanely annoying and makes editing long regional area prompts extremely frustrating.

My suggested fix: text areas should not automatically resize when the user presses the Enter key (or Shift-Enter to create a line break) while editing a prompt and the text area remains in focus.

This occurs on Windows 10, latest Firefox, using LobeHub UI. I've not tested it on other browsers or default Stable Diffusion UI/A1111.

@Disguised-Giraffe
Copy link

I replaced the code line 212-13 in tilediffusion.py can be replaced with:

                            prompt = gr.Text(show_label=False, placeholder=f'Prompt, will append to your {tab} prompt', lines=2, elem_id=f'MD-{tab}-{i}-prompt', elem_classes=["prompt"])
                            neg_prompt = gr.Text(show_label=False, placeholder='Negative Prompt, will also be appended', lines=2, elem_id=f'MD-{tab}-{i}-neg-prompt', elem_classes=["prompt"])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants