오늘은 프롬프트 토큰을 랜덤으로 부여하면서 무지성으로 뽑는 방법을 소개할까 합니다.
일단 두가지 확장을 설치하셔야 해요.
설치:
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
https://github.com/butaixianran/sdweb-easy-prompt-selector
GitHub - butaixianran/sdweb-easy-prompt-selector
Contribute to butaixianran/sdweb-easy-prompt-selector development by creating an account on GitHub.
github.com
확장 설치법은 많이 다뤘지만, 간단히 이미지로 대체 하겠습니다.
RAW photo, (intricate details:1.4), extremely delicate and beautiful, (best quality:1.4), (masterpiece:1.3), detailed skin texture, vibrant shiny skin, (photorealistic:1.4), 1girl, @인물:나이@, @인물:몸매@, @인물:피부추가@
굵은 글씨로 되어 있는 부분이 추가 된다.
아마 랜덤으로 부여될껏 같은 느낌인데 한번 해보자.
그래서 네거티브에 (nsfw, nude) 추가하고 진행해볼께요.
배치카운트 를 9로 주고 9장만 뽑아보자 랜덤으로 나오는지...
체크포인트 : henmix_real v40 (fp16)
기본 긍정프롬프트에
RAW photo, (intricate details, photorealistic, best quality:1.4), extremely delicate and beautiful, (masterpiece:1.3), detailed skin texture, vibrant shiny skin, , 1girl,
easy prompt selector 설치된 확장폴더를 가보면
tag_example 폴더가 있고 어떻게 구성하는지 예제 파일을 불러와 볼께요.
Number:
- 1girl
- a woman
- 1boy
- a man
- 1other
- 2 girls
- multiple girls
Age:
teen: teen
early_teen: early teen
adult: adult
old: elder
child: child
kindergartener: kindergartener
toddler: toddler
loli: loli
shota: shota
SkinColor:
white: white skin
pale: pale skin
dark: dark skin
shiny: shiny skin
colored: colored skin
SkinExtra:
tan: tan
tanlines: tanlines
tattoo: tattoo
oil: oil
wet: wet
BodyShape:
athlete: athlete
model: model
slender: slender
glamor: glamor
plump: plump
fat: fat
tall: tall
petite: petite
chibi: chibi
pregnant: pregnant
muscular: muscular
narrow_waist: narrow waist
wide_hips: wide hips
Breast:
flat: flat chest
small: small breasts
medium: medium breasts
large: large breasts
huge: huge breasts
hanging: hanging breasts
BodyPart:
face: face
eyes: eyes
mouth: mouth
lip: lip
armpits: armpits
collarbone: collarbone
navel: navel
waist: waist
ass: ass
leg: leg
thighs: thighs
foot: foot
Wing:
wings: wings
bat_wings: bat wings
butterfly wings: butterfly wings
demon_wings: demon wings
dragon_wings: dragon wings
이런 파일이 어떻게 적용되는지 확인해봐야겠죠.
tags_example 에 있는 파일 세개를 tags 폴더로 복사합니다. 이미 들어있을수도 있겠네요.
Webui를 재시작하고,
Pick Tag를 눌러봅시다.
Nothing 드랍다운 메뉴를 눌러보시면 복사한 세개의 파일이 목록에 추가된걸 보실수 있고,
Character 부분을 클릭해봅니다.
예로 Number 밑의 1girl, a woman, 이런걸 각각 클릭해서, 프롬프트에 추가하실수도 있고,
1other를 클릭하면,
RAW photo, (intricate details, photorealistic, best quality:1.4), extremely delicate and beautiful, (masterpiece:1.3), detailed skin texture, vibrant shiny skin, , 1girl,1other
"Number" 자체를 누르면
RAW photo, (intricate details, photorealistic, best quality:1.4), extremely delicate and beautiful, (masterpiece:1.3), detailed skin texture, vibrant shiny skin, , 1girl,@Character:Number@
이렇게 자동으로 추가됩니다.
자세히 몰라도 Number자체를 주면, Number 하위의 요소가 랜덤으로 나올껏 같죠, 한번 돌려볼께요.
RAW photo, (intricate details, photorealistic, best quality:1.4), extremely delicate and beautiful, (masterpiece:1.3), detailed skin texture, vibrant shiny skin, @Character:Number@
컴이 느려서 기본옵션으로 그냥 돌려보겠습니다. hires.fix 생략, 디테일러들 생략
일단 돌려보니 랜덤으로 나오긴 하는데 헨믹스 모델이 너무 벗고 나오네요. 그래서 옷을 입혀서 다시 출력해보겠습니다.
chatgpt를 이용해서 전통의상을 한번 만들어보겠습니다.
전통의상.yml을 만들고
전통의상:
한국: Hanbok
일본: Kimono
중국: Qipao/Cheongsam
인도: Sari
스웨덴: Folkdräkt
말레이시아: Baju Kurung
멕시코: Sombrero
기니: Boubou
그리스: Chiton/Toga
노르웨이: Bunad
스코틀랜드: Kilt
이집트: Galabeyah/Caftan
스페인: Flamenco dress
네덜란드: Dutch cap and apron
트위드: Harris Tweed
인도네시아: Batik
태국: Chut Thai
필리핀: Baro't Saya
이탈리아: Toga/Stola
프랑스: Breton Striped Shirt/Beret
터키: Kaftan
베트남: Ao Dai
브라질: Baiana Dress/Cangaceiro Hat
Webui를 재시작해봅니다.
다 클릭하고
RAW photo, (intricate details, photorealistic, best quality:1.4), extremely delicate and beautiful, (masterpiece:1.3), detailed skin texture, vibrant shiny skin, , 1girl,@전통의상:전통의상@, @Face:eye@, @Face:Mouth@, @Face:Facial@
paintings, sketches, drawing, (worst quality, normal quality, low quality:1.5), (head out of frame), strabismus, lowres, monochrome, grayscale, bad proportions, watermark, signature, text, bad-artist, negative_hand-neg, nsfw, (multiple views:1.6), split screen, (nsfw, nude)
9개만 뽑아봅니다.
잘 동작하는 볼수 있습니다.
오늘은 가볍게 랜덤뽑기에 유용한 easy prompt selector를 알아보았는데요,
요새 인공지능 (GPT, wrtn.ai) 이런거 이용해서 위에 짧게 소개해드린 방식으로 다양한 프롬프트를 만드시면 더 쉽고 다양하게 랜덤뽑기를 하실수 있을꺼에요.
인터넷 서핑 하다보면 친절히 공유해주시는 분들도 계신데, 제가 임의로 소개해드릴수는 없고,
가볍게 만드는 법을 소개해드렸습니다.
그럼 다음 시간에 또 만나요. 감사합니다.
- YAML(YAML Ain't Markup Language)은 인간이 쉽게 읽을 수 있는 데이터 직렬화 양식입니다. 주로 데이터 구조를 포함하며, 프로그래밍 언어에 구속되지 않고 다양한 환경에서 사용될 수 있습니다. YAML 파일은 일반적으로 .yml 또는 .yaml 확장자를 가집니다.
YAML 파일은 구조화된 데이터를 저장하기 위한 사용하기 쉬운 형식입니다. 많은 프로그래밍 언어에서 YAML 파일을 사용하여 데이터를 저장하고 읽을 수 있습니다. 이러한 이유로 YAML 파일은 설정 파일, 데이터 전송 프로토콜 및 다양한 용도로 사용되고 있습니다. [본문으로]
'IT > AI' 카테고리의 다른 글
SD Webui 확장 - image browser (0) | 2023.05.17 |
---|---|
SD Webui 확장 - OneButtonPrompt (랜덤뽑기) (0) | 2023.05.15 |
SD Webui 확장 - SadTalker (말하는 캐릭터 만들기) (mac m1) (0) | 2023.05.12 |
Webui 확장: Tiled Diffusion 을 이용한 Upscaler - multidiffusion-upscaler-for-automatic1111 (0) | 2023.05.12 |
SD Webui 확장 - DDSD (유용함) (1) | 2023.05.10 |