stable-diffusion-webui
stable-diffusion-webui copied to clipboard
Add Clear Prompt button to roll_col
Addresses #1692
Currently, my idea is to have the button appear by default if the user is on a device which is not using a traditional mouse. This would be done using css media feature tests and checking for certain user agents. I also want to make it so that the user has to press the button twice within a certain time frame. This would hopefully prevent too many mishaps caused by mis-clicks.
I do realize that this is less useful on traditional desktop setups but on many atypical setups such as using the web-ui through a VR HMD where you are using a limited pointer or pseudo-mouse, it would make an incredible difference.
Let me know what everyone thinks
I really want a clear prompt button, but the place I need it the most is on my phone. Its awkward to try to clear out a long prompt on mobile. Because of this I don't want the button to go away on non-mouse devices.
I really want a clear prompt button, but the place I need it the most is on my phone. Its awkward to try to clear out a long prompt on mobile. Because of this I don't want the button to go away on non-mouse devices.
Maybe I emphasized too much on "VR HMD's" but what I was saying is that it will visible by default if the user does not have a traditional mouse. Even then, I think I'm going to put a toggle in the settings to allow users to be able force it on if they so choose.
"I SNEEEED IT!!!!"
This seems to be a duplicate of #2728. But since #2728's author is missing, can you add confirmation dialogue in this PR?
This seems to be a duplicate of #2728. But since #2728's author is missing, can you add confirmation dialogue in this PR?
Yea sorry, I actually noticed my mistake last night after pushing 8931a82. But yea that's what I'm planning on doing.
Demo: https://youtu.be/5Z6sYdkURPc
I am excited for this to get added. How did you get the hypernetworks at the top in your demo?
I am excited for this to get added. How did you get the hypernetworks at the top in your demo?
In the 'User Interface' section of the settings pane add sd_hypernetwork to the comma separated list of ids.
Keep in mind you will also need to either fully restart the UI or restart the whole program for this to take effect.
can this be done just clientside with javascript?
can this be done just clientside with javascript?
That's actually how I went to initially implement this but I realized because the prompts are not being cleared on the back-end as well it would not function as expected. I would clear the prompt then go to save a style and it would create a style containing what I just had deleted. The other issue was that the token counter would not be synchronized without binding another event to it or without overwriting the token counter.
@AUTOMATIC1111 Are you saying it needs to be done purely in javascript to be merged?
There are few parts of code in the project that edit gradio inputs clientside, and to make changes visible server-side, this seems to be enough:
textarea.dispatchEvent(new Event("input", { bubbles: true }))
Ok cool, forgot about that functionality. Will revert to js.
Should be ready again @AUTOMATIC1111