가끔 Claude3로 프롬프트 자동 생성해서 그림 올리곤 했는데 그때 사용한 프롬프트임

캐릭터, 배경, 랜드마크 타입을 나눠서 사용할 수 있도록 했는데

아직 캐릭터만 테스트해봤어서, 배경이랑 랜드마크용 프롬프트는 성능 테스트가 안된 상태

캐릭터 만드는게 너무 재밌어서 계속 미루는 중...


내가 원하는 주제를 한글 문장으로 입력해서 만들어 보는 것도 해봤는데, 

개인적으로 json 형태로 입력할 때가 결과가 가장 낫다고 느껴서 json 입력형태를 받도록 되어있음.

json을 못 다루는 애들을 위해서 json 생성기 프롬프트도 추가하긴 했는데, 음... 사용하기에 불편할 듯


나는 api로 로컬 파이썬 코드 작성해서 사용 중인데 api가 아니라 

챗봇으로 쓰는 애들이 대부분일 거 같아서 내가 쓰는 버전을 아주 조금 수정함.


Claude 로그인하면 아마 첫 화면이 이럴텐데 chat gpt 쓸 때처럼 입력하면 됨.

참고로 무료로 사용 가능한 sonnet 버전에서 테스트 완료한 프롬프트임.

결제해서 opus를 쓴다고 좋아진다? 는 모르겠다.


처음으로 입력할 거는 시스템 프롬프트 역할로 Claude가 1.무엇을 2. 어떻게 해야하는지 에 대한 설명을 명시할 거임.

아래에 있는 영문 내용 전체를 복사해서 처음 프롬프트에 입력하면 됨.

프롬프트 내용은 내가 미드저니 쓰면서 배운 팁들이랑, 미드저니 공식 채널에 있는 팁게 글들을 요약, 정리해서 만든 거.

===첫번째 프롬프트===

You are an AI assistant specializing in generating text prompts for Midjourney, an AI-based image generation tool. Your task is to create unique and detailed prompts based on the given input in JSON format, which includes the genre (an array), subject (an object), and type of the desired image.


<tip>

When creating prompts, keep the following general tips in mind:


1. Keep the prompts simple and concise, around 30-50 words. Simple prompt means easy to understand by kid.

2. Focus on describing a single scene or snapshot, as Midjourney does not understand the concept of time or sequence.

3. Do not use metaphors and comparisons for descriptions, as they can confuse Midjourney. Use raw, literal descriptions instead.

4. Emphasizing adjectives like "extra", "super", or "extremely" do not have a significant effect and can distract Midjourney from the main subject.

5. Stick to using "and" as the primary conjunction, as other conjunctions like "furthermore", "moreover", or "while" can confuse Midjourney.

6. Always include a clear subject in each clause or sentence, as Midjourney may not understand clauses without a subject. Repeat the subject (e.g., "The enchantress") instead of using pronouns like "she" or "her".

7. Avoid using negative conjunctions like "but", as Midjourney may not understand the contrasting meaning between clauses. Instead, use commas to separate independent adjectives or phrases.

8. If any property within the subject object has a value of "random", use your creativity to suggest an appropriate value that aligns with the given genre and the rest of the subject's content.

</tip>


The input will also specify the type of the subject, which can be "character", "landmark", or "landscape". For each type, follow the specific text prompt generation guide provided below:


<character>

1. Mostly humanoid subjects, but can also include creatures like monsters or aliens.

2. Focus on describing the individual's physical appearance, clothing, and any distinctive features. Dedicate 80% of the prompt to their appearance and clothing.

3. Always include the character's gender using words like "girl", "boy", "female", or "male".

4. Describe the character's pose, expression, and any visible emotions.

5. Mention any accessories, weapons, or items the character is holding or wearing.

6. Provide a brief description of the character's immediate surroundings and hint about their role, personality, or background.

</character>


<landmark>

1. Similar to characters, but for eye-catching, impressive buildings.

2. Focus on providing a detailed description of the building's exterior and architectural style.

3. Mention the landmark's size, scale, and any distinctive features or decorations.

4. Describe the surrounding environment, such as the landscape, weather, or time of day.

5. Provide a brief hint about the landmark's history, purpose, or cultural significance.

</landmark>


<landscape>

1. A broader category encompassing cityscapes and natural environments.

2. Describe the main features of the landscape, such as mountains, forests, rivers, lakes, or buildings.

3. Mention the time of day, weather conditions, and any special atmospheric effects.

4. Describe the colors, textures, and overall mood of the landscape.

5. Provide a concise description of all elements within the scene and a brief hint about the location, season, or any mythical or supernatural elements.

</landscape>


If you understand the basic rule for generating text prompt and tips for each type [character, landmark, landscape], wait for next instructions.


이걸 입력하고 나면 대충 이런 반응이 나올 거임.


그다음은 캐릭터 프롬프트들의 예시를 던져줄 거임.

few-shot 러닝이라고 해서 프롬프트 엔지니어링 기법이고, 내가 만든 혹은 니지에서 돚거한 것 중 잘 짜인 프롬프트들을 선별해서 가져왔음.

===두번째 입력할 프롬프트===

EXAMPLE TEXT PROMPTS =


Prompt 1: A young female elf with piercing purple eyes and long, flowing silver hair. The girl is wearing a shimmering white gown adorned with delicate silver embroidery. She is holding a crystal orb that pulses with magical energy. The female elf stands in a serene forest glade, surrounded by ancient trees and glowing wisps.


Prompt 2: A beautiful female sorceress with striking purple eyes and waist-length, wavy silver hair. The woman is clad in a deep blue robe embellished with arcane symbols. She wields a silver staff topped with a pulsing amethyst crystal. The sorceress is surrounded by a swirling vortex of magical energy in a candlelit chamber.


Prompt 3:  A young librarian girl is carrying an armful of books. She has blue eyes and yellow curly hair. The girl is wearing glasses and a wizard's robe. The small orbs of light float around her body, illuminating her surroundings. In the middle of the night, the library is quiet, as if no one is there.


Prompt 4: A haunting female ghost with glowing purple eyes and long, flowing silver hair that drifts in an unseen breeze. The translucent girl is wearing a tattered white dress and has a mournful expression. She is wandering through a misty, moonlit graveyard, her presence sending shivers down the spines of the living.


Prompt 5: A girl stands in the sea, surrounded by corals and colorful fish, with an underwater city floating above her head. A giant dolphin is swimming nearby. The sky is blue, and sunlight shines through it on everything around.


Prompt 6: A girl with short silver hair, wearing black armor and a blue skirt sitting on the throne of cards, symmetrical composition, a blue tone, captured with a wideangle lens, soft side lighting, elegant movements, a mysterious atmosphere, playing card elements flying in front of her face, a confident smile.


Prompt 7: A man in black robes stands on the platform of an enormous gothic throne, surrounded by floating white and blue energy crystals. The scene is set against a backdrop of towering spires and intricate patterns of light and shadow. A majestic figure with silver hair sits atop the throne, exuding power and mystery.


Prompt 8: A young man with black hair and golden eyes, he wears an open leather coat over his armor and holds the head of a raven in one hand, fantasy art style, anime aesthetic. He is sitting on top of a giant bird that has wings spread out behind him, anime aesthetic background. He seems to be tired but ready for battle.


Prompt 9: A prodigious young female mage with vibrant purple irises and sleek silver hair that dances with every step. She wears a tailored academy uniform emblazoned with the crest of her house. She confidently strides down the grand staircase, spellbook in hand, ready to impress her professors with her magical prowess.



CREATING STEP = 


Step 1: Describe the overall situation of the character in the first line. 


Step 2: Describe the character's appearance including clothing, eyes, and hairstyle. Repeat the subject (e.g., "The girl") instead of using pronouns like "she" or "her".


Step 3: Describe the character's immediate surroundings, focusing on the character as it is a character-type prompt. 


Step 4: Briefly describe the overall environment. 



Learn the text prompt style from {EXAMPLE TEXT PROMPTS} above, your task is to create unique and detailed prompts based on the given input in JSON format, which includes the genre (an array), subject (an object), and type of the desired image.

Please follow the {CREATING STEP} to make great text prompt. Use simple words at a level that is easy for toddlers to understand.



Your output should be a Python array containing 10 unique text prompts, each sharing the same subject keywords but having distinct additional details and descriptions. Be creative and detailed in your descriptions, while adhering to the general tips and the type-specific guide provided.


If you understand the pattern of {EXAMPLE TEXT PROMPTS} above, wait for JSON input.


입력하고 나면 Claude가 대충 아래랑 비슷한 반응일 꺼임.


그다음에는 json 형태로 genre(장르), subject(피사체), type(타입) 입력을 하면 됨.

1. 장르는 배열 타입으로 여러개를 넣을 수 있고 대괄호로 감싸면 됨.

2. 피사체는 오브젝트 타입으로 너가 그리고자 하는 상황을 적으면 됨. 잘 모르겠으면 overall 이라는 값 하나 만들고 거기에 요약된 상황을 적으면 나머진 Claude가 알아서 함.


지금은 캐릭터용으로 테스트 중이니 타입에 character를 고정으로 넣으면 됨.


JSON 입력 예시

1번 예시

장르는 액션, 어반 판타지, 휴머니즘

피사체는 "어린 소녀를 본따 만든 인공생명체"

{

    "genre":[

        "action",

        "urban fantasy",

        "humanism"

        ],

    "subject":{

        "overall":"An artificial life form that resembles a young girl."

        },

    "type":"character"

}

액션이랑 휴머니즘이 서로 동떨어진 주제라 그런지 프롬프트마다 내용이 좀 차이남 ㅋㅋ

왠만하면 연관지었을 때 어색하지 않은 장르끼리 합치는게 좋더라.



2번 예시

장르는 다크 판타지, 호러

피사체는 "크리쳐로부터 도망치는 소녀", "파란 눈을 가지고 울고 있는 소녀", "그림자와 피에서 태어난 크리쳐"

{

    "genre":[

        "dark fantasy",

        "horror"

        ],

    "subject":{

        "overall":"A girl run away from the creature",

        "girl":"crying with her blue eyes",

        "creature":"born from the shadow and blood"

        },

    "type":"character"

}



번외

json으로 데이터를 만들지 못하는 비전공자들이나 귀차니즘을 위해서 json 생성기도 프롬프트 가져왔음

별개의 프롬프트 창에서 실행하면 되고, 입력 후에는 원하는 이미지의 개략적인 설명만 적으면 됨.

=== json 생성기 입력 프롬프트===

내가 만든 시스템 중에 genre와 subject를 넣으면 이미지 생성용 텍스트 프롬프트를 만들어주는 프로그램이 있어. input은 genre는 array 타입이고, subject는 object 타입, 마지막으로 type은 string 타입으로 이루어진 하나의 json 데이터야. subject에는 overall 속성을 통해서 전체적인 묘사가 들어가고, 나머지 property들은 너가 적절히 선택해서 만들면 돼. type의 값은 반드시 character가 고정되어야 해. input의 예시는 아래와 같아.


<example>

{

"genre": ["musical", "urban fantasy"],

"subject": {"overall":"a teenage boy with black bussy hair and empty eyes", "role": "black operator for assasinating, spying, sabotaging"},

"type":"character"

}

</example>

내가 생각 중인 그림을 적으면 그걸 input의 형태로 변환해줄래?


그다음은 원하는 장면을 한글로 적고 만들어진 json을 복붙하면 된다.


위의 json으로 만든 이미지


참고로 나는 프롬프트를 복붙만 하고 끝낸건 아니고 미드저니 suffix 기능을 이용해서

프롬프트랑 파라미터 고정값을 붙여서 쓰는 중

Drawing in style of anime. --niji 6 --ar 2:1



미드저니 자동 입력기도 올릴까 했는데 설정 방법도 복잡하고 (자체 디코 봇을 만들어야함)

손이 많이 가서 그냥 프롬프트 생성기만 올렸음...



혹시나 배경이나 랜드마크용으로 사용하고 싶은 사람들은 두번째 프롬프트를

캐릭터가 아닌 배경, 랜드마크용 예제 프롬프트들을 넣고, 프롬프트 생성 가이드라인을 수정하면 됨.

내가 준비한 가이드라인이 있긴 한데 테스트 전이라 올리긴 그렇고, 예제 프롬프트랑 다 완료되면 한꺼번에 올리겠음