본문 바로가기
AI/StableDiffusionWebUI

매력적인 실사 만들기

by wenect 2023. 3. 5.

Stable Diffusion Web UI

https://github.com/AUTOMATIC1111/stable-diffusion-webui

 

GitHub - AUTOMATIC1111/stable-diffusion-webui: Stable Diffusion web UI

Stable Diffusion web UI. Contribute to AUTOMATIC1111/stable-diffusion-webui development by creating an account on GitHub.

github.com

Stability AI에서 오픈소스 라이선스로 배포한 text-to-image 인공지능 모델이다. 2022년 8월 22일 출시했다.

Stable Diffusion은 독일 뮌헨 대학교 Machine Vision & Learning Group (CompVis) 연구실의 "잠재 확산 모델을 이용한 고해상도 이미지 합성 연구"[1]를 기반으로 하여, Stability AI와 Runway ML 등의 지원을 받아 개발된 딥러닝 인공지능 모델이다.
Stability AI는 방글라데시계 영국인 에마드 모스타크(Emad Mostaque)가 사비로 만든 회사로, Stable Diffusion에 방대한 LAION-5B 데이터베이스를 학습시킬 수 있도록 컴퓨팅 자원을 제공하였다. OpenAI의 Dall-e 2나 구글의 Imagen과 같은 기존 text-to-image 모델들과는 다르게 컴퓨터 사용 리소스를 대폭 줄여 4GB 이하의 VRAM을 가진 컴퓨터에서도 돌릴 수 있다.
또한 개발 비용이 클 것임에도 불구하고[2] 통 크게 오픈 소스로 공개해서 일반인들도 사용을 할 수 있다.
사실상 그림 인공지능의 시대를 연 인공지능 모델이며 이 모델을 채택한 인공지능들이 우후죽순으로 늘어나고 있다.

CheckPoint
 - 전체적인 그림체를 결정하는 모델
- Chilloutmix_NiprunedFp32Fix
Lora
- 얼굴부분등 특정 부분만 고도로 학습된 모델
- koreanDollLikeness_v15
VAE
- 사진과 같은 고퀄리티 이미지를 생성, 이미지 후보정, 퀄리티를 향상 시키는 모델
- Vae-ft-mse-840000-ema

Negative Prompt
- 잘못 생성된 인체 모델 부분들(팔,다리,손가락)을 조정해줌
- ng_deepnegative_v1_75t


다운로드 리스트

  1. CheckPoint : ChillloutMix
  2. Lora : KoreanDollLikeNess
  3. VAE : vae-ft-mse-840000-ema-pruned.ckpt
  4. Nesgative Prompt : ng_deepnegative

사용할 모델데이터들을 받아논다.

프로그램 빌드

생성프로그램을 다운받아서 pc에서 하거나 google colab에서 진행할수 있음
pc 사양이 낮아 google colab에서 진행 하겠습니다.
지원하는 colab에서 리스트중에 하나를 선택(maintained by TheLastBen)을 합니다. 

내 구글 드라이버로 복사해 온다
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Online-Services..
maintained by TheLastBen

하나씩 빌드한다..

리스트의 마지막 빌드를 진행하면 "Start Stable-Diffusion" 하단에 링크가 생성된다.
링크를 클릭하면 설정창이 나타난다.
이것으로 생성한것은 만족할 만한 결과를 얻기 힘들기 때문에 위에서 받아논 4개의 모델들을 사용하여 조정하도록 한다.

모델 추가

경로 파일
내 드라이브>sd>stable-diffusion-webui>models>Stable-diffusion chilloutmix_NiPrunedFp32Fix.safetensors
내 드라이브>sd>stable-diffusion-webui>models>Lora koreanDollLikeness_v15.safetensors
내 드라이브>sd>stable-diffusion-webui>models>VAE vae-ft-mse-840000-ema-pruned.ckpt
내 드라이브>sd>stable-diffusion-webui>embeddings ng_deepnegative_v1_75t.pt

4개의 파일들을 google driver에 복사해 놓는다.

모델연결하기

1.Stable Diffusion checkpoint  설정

chilloutmix_NiPrunedFp32Fix.safetensors를 선택

2.Lora 설정

Show Extra Network
Lora

3.Stable Diffusion
Settings
Stable Diffusion
SD VAE
    vae-ft-mse-840000-ema-pruned

ApplySettings를 적용하면 설정이 적용된다.

Lora는 Close합니다.

생성해보기

[ text2image ]
글자를 이미지로 생성하기
1. 생성하고자 하는 내용, 특징들
2.제외하고자 하는 내용
3.생성방법 ( DPM++ SDE Karras 추천)
4.생성복잡도(배경및 사람의 자연스러움과 복잡도를 높이고자 하는경우 숫자를 높이면되는데 보통 30~40)
5.이미지 크기
6.생성갯수
작업환경, Sampling Steps, CFG scale과 랜덤 시드번호 등에 따라 결과물은 항상 달라집니다. 
 (이글 아래에 1번에 Positive Prompt, 2번에 Negative Prompt 값을 복사해 넣는다)

 

프롬프트

Positive Prompt는 하나씩 스타일들

<lora:koreanDollLikeness_v15:0.5>, ultra detailed, highres, (realistic, photo-realistic:1.4), 8k, raw photo, (masterpiece), (best quality), physically-based rendering, Female college student, long brown hair, Korea, street, looking, jeans, white T-shirt, realistic photography, professional color graded, 8K, F2.4, 35mm.

<lora:koreanDollLikeness_v15:0.4>, ultra detailed, highres, (realistic, photo-realistic:1.4), 8k, raw photo, (masterpiece), (best quality), physically-based rendering, 1girl, looking at viewer, standing, full body, dressed, medium breasts, (black mini skirt:1.4), choker, beautiful detailed eyes, daytime, sunshine, shoulder-length hair, silver hair, elaborate and colorful earrings, white skin, cinematic light, many people passing by a city street, street light, (hottiest actress:1.4), full body image, (hand bag:1), ulzzang-6500-v1.1:0.2, nice hip, Rabbit-ear hairband

<lora:koreanDollLikeness_v15:0.4>, ultra detailed, highres, (realistic, photo-realistic:1.4), 8k, raw photo, (masterpiece), (best quality), physically-based rendering, 1girl, breasts, solo, background, sitting, outdoors, blonde hair, looking at viewer, blurry, running shoes, leaning back, day, big breasts, ((skyblue leggings)), mole, motor vehicle, boots, knees up, mole on thigh, underwear, arm support, ((sports bra)), nail polish, bare shoulders, shorts, ((choker)), parted bangs, panties, cleavage, building,thighs, brown eyes, bra, black eyes, collarbone, distinct, shining materials,(At gym)

<lora:koreanDollLikeness_v15:0.6>, ultra detailed, highres, (realistic, photo-realistic:1.4), 8k, raw photo, (masterpiece), (best quality), physically-based rendering ulzzang-6500-v1.1,(original photo:1.2), (realistic : 1.4) beautiful detail girl, extremely detailed eyes and face, eyes in beautiful detail, absurd, incredibly absurd, huge file size, ultra detail, high resolution, extremely detail, best quality, masterpiece, illustration, extreme as detailed and beautiful, extremely detailed,unity, light on the face, cinematic lighting, (huge breasts: 1.4 ), wide hips, thick thighs, slim, Wavy Long White Hair, Detailed Blue Eyes, Off-Shoulder White Sweater, White Skirt With Lace, White Knee-High Socks, Artstyle used by Professionals, Soft Lines, HD quality, Hands Down, Wintertime, Soft Light

Negative Prompt는 공통​
ng_deepnegative_v1_75t, paintings, sketches, (low quality:2), (normal quality:2), (worst quality:2), lowres, ((monochrome)), ((grayscale)), acnes, skin spots, age spot, skin blemishes, bad feet, ((wrong feet)),(wrong shoes), bad hands, distorted, blurry, missing fingers, multiple feet, bad knees, extra fingers

결과물

 

좋은 프롬프트 생성을 위한 chatGPT 사용을 권장합니다.

Generative AI > Stable Diffusion 
Stable diffusion prompt base of you idea

'AI > StableDiffusionWebUI' 카테고리의 다른 글

매력적인 실사 2  (0) 2023.04.18
실사, 한국적인, 매력적인 모델 만들기  (2) 2023.04.09
Auto-Photoshop-StableDiffusion-Plugin  (0) 2023.04.04
레오나르도 AI.  (0) 2023.03.21
DreamBooth  (4) 2023.03.11

댓글