adieyal / sd-dynamic-prompts

A custom script for AUTOMATIC1111/stable-diffusion-webui to implement a tiny template language for random prompt generation
MIT License
2.02k stars 261 forks source link

Write prompt to metadata do not work fully #703

Open ema7569 opened 9 months ago

ema7569 commented 9 months ago

Hello, first thank for this helpful extension. In settings I checked "Save template to metadata: Write prompt template into the PNG metadata"

When I write a inline template like {value1|value2] the saved metadata is the result for value1 or value2 but not the template with {}

For a more complete example of the problem, this is my inline template :

`` (masterpiece, black hair, ponytail, hair ribbon, ribbon, very long hair, purple eyes, shiny eyes, blush, closed mouth, {smile, parted lips|smile}, detailed face), { jester, jester cap, hat, puffy sleeves, short sleeves, pom pom clothes, bridal gauntlets, pajamas, star print, shuriken, navel, pants| white shirt, green vest, green skirt, plaid skirt, school uniform, bowtie| yellow shirt, pink skirt, pleated skirt| bare shoulders, white shirt, off-shoulder shirt, cleavage, navel, shorts, gym shorts }

And the saved metadata is

`` (masterpiece, black hair, ponytail, hair ribbon, ribbon, very long hair, purple eyes, shiny eyes, blush, closed mouth, smile), jester, jester cap, hat, puffy sleeves, short sleeves, pom pom clothes, bridal gauntlets, pajamas, star print, shuriken, navel, pants

What is needed is to save the original prompt in metadata

ArnorWing commented 9 months ago

It's not writing the raw positive and negative prompts. I've had this problem for a while. I've done a fresh install of A1111 and DP and it still happens. It was working for a really long time, 6+ months, but stopped about 2-3 weeks ago. "Write prompts to file: Create a new .txt file for every batch containing the prompt template as well as the generated prompts." This option creates a CSV file but also does not include the raw prompt

ema7569 commented 9 months ago

Yes I see same thing, it worked before but break after an update to a new version

Tsogall commented 9 months ago

Do you have adetailer installed? I have the same issue of the template being written as the chosen wildcard values and not the initial wildcard prompt itself. However, when I disable adetailer it seems to save the wildcard/variant prompt correctly as a template.

How to get them to both work together again though is the problem...

ArnorWing commented 9 months ago

Do you have adetailer installed? I have the same issue of the template being written as the chosen wildcard values and not the initial wildcard prompt itself. However, when I disable adetailer it seems to save the wildcard/variant prompt correctly as a template.

How to get them to both work together again though is the problem...

Yes you are right. Without Adetailer it saves the raw prompt. Not where it used to save it at the end but in the middle of the Steps information paragraph.

josh-robey commented 8 months ago

Do you have adetailer installed? I have the same issue of the template being written as the chosen wildcard values and not the initial wildcard prompt itself. However, when I disable adetailer it seems to save the wildcard/variant prompt correctly as a template.

How to get them to both work together again though is the problem...

So THATS where this is coming from. It's random for me like every once in 4/5 gens, it will just spit out the raw prompt like you said, instead of activating the wildcards/variables.

Also I want to add, if you are generating in batches, the entire batch is affected by this as well.