Stable Diffusion web UI
https://github.com/AUTOMATIC1111/stable-diffusion-webui - 20.2k
- 설치(다운로드)
> git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
- 이미 설치되었던 경우 새로운 업데이트 적용
> git fetch --all
> git reset --hard origin/master
//-------------------------------------
- Stable Diffusion 모델 다운로드
https://huggingface.co/models?other=stable-diffusion
https://civitai.com/
https://rentry.org/sdmodels
- 다운로드 받은 모델 파일 복사 폴더 경로
stable-diffusion-webui/models/Stable-diffusion
//-------------------------------------
* 시작 옵션 변경 (startup arguments setting)
webui-user.bat 파일 수정
set COMMANDLINE_ARGS= 라인 뒤에 필요한 옵션 추가
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings
- 예) 모델 설정
set COMMANDLINE_ARGS=--ckpt a.ckpt
- 검은 이미지가 생성되는 문제 해결
--no-half 나 --xformers 옵션을 시작 옵션에 추가한다
set COMMANDLINE_ARGS=--no-half
- 속도 향상 : --xformers
//-------------------------------------
- 실행
webui-user.bat
python 가상환경의 python 버전을 올리거나 모듈을 재설치 하고 싶을때는 venv 폴더를 삭제하고 webui-user.bat를 실행
//-----------------------------------------------------------------------------
- WSL 에서 실행해도 GPU 사용가능하고 생성 성능이 떨어지지 않는다.
- WSL 에서 실행시 에러 메시지
Cannot activate python venv, aborting
- 해결 방법
https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/1120
python3 -c 'import venv'
python3 -m venv venv/
//-------------------------------------
http://127.0.0.1:7860 주소로 접속
모델 선택 -> Prompt 입력 -> Generate
//-------------------------------------
- 에러
stable-diffusion-webui
s = self._ext_to_normal(_getfinalpathname(s))
OSError: [WinError 1] 잘못된 기능입니다: TEMP\\tmpiqgvmul0\\tmpr9at5rqd.png
- 해결방법
launch.py 파일 수정
def prepare_environment(): # 다음을 추가
os.environ["TEMP"] = os.environ["TMP"] = os.path.abspath(os.path.join("outputs", "temp"))
os.makedirs(os.environ["TEMP"], exist_ok=True)
//-----------------------------------------------------------------------------
//-------------------------------------
Prompt 참고
작가
Gerhartz
adam hughes
adolph menzel
alberto mielgo - 스파이더맨
alphonse mucha
artemisia gentileschi
artgerm - stanley lau
beatrix potter
charlie bowater
eddie mendoza
ferdinand knab
frank miller
gil elvgren
greg manchess
greg rutkowski
gustav klimt
hr giger
huang guangjian
ilya kuvshinov
john currin
jonathan bruns
katsushika hokusai
katsuya terada
kristen liu-wong
leonardo da vinci
lois van baarle
luis royo
michelangelo
mickalene thomas
rembrandt
richard corben
rossdraws
roy lichtenstein
sachin teng
sandro botticelli
stanley lau
stephen bliss
tom bagshaw
wlop
zdzislaw beksinski
yoji shinkawa
//-------------------------------------
실행 결과
model : sd v1.4
Prompt:
girl, cyberpunk, elegant, mystical, detailed face, colorful, intricate, ambient light, radiant light, detailed and intricate background, Valhalla, flower garden, highly detailed, best quality, concept art, masterpiece, photorealistic, cinematic, ultra detailed, illustration artstation, by wlop, tom bagshaw, rossdraws, lois van baarle, huang guangjian, greg rutkowski, charlie bowater, artgerm, luis royo, katsuya terada, ilya kuvshinov, eddie mendoza
Negative prompt : red eye, monochrome, black and white
Sampling Steps : 50
Sampling method : Euler
Width : 448
Height : 704
CFG Scale : 25
Seed : 2389157572
//-------------------------------------
model : sd v1.5-inpaint
Prompt:
Zooey Deschanel, cyberpunk, fantasy, elegant, mystical, detailed face, intricate, ambient light, radiant light, detailed and intricate background, Valhalla, flower garden, highly detailed, best quality, concept art, masterpiece, photorealistic, cinematic, art by ilya kuvshinov, charlie bowater, greg rutkowski, rossdraw, tom bagshaw, wlop
Sampling Steps : 51
Sampling method : DPM++ 2S a Karras
Width : 448
Height : 704
CFG Scale : 21
Seed : 277055365
//-------------------------------------
MidJourney VS Stable Diffusion: Same Prompt, Different Results
https://medium.com/codex/midjourney-vs-stable-diffusion-same-prompt-different-result-dd29ca482235
1. Living Room
Inside a living room with flowers, thin contur lines, unreal engine, fantasy art by greg, loish, rhads, ferdinand knab, tom bagshaw, makoto shinkai and lois van baarle, rossdraws, ilya kuvshinov, night lighting, trending on studio ghibli, highly detailed, 8 k, octane render
2. Warrior Robot Astronaut
a warrior robot astronaut, floral, posing for a fight intricate, elegant, highly detailed, digital painting, artstation, concept art, smooth, sharp focus, illustration, art by artgerm and greg rutkowski and alphonse mucha, 8K
3. Last Summer’s Day
A place in wales, tucked out of view magic happens, only seen by a few. for just one day, for only just one hour. The last summer’s day break at Gelli aur. there you must follow a winding trout stream. search all the oaks with a tiny light beam, inspired by ( greg rutkowski ) and charlie bowater
* Ice Goddess
Ice goddess with beautiful face with a glowing blue crystal on her forehead, frosty white eyes, winter mist around her, white plated armor, pale skin, white smoke:: photorealism, octane render, frostbite, 8k, cinematic, 35mm
* Interdimensional Galaxy Portal
Interdimensional galaxy portal covered in frost, ice gate, volumetric light, volumetric fog, unreal engine, photorealistic, 8k
* Magician Girl
beautiful dark magician girl, full body, mystical, ultra detailed, photorealistic
//-----------------------------------------------------------------------------
//-------------------------------------
참고
https://rentry.org/voldy
//-----------------------------------------------------------------------------
프롬프트 작성 방법
https://www.howtogeek.com/833169/how-to-write-an-awesome-stable-diffusion-prompt/
//-------------------------------------
모델 리스트(다운로드)
https://rentry.org/sdmodels
//-------------------------------------
Sampling method 속도 비교
DDIM - 4.72 it/s <=========
DPM adaptive - 1.38 it/s - error
DPM fast - 4.04 it/s - error
DPM++ 2M - 4.10 it/s
DPM++ 2M Karras - 4.07 it/s <=========
DPM++ 2S a - 2.02 it/s <=========
DPM++ 2S a Karras - 2.06 it/s <========= (개성)
DPM2 - 2.02 it/s
DPM2 Karras - 2.09 it/s
DPM2 a - 3.93 it/s <=========
DPM2 a Karras - 2.05 it/s <========= (여러명)
Euler - 4.08 it/s <=========
Euler a - 4.07 it/s
Heun - 2.04 it/s <=========
LMS - 3.95 it/s - error
LMS Karras - 4.12 it/s - 회화
PLMS - 4.70 it/s - 단순
'AI' 카테고리의 다른 글
OpenAI Whisper 음성 인식 사용법 (0) | 2023.02.24 |
---|---|
Nvidia GPU 코어 클럭이 일정 이상 올라가지 않는 문제 해결 방법 (0) | 2023.02.03 |
자연어 처리(NLP ) 역사 (0) | 2022.07.24 |
[NLP] GPT-2 사용법 (windows) (0) | 2022.07.23 |
[음성인식] DeepSpeech 사용법 (0) | 2021.01.18 |
댓글을 달아 주세요