
stable diffusion을 활용하여 실사 여성 이미지 그리는 방법 (MacOS)
지식 공유2023. 3. 8. 23:57사전 설치
Stable Diffusion 설치
본 글은 macOS 환경을 기준으로 설명합니다.
아래 git 프로젝트를 clone 합니다.
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
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
Chilloutmix 모델 설치
위에서 설치한 프로젝트는 Stable Diffusion 을 사용하기 위한 웹 대시보드를 설치한 것이고, 실제로 이미지를 만드려면 "모델"이라는 파일이 필요하다.
본 글에서는 chilloutmix 모델을 사용한다.
https://civitai.com/models/6424/chilloutmix
ChilloutMix | Stable Diffusion Checkpoint | Civitai
This model has been republished and its ownership transferred to Civitai with the full permissions of the model creator. They have asked that all i...
civitai.com
Download Latest 버튼을 눌러서 모델을 설치합니다. 인터넷 환경에 따라 다르겠지만 설치하는데 3~4분 정도 걸린거 같네요
설치받은 모델을 아래 디렉토리 경로에 옮겨둡니다.
stable-diffusion-webui\models\Stable-diffusion
koreanDollLikeness 설치
얼굴을 만드는데 사용하기 위한 Lora를 다운로드 받는다.
https://huggingface.co/datasets/KrakExilios/koreandoll/tree/main
KrakExilios/koreandoll at main
huggingface.co
다운로드 받은 파일을 아래 디렉토리 경로에 옮겨둡니다.
stable-diffusion-webui\models\Lora
VAE 설치
이미지 보정처리를 위해, 아래 사이트에서 vae-ft-mse-840000-ema-pruned.ckpt 를 설치합니다.
https://huggingface.co/stabilityai/sd-vae-ft-mse-original/tree/main
stabilityai/sd-vae-ft-mse-original at main
Detected Pickle imports (4) "torch._utils._rebuild_tensor_v2", "torch.IntStorage", "torch.FloatStorage", "collections.OrderedDict" What is a pickle import?
huggingface.co
동일하게 다운로드 받은 파일을 아래 디렉토리 경로에 옮겨둡니다.
stable-diffusion-webui\models\VAE
Deep Negative V1.x 설치
불필요한 팔, 다리, 손가락 생기는 것을 막기 위해, 아래 Deep Negative를 설치한다.
https://civitai.com/models/4629/deep-negative-v1x
Deep Negative V1.x | Stable Diffusion TextualInversion | Civitai
This embedding will tell you what is REALLY DISGUSTING 🤢🤮 So please put it in negative prompt 😜 [Update:230120] What does it do? These embedding le...
civitai.com
다운로드 받은 파일을 아래 경로에 옮겨둔다.
stable-diffusion-webui\embeddings
Stable Diffusion Web UI 실행
필요한 파일을 모두 다운로드 받았기 때문에 이제 이미지를 생성해보자
webui.sh 쉘 스크립트를 실행하면 된다. (매우 간단)
cd stable-diffusion-webui
./webui.sh
실행을 하면, 실행에 필요한 라이브러리를 설치하기 때문에 시간이 조금 걸릴 수 도있다.
실행이 되면, 브라우저에 http://127.0.0.1:7860 을 입력하여 접속한다.
그리고, 제일 좌측 상단에 다운로드 받은 모델 "Chilloutmix"를 선택해준다.
Settings 탭 > Stable Diffusion에서 SD VAE를 "vae-ft-mse-840000-ema-pruned.ckpt"를 선택한 뒤에 Apply settings 버튼을 눌러서 설정값을 저장한다.
prompt를 입력하고 이미지를 생성하면 아래와같이 이미지가 생성된다.
positive prompt
<lora:koreanDollLikeness_v15:0.4>, raw photo, (masterpiece), (best quality), sharp focus, perspective, foreshortening, best quality, ultra res,highres, (realistic, photo-realistic:1.4),ultra detailed, cute, (20 years old beautiful sexy korean woman:1.3), (kpop idol, korean beauty, korean mixed), (colorful hair:1), (make up:0.5), ((puffy eyes)), light smile, (huge breasts:0.7),(long_wave_hair:1.3), (short dress:1.3),(outside), ultracolor, looking away,lens flare,1woman,
negative prompt
ng_deepnegative_v1_75t, paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, ((wrong feet)),(wrong shoes), bad feet, distorted, blurry, bad hands, missing fingers, multiple feet, bad knees, extra fingers, muscular,watermark, signature, text, close-up,(tennis),(tennis_racket:1.4),
참고
https://flatsun.tistory.com/3542
WebUI 반 실사 스타일 그림 고퀄리티로 뽑는 방법
WebUI 반 실사 스타일로 그림 그리는 방법 WebUI를 사용해서 실제같은 그림을 생성해 보려고 하는데 아무것도 없는 상태에서 돌리면 맨 위의 이미지처럼 그림도 영 그런데다 사람들이 원하는 AI 그
flatsun.tistory.com
'지식 공유' 카테고리의 다른 글
무료로 이미지 편집 및 사이즈 조절하기 좋은 사이트 추천 (0) | 2022.12.23 |
---|---|
MacOS에서 파일 잘라내기 (윈도우의 Ctrl + x 기능) (0) | 2022.02.15 |
윈도우 시간 설정 (ntp로 시간 동기화) (0) | 2021.08.10 |
다양한 이모지 사용을 위한 유용한 사이트 추천 (이모지 모음) (0) | 2021.07.30 |
크롬(chrome) 확장 앱 5가지 추천 (광고제거, 생산성) (0) | 2021.07.29 |
모든것을 기록하는 노트장 블로그
포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!