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 - 동화, 토끼

[Carne Griffiths] - 그레피티
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 - GTA 일러스트
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

 

//-----------------------------------------------------------------------------
< Extensions >

 

adetailer https://github.com/Bing-su/adetailer
    얼굴 개선

 

sd-dynamic-prompts https://github.com/adieyal/sd-dynamic-prompts
    프롬프트에 와일드카드와 비트연산 사용가능

 

sd-webui-controlnet https://github.com/Mikubill/sd-webui-controlnet
    - controlnet

 

a1111-sd-webui-tome https://github.com/SLAPaper/a1111-sd-webui-tome
    ToMe(Token Merging https://github.com/dbolya/tomesd) 사용으로 속도 향상

 

stable-diffusion-webui-daam https://github.com/toriato/stable-diffusion-webui-daam.git
    - 프롬프트가 사용된 곳 표시, Attention Heatmap

 

a1111-sd-webui-lycoris https://github.com/KohakuBlueleaf/a1111-sd-webui-lycoris
    파인튜닝 lyco 사용

 

sd-dynamic-thresholding https://github.com/mcmonkeyprojects/sd-dynamic-thresholding
    - CFG Scale 관련 개선

 

sd-extension-system-info https://github.com/vladmandic/sd-extension-system-info
    - 시스템 정보와 성능 측정

 

//-------------------------------------
stable-diffusion-webui-tokenizer https://github.com/AUTOMATIC1111/stable-diffusion-webui-tokenizer.git
    CLIP 이 프롬프트를 처리한 결과를 보여줌

ultimate-upscale-for-automatic1111 https://github.com/Coyote-A/ultimate-upscale-for-automatic1111
    - Hires.fix (Upscaler) Denoising strength 를 높여도(0.3~0.5) 이미지 손상 적음

sd-webui-model-converter https://github.com/Akegarasu/sd-webui-model-converter.git
    - 모델 변환기

sd_dreambooth_extension https://github.com/d8ahazard/sd_dreambooth_extension
    - 파인튜닝 dreambooth 사용

sd_search_model https://github.com/AlUlkesh/sd_search_model
    - 모델 검색(Hash등), 주의! 시작 오래 걸림

 

 

//-----------------------------------------------------------------------------
//-------------------------------------
참고
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 - 단순

반응형
Posted by codens