SillyTavern / SillyTavern-Extras

Extensions API for SillyTavern.
GNU Affero General Public License v3.0
536 stars 122 forks source link

[Feature Request] Unique prompt settings for SD image generation for each character and editable 'describe scene/character/me/etc.' prompts #85

Closed Michczu closed 1 year ago

Michczu commented 1 year ago

I wanted to submit a feature request regarding image generation using StableDiffusion and the ability to edit description-prompts. I have noticed that the current description-generation prompts,"describe yourself/your face/me/the whole story/the last message," often generate responses that describe things that haven't actually happened yet and including them in the image generation prompt, which completely throws off the entire image. It would be great if we could have more control over these prompts to ensure more accurate and context-specific descriptions.

Additionally, one notable feature that StableDiffusion extensions would benefit from, would be the ability to include a LORA for a character within tailor-made prompt-profiles, or at the very least have custom guidelines to guide the AI's image prompt generation. Currently, it seems like there is no option to even edit the prompts, let alone create custom ones for each character. I have been searching around but couldn't find them anywhere. While I know that I can append prompts in the sd extension tab, it feels too rigid (they have to be there regardless of everything else), and asking the bot for a description is too unrestrained and lacks context. It would be highly beneficial if we could provide the AI with custom guidelines to follow when generating descriptions, such as specifying which features should be included if visible and omitting them if not. I tried adding those kinds of guidelines in the description tab, but it is a waste of context.

Here's an example of how such a prompt-profile could look like for describing Aqua from Konosuba:

"[In the next response, I want you to provide only a detailed comma-delimited list of keywords and phrases that describe Aqua. Always include prompt: 'aqua (konosuba).' If the following visible features are present, include the respective prompts: 'blue hair, 1girl, blue eyes, blue footwear, blue hair, blue thighhighs, blush, boots, breasts, bubble, detached sleeves, hair ornament, hair rings, leg up, long hair, looking at viewer, medium breasts, open hand, single hair ring, skirt, smile, solo, standing, standing on one leg, thigh boots, thighhighs, very long hair, water, white thighhighs, kono subarashii sekai ni shukufuku wo!' and separate each keyword or phrase with a comma. Do not describe anything below their neck. Do not include descriptions of non-visual qualities such as personality, movements, scents, mental traits, or anything that could not be seen in a still photograph. Suffix your description with: "." Prefix your description with the phrase 'close up facial portrait:']"

We should be able to take greater advantage of the flexibility that all the LLM models grant us.

  1. Ability to edit description-prompts for StableDiffusion's image generation to ensure more accurate and context-specific descriptions. 2.1. Option to create unique prompt-profiles for each character with custom guidelines for image prompt generation. 2.2. Inclusion of LORA (or embedding) for a character within tailor-made prompt-profiles for StableDiffusion image generation.
  2. An accessible interface for managing and editing prompts.
  3. Flexibility to append prompts in the StableDiffusion extension tab without rigid constraints (up to LLM's interpretation).

I'm up for giving it a shot myself, but I've been unable to find where these image-generation-description instructions are located, unfortunately. Also, I saw someone asking about an option to enable automatic image generation with each response, and I agree that it'd be a nice feature to have, if it's not already implemented, but one thing at a time. Thanks for reading this long feature request!

Cohee1207 commented 1 year ago

Thank you for the suggestion. We got a couple of similar requests, and this is planned, but I don't have an ETA right now as the dev team is currently busy with other things.

Michczu commented 1 year ago

@Cohee1207 Great to hear, thanks! By the way, would you mind telling me where the instructions are located? I can't seem to find them, and I'd like to play around with them, as I assume they're just a simple string.

Cohee1207 commented 1 year ago

Sure, here you go: https://github.com/SillyTavern/SillyTavern/blob/main/public/scripts/extensions/stable-diffusion/index.js#L51