기타/AI 활용하기 기타

스테이블 디퓨젼 사용기 3 (프롬프트 세팅)

codehunter 2024. 3. 9. 11:38

모델은 2가지 realisticVision V20, Sci-fi_Diffusion 모델을 받아서 적당한 폴더에 넣는다.

 

이미지의 성격에 따라서 적합한 모델을 사용하는것이 매우 중요하다. 여기선 Sci-Fi_Diffusion 모델을 사용하자.

 

프롬프트는 아래와 같다.

 

[긍정 프롬프트]
(A scene from a Hollywood horror movie:1.5), The city is overrun by (massive crumbling amoebas:1.4) that have destroyed buildings and contaminated the streets, leaving the entire metropolis shrouded in a palpable sense of dread and despair, (The buildings are in ruin:1.2). their facades smashed open by the relentless onslaught of the (monstrous organisms:1.2), The streets are clogged with debris and the air is thick with the stench of decay, Panic and chaos reign as the few remaining survivors desperately struggle to evade the relentless grasp of the amoebas, which seem to be everywhere at once. The once-thriving metropolis is now a ghost town. consumed by the all-consuming. insatiable hunger of the amoebas, (Bloody vines:1.1), blood puddles, collapsed buildings, puddles of red blood on the floor, puddles of red blood on the floor, (a bloody tentacle:1.3),( red fog:1.1), a half-broken skyscraper, (Countless half-rotten bodies:1.1), by (Zdzisław Beksiński:1.4), by (H.R. giger:1.1), (ultra high detail:1.3), high resolution, (cinematic lighting:1.3), Volume Light, Air perspective, Rule of thirds, epic angle, unreal engine 5, octane render, Hasselblad 58mm, sharp focus, shallow depth of field, (((very nice movie Color Grading)))

 

[부정 프롬프트]
(cartoon:1.3), (low quality:1.5), (normal quality:1.4), character, a poor description, (wrong perspective:1.3), Film Grain, a blurred image, noise, a fairy tale silhouette, a dull silhouette, water mark, text, close up people, Screen segmentation, interior, text

 

세팅값은 기본으로 하고 바로 생성을 눌렀더니 10초도 안되서 아래와 같은 이미지들을 얻을수 있었다.

 

이제 프롬프트 세팅을 살펴보자.

긍정프롬프트의 (A scene from a Hollywood horror movie:1.5) 구문에 헐리우드의 한 장면으로 정의했고 문장에 괄호가 있고 콜론에 1.5가 적혀있는데 특정 단어나 문장에 가중치를 주기 위해서이다. 나머지 장면 묘사 구문은 영어가 익숙하지 않으면 챗GPT등의 도움을 받아 장면 묘사를 그대로 입력한것이다.

 

질문:

안녕 stable diffusion에 넣어서 이미지 생성을 할 prompt를 작성하려고 해. 다음과 같은 장면을 묘사하고 싶은데, 네가 좀 살을 붙여서 최대한 상세하고 디테일하게 영어로 작성 해줬으면 해.

 

도시는 거대한 무너지는 아메바들에게 파괴되었고 건물들이 폐허 속에 무너져들었다. 아메바들의 무모한 침공으로 건물의 정면은 깨져버렸고 길은 잔해로 막혔으며 공기는 부패의 악취로 가득차 있다. 소멸한 몇 안 되는 생존자들은 아메바의 끊임없는 손길을 피하기 위해 필사적으로 노력하며 공포와 혼돈이 도시를 지배한다. 한때 번영했던 대도시는 이제 유령 도시가 되었고, 아메바들의 만능하고 만족할 줄 모르는 굶주림에 삼켜졌다.붉은 혈관, 피 웅덩이, 무너진 건물, 바닥에 빨간 피 웅덩이, 빨간 피 웅덩이, 핏대, 붉은 안개, 반쯤 부서진 초고층 빌딩, 무수히 많은 반쯤 썩은 시체들.

 

답변:

The city is overrun by (massive crumbling amoebas:1.4) that have destroyed buildings and contaminated the streets, leaving the entire metropolis shrouded in a palpable sense of dread and despair, (The buildings are in ruin:1.2). their facades smashed open by the relentless onslaught of the (monstrous organisms:1.2), The streets are clogged with debris and the air is thick with the stench of decay, Panic and chaos reign as the few remaining survivors desperately struggle to evade the relentless grasp of the amoebas, which seem to be everywhere at once. The once-thriving metropolis is now a ghost town. consumed by the all-consuming. insatiable hunger of the amoebas, (Bloody vines:1.1), blood puddles, collapsed buildings, puddles of red blood on the floor, puddles of red blood on the floor, (a bloody tentacle:1.3),( red fog:1.1), a half-broken skyscraper, (Countless half-rotten bodies:1.1),

 

이런식으로 영어문장을 얻어서 묘사부분에 넣은거고 마지막의 파란색 부분은 이미지의 퀄리티를 높이기 위해 영향을 받았으면 하는 작가들, 디테일 정도, 라이팅의 느낌, 구도와 카메라 앵글등을 적은것이다.

 

위 이미지도 훌륭하긴 하지만 원하는 구도에 맞춘 이미지를 만들수 있어야 실무에 활용이 가능할수 있을 것이다.

그걸 조절하는게 ControlNet이다.

 

이제부터 세팅을 맞춰보자.

 

가이드가 되는 이미지가 있으면 거기에 맞춰서 구도를 활용할수 있다.

책대로 콘트롤넷 세팅에 제공된 이미지를 넣고 세팅값을 맞췄더니 원하는 구도에 맞춘 이미지를 얻을수 있었다.

 

원하는 이미지를 얻었다면 업스케일링을 해서 좀 더 좋은 해상도의 이미지를 얻을수 있다.

 

이렇게 프롬프트와 콘트롤넷 만으로 대략 비슷한 구도의 이미지 초안을 얻는 작업을 진행할 수 있다.