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

[question] More info about "--sample_prompts" needed #256

Closed
neojam opened this issue Mar 4, 2023 · 7 comments
Closed

[question] More info about "--sample_prompts" needed #256

neojam opened this issue Mar 4, 2023 · 7 comments

Comments

@neojam
Copy link

neojam commented Mar 4, 2023

Hallo,

I've a question about the new "--sample_prompts" feature:

--sample_prompts option: the file contains prompts (each line generates one image.)
The prompt is subset of gen_img_diffusers.py. The prompt options w, h, d, l, s, n are supported.

What are those "w, h, d, l, s, n" options and how to use them with --sample_prompts?

P.S.
Currently i just point it to a textfile containing promts and it gives me 512x512 previews during training.
--sample_prompts="D:\SDTEST\Promts.txt"
But I have no Idea how to use the "w, h, d, l, s, n" options and what those are.

@neojam
Copy link
Author

neojam commented Mar 5, 2023

Looks like you can add those after your promt inside the txt file: --w 512 --h 768 --s 35.
still need info about: d, l, n

@kohya-ss
Copy link
Owner

kohya-ss commented Mar 5, 2023

Sorry for the lack of documentation. I am in the process of writing a document, so copy from there

A prompt file might look like this, for example

# prompt 1
masterpiece, best quality, 1girl, in white shirts, upper body, looking at viewer, simple background --n low quality, worst quality, bad anatomy,bad composition, poor, low effort --w 768 --h 768 --d 1 --l 7.5 --s 28

# prompt 2
masterpiece, best quality, 1boy, in business suit, standing at street, looking back --n low quality, worst quality, bad anatomy,bad composition, poor, low effort --w 576 --h 832 --d 2 --l 5.5 --s 40

Lines beginning with # are comments. You can specify options for the generated image with --?, like --n. The following can be used.

  • --n Negative prompt up to the next option.
  • --w Specifies the width of the generated image.
  • --h Specifies the height of the generated image.
  • --d Specifies the seed of the generated image.
  • --l Specifies the CFG scale of the generated image.
  • --s Specifies the number of steps in the generation.

Unfortunately the prompt weighting ( ) and [ ] are not working.

@neojam
Copy link
Author

neojam commented Mar 5, 2023

Not a problem at all and thank you a lot for the clarification! :)

@neojam neojam closed this as completed Mar 5, 2023
@TingTingin
Copy link
Contributor

would be nice if you could also set a sample amount without having to copy multiple lines

@kohya-ss
Copy link
Owner

kohya-ss commented Mar 6, 2023

Sure. But if we support that feature, we need to be able to specify more than one seed as well. For example, --d 1,2,3,4,5 might be a good notation. I will consider to add it.

@TingTingin
Copy link
Contributor

It could set a random seed unless otherwise specified like the webui

@DarkAlchy
Copy link

--d my seed is the only one of those flags that is not shown in the cli. Is it ignoring it?

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

No branches or pull requests

4 participants