AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
142.65k stars 26.9k forks source link

[Feature Request]: X/Y/Z plotting prompt S/R use file input #14876

Open ChristianMayer opened 9 months ago

ChristianMayer commented 9 months ago

Is there an existing issue for this?

What would your feature do ?

I try to do an X/Y/Z plotting with S/R and want to use prompts stored in a text file.

After training a LoRA I want to check different LoRA strengths (X direction) and number of trained epochs (Y direction) to figure out which is best. So I want to use the Z direction for the image prompts which are a list of many tags each (comma separated as it is usual for beeing a prompt :) ) - but I can't do that as the S/R syntax is interfering with the prompt syntax. And the many tags woudn't make it readable anyway

Proposed workflow

  1. Add an additional "prompt S/R" to the existing one, the new one would be "prompt S/R from text file"
  2. Have a text file where each line is like one of the current S/R tokens that are separated by a comma

=> So the first line of the text file is searched in the prompt and for each iteration the following line is used as replacement

So the new stuff to implement is very simple: duplicate the "prompt S/R" with a new name, have a file selector and then do the split for the S/R list not by a comma but by the new line character.

Additional information

No response

w-e-w commented 9 months ago

but I can't do that as the S/R syntax is interfering with the prompt synta

no, xyz use CSV (Comma Separated Values) as CSV have escapes syntax, you just have to put comma in the string, just surround them in double quotes

image

many tags woudn't make it readable anyway

that's true if you're dealing with large amounts of prompts, it might be better for you to use Prompts from file or textbox

image

ChristianMayer commented 9 months ago

but I can't do that as the S/R syntax is interfering with the prompt synta

no, xyz use CSV (Comma Separated Values) as CSV have escapes syntax, you just have to put comma in the string, just surround them in double quotes

Thanks for the hint, I didn't knew that.

many tags woudn't make it readable anyway

that's true if you're dealing with large amounts of prompts, it might be better for you to use Prompts from file or textbox

My test prompts are currently a list of 75 entries. That's probably explaining why I want to automate it and don't enter them manually.

The Prompts from file or textbox is working fine, especially with my list of 75 prompts. But it doesn't create the X/Y grid that I want to have for each single line of my prompt line so that I can quickly see where the sweet spot of epoch and LoRA strength lies. - Or is there a trick for that?

w-e-w commented 9 months ago

My test prompts are currently a list of 75 entries. That's probably explaining why I want to automate it and don't enter them manually.

75.... you probably realized creating a large image that's 75 times a normal image size is not a good idea and not easy to view

I think it's better for you use https://github.com/mcmonkeyprojects/sd-infinity-grid-generator-script as opposed to opening a grid it generates a web page you could have infinite axles and you can choose which to view on whe webpage you can create a yml config for your test case,