Stable Diffusion WebUI 와일드카드(랜덤 프롬프트) 설치 및 적용
와일드카드는 prompt에 반복 입력하는 태그나 랜덤 태그를 적용하고자 할때 쓰는 기능
WebUI 화면의 Extensions를 통해 Dynamic Prompts 설치 후 사용
Available 탭에서 Load from 버튼 클릭

다이나믹 프롬프트 익스텐션 설치


설치 후 Apply and Restart UI 버튼 클릭
txt2img 화면에 Dynamic Promts 항목이 생성된 것을 확인
기본은 사용으로 체크되어 있음

extensions\sd-dynamic-prompts 폴더에 wildcards 폴더가 자동 생성 됨
stable-diffusion-webui\extensions\sd-dynamic-prompts\wildcards 폴더에
hairs.txt, background.txt 등 태그가 입력된 텍스트 파일을 추가
예) hairs.txt
twin braided
ponytai
straight hair
twintail
two side up
braided ponytail
bangs
또는
{twin braided|ponytail|straight hair|twintail|two side up|braided ponytail|bangs},
엔터로 라인을 추가하여 태그를 구분하거나
{, | 등의 기호로 문장을 랜덤하게 만들 수 있다.
"|" 는 or 조건으로 동작.
__hairs__ __background__ 와 같이 프롬프트 입력란에 언더바가 앞뒤로 두개씩 붙은 파일 이름 입력
엔터로만 구분 된 텍스트 파일을 사용하면 __hairs__, 처럼 뒤에 "," 쉼표 추가.
png info 에서 생성된 파일의 exif 정보를 확인해보면 랜덤으로 들어간 태그가 적용되어 있음을 확인
그외 문법으로
__filename*_은 filename으로 시작하는 모든 txt 파일의 태그를 입력
__folder/**/*__ 는 folder라는 폴더 하위의 모든 txt 파일 태그를 입력
텍스트 파일을 직접 수정해도 되지만 처음 추가 후에는 Webui 확장탭(Wildcards Manager)에서 직접 확인 및 수정할 수 있다.

매뉴얼
https://github.com/adieyal/sd-dynamic-prompts
GitHub - adieyal/sd-dynamic-prompts: A custom script for AUTOMATIC1111/stable-diffusion-webui to implement a tiny template langu
A custom script for AUTOMATIC1111/stable-diffusion-webui to implement a tiny template language for random prompt generation - GitHub - adieyal/sd-dynamic-prompts: A custom script for AUTOMATIC1111/...
github.com
Civitai 사이트에서 오른쪽 상단 필터를 와일드카드만 나오게하면 각종 와일드카드 텍스트 파일을 다운로드 햘수 있다.
https://civitai.com