AUTOMATIC1111 / stable-diffusion-webui-wildcards

Wildcards
428 stars 104 forks source link

how to install? #16

Open alexbfree opened 1 year ago

alexbfree commented 1 year ago

how do you install this, can you add instructions?

poisenbery commented 1 year ago

how do you install this, can you add instructions?

This is a little trick I use whenever there aren't install instructions:

Look at the file/folder structure of the program you're using and compare it to the addon. In this case, the Webui and this repository both have a "Scripts" folder. This would lead me to believe that installing means placing the contents of this repository into the root directory of the webui.

So, first download the repo, then place the contents in the root directory. A more involved method would be copying the contents of the "Scripts" folder from this repo and placing it into the "Scripts" folder of the Webui, then make the "wildcards" folder in the root directory as well. Your scripts folder should have the wildcards.py file inside.

Screenshot (1322)

And the Root Directory should have the 'wildcards' folder Screenshot (1324)

Next you would want to create the wildcard files themselves. Here is an example one I made for hair length. I have hair lengths on their own lines, and the file is named "hairlength.txt" [I have noticed that spaces in the file name do not work, so I keep the files as 1 word] Screenshot (1325)

Now, in order to make this work in the Webui, you do a double underscore, then the wildcard file name, then another double underscore. In this case, it would be hairlength This will cause webui to look at the hairlength.txt file, and pull a random line from that file.

LMK if there is anything else you do not understand.

poisenbery commented 1 year ago

I think https://github.com/adieyal/sd-dynamic-prompts is the new replacement for this script.