stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Feature Request]: Comment out certain words in prompt input box
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What would your feature do ?
When I write prompts, it will gets longer and become harder to read, I think it would be nice to have a way to comment out certain words like other programming languages, or if there is any other way to do this, so I could write prompts with better readability I tried use zero attention like (discribtion:0) but it seemed still have effects on final results.
Proposed workflow
- in prompt input box,
- write prompts with certain comment syntax, like //comments
- and webui automatically removes comments before generates images.
Additional information
No response
I've also been wishing for this feature. It would super helpful, especially when sharing prompts. Thanks for considering.
So I was also wishing for this, and even considering implementing it, though not too familiar with all the AI tools, and my python is somewhat rusty. But then I realized, that this feature is sorta not needed, as it can be emulated already. One can use prompt editing feature to achieve this.
say you have prompt:
park night
and want to comment out 'night', you can do it like this:
park [night::-1]
not the most elegant syntax, but works, and most likely good enough/close enough to whatever could be implemented.
As a programmer, i have been wishing for this feature as well, i personally make notepad files with structures for my prompt, having comment lines that start with // or # would be very nice since it would allow me to have a prearranged structure explained in comments on multiple lines to not forget elements, I could just copy and paste them into the UI and modify them right away.
Example:
// MEDIA
{photo, 8K,
// SUBJECT
man in armor in city with gun},
// DESCRIPTOR
blue eyes, dark hair
// WEBSITE - ARTIST
artstation
// EMBEDDINGS
Style-Psycho
Alternatively since this gets sent as one string parameter this kind of syntax could also be used (C++ like)
/* EMBEDDINGS */
Style-Psycho
OR
# EMBEDDINGS #
Style-Psycho
If it were included in the picture embedded data, i think it would help people understand the structure of prompt better and promote more coherently built prompts.
try "<comment:bla bla bla>", it will call a model "comment", lol hope a better way to do comment.
same trick as NoiseDesign
I am just doing this: prompt: full body middle shot, RAW photo of 25 year old male model
if I want to comment out smth: <rem:full body middle shot>, RAW photo of 25 year old male model
Not the cleanest way but it's fast and efficient!
Closing as in the PR (https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/10486) it was determined this would not be implemented. For alternatives you could use the dynamic scripts extension or hijack the extra networks syntax, <comment:like this:0>
.
Some legend implemented it with a few lines of code: https://github.com/itsui/sd-webui-infolk-prompt-comment
You can even set the char to whatever you want by a simple .js edit, it's # by default.