Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: New Line Prompt S/R #15918

Open
1 task done
AviceProjects opened this issue May 31, 2024 · 1 comment
Open
1 task done

[Feature Request]: New Line Prompt S/R #15918

AviceProjects opened this issue May 31, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@AviceProjects
Copy link

AviceProjects commented May 31, 2024

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

When you use new lines in Prompt S/R, it should ignore commas.

Proposed workflow

  1. Go to Scripts, and Prompt S/R
  2. Type in strings separated by new lines
  3. You're allowed to use strings with commas in Prompt S/R!

Additional information

No response

@AviceProjects AviceProjects added the enhancement New feature or request label May 31, 2024
@w-e-w
Copy link
Collaborator

w-e-w commented Jun 1, 2024

You're allowed to use strings with commas in Prompt S/R!

you always can use comma in string, you just have to "quote" it


the format is CSV (Comma-separated values), you can you commas as as long as you quote the string using double quote "
example

"p1,p2","p3,p4"

this is paresd as p1,p2 and p3,p4
or you like newline as comma

"p1,p2"
"p3,p4"

because the text is in newline no need of comma between p1,p2 and p3,p4

if you need to use " in the value \" escape it with a \, \" -> "
if you need a \ in value, escape it with another \ , \\ -> \
if you need new line in value quote it with "

"p1,
p2","p3
p4" 

this converts to p1<newline>p2 p3<newline>p4


some more examples
since I've written some documentation for my extension that also use CSV I've just reference it
https://github.com/w-e-w/sd-webui-xyz-addon?tab=readme-ov-file#csv---comma-separated-values

note there's a minor but important difference between the built-in xyz and what I written in docs of my extentions.
in the built-in xyz CSV, spaces between the quote character " are not currently allowed

"a","b","c"

but not this

"a", "b", "c"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants