Techniques for Fixing Characters in AI Image Generation | How to Unify Faces with Gemini x JSON Prompts
"I instructed it to have blue clothes and red hair, but the clothes turned reddish too..." "I want to create the same character in a different pose, but the art style changes..."
This is the "consistency wall" that everyone who has dabbled in AI image generation eventually hits. In fact, the cause might be that we are asking the AI using "plain text."
In this article, I will explain the latest approach that is becoming a hot topic among overseas creators:
giving instructions to AI using structure (JSON) instead of words. We will be using Google Gemini's advanced model, "Nano Banana Pro." (Access methods are also described below!)
In the latter half of the article, I have provided an "Anime Character Fixing JSON Template" that you can copy and paste, so please try it out in your own environment.
Are you hitting the "consistency wall" in AI image generation, such as "I instructed it to have blue clothes and red hair, but the clothes turned reddish too..."?
In this article, I will explain the latest approach to solving this problem: "giving instructions to AI using JSON (structured data)."
More detailed know-how on fixing characters is available in the paid article "[Complete Edition] Master AI Image Generation 'Character Fixing' with JSON!"
1. Why does the face change with "plain text"?
Have you ever written a prompt for an AI like this?
"A girl with red hair, a blue dress, and a gentle expression"
At first glance, it looks simple and clear, but from the AI's perspective, it is processed as a "lump of ambiguous information." When attributes like "red," "blue," and "gentle" are listed in the same flow of text, the AI may misinterpret which attribute corresponds to which element.
"Red" -> should be hair -> affects the clothes too
"Blue" -> should be the dress -> affects the eye color too
This is a phenomenon known as "color bleeding (confusion of attributes)."
So, how can we prevent it? The answer is to "put them in separate boxes."
Even for humans, cargo that is properly sorted is delivered without mistakes compared to cargo piled up randomly. The same applies to AI. If you organize and provide information using a format called JSON (structured data), the AI will be able to understand without confusion that "this attribute belongs to this element."
To prevent "color bleeding" where the AI confuses attributes, it is important to "put information into separate boxes."
This structuring using JSON is also extremely effective in suppressing AI hallucinations (lies) and controlling the thought process. For more details, please see "Completely Suppress AI's 'Casual Lies'! The Ultimate Prompt Technique to Bind Thought Processes with 'JSON'."
2. How to access Gemini's advanced model, "Nano Banana Pro"
Nano Banana Pro is an advanced image generation model integrated into Gemini. Compared to standard image generation models, it is characterized by its exceptionally high ability to deeply understand the intent of structured prompts like JSON.
Accessing it is surprisingly simple.
[Specific Steps]
First, generate an image normally in Gemini (the standard model will run).
Click the "three-dot leader (menu)" in the top right of the generated image.
Select "Redo with Pro".
With just this, you can access an advanced model with significantly higher expressive power.
⚠️ Use requires a paid plan such as Gemini Advanced. Free users may be provided with limited free credits.
3. [Copy-Paste OK] JSON Template for Fixing Anime Characters
Now for the main topic. Below is a JSON template for "maintaining character consistency." Feel free to copy and paste it as is, and rewrite each value to match your own character settings.
JSON
{
"meta": {
"aspect_ratio": "16:9",
"quality_preset": "stylized"
},
"subject": {
"identity": "Character A",
"appearance_lock": {
"strict_match": [
"face_structure",
"hair_color",
"eye_color"
],
"features": {
"hair": "dark navy, long hair",
"eyes": "blue, gentle expression",
"outfit": "floral kimono, pink ribbon"
}
}
},
"style": {
"art_style": "Modern Anime, Shinkai-inspired",
"technical_specs": [
"clean line art",
"soft cel shading"
]
},
"negative_prompt": [
"inconsistent character design",
"extra limbs",
"blurry"
]
}
The most important part of this template is the strict_match section. By specifying "face_structure," "hair_color," and "eye_color," you can explicitly tell the AI, "These are the three elements I absolutely do not want you to change."
In overseas AI communities, many reports have been shared stating that by utilizing this strict_match,
"it has become easier to maintain character consistency compared to normal text prompts."
⚠️ A Sincere Note of Caution This is not a feature officially guaranteed by Google, but a practical prompt engineering hack that leverages the AI's structural interpretation capabilities. While it does not guarantee 100% fixation every time, it is a powerful approach favored by many creators as it reduces interpretation errors compared to giving instructions in plain text.
4. Practical Workflow & How to Use for Blogs
For those who feel that "JSON seems difficult...", rest assured. You don't need to write it from scratch yourself!
Workflow
[Step 1: Have an AI create the JSON]
Just ask an AI assistant like Claude or ChatGPT: "Convert a girl character with blue eyes, navy long hair, and a floral yukata into the anime-style JSON prompt format found in the article." The AI will then immediately output the prompt organized in JSON format.
[Step 2: Generate using Gemini's Pro mode]
Paste that JSON into Gemini to generate the image, and then execute
"Regenerate with Pro" using the procedure mentioned above.
[Step 3: Generate different poses once you get good results]
Once you get an image you like, you can mass-produce variations by changing only the outfit or pose values. If strict_match is set, the face and hair color will be less likely to break down.
🎨 Super Practical Ways to Use This on Your Blog
It's a waste to let the generated character images end as just "art"!
Cut out the image using a background removal tool (like remove.bg)
CanvaUpload to and add text or decorations
Set it as the featured image for your WordPress blog (using a visually appealing theme like JIN)
Use it as an original icon for "conversation-style speech bubbles" within your articles
Just by having an original character appear on your blog, your readers' dwell time and repeat visit rates will change. A blog with its own "unique worldview" is a powerful weapon in itself.
5. Tips for Success (Troubleshooting)
Finally, I have summarized some common stumbling blocks.
① Always include a negative prompt Simply adding "inconsistent character design" or "blurry" to the negative_prompt will significantly change the generation quality. Clearly stating "what you don't want to see" is also an important role of the JSON prompt.
② Watch out for trailing commas in JSON!
JSON
// ❌ NGな例(最後の要素にカンマが残っている)
"technical_specs": [
"clean line art",
"soft cel shading", ← このカンマがエラーの原因になる!
]
// ✅ OKな例
"technical_specs": [
"clean line art",
"soft cel shading" ← カンマなし
]
The golden rule is not to leave a comma after the last element of each array or object in JSON. This is a very common cause of errors, so please be sure to check before pasting.
③ Start with a simple template I recommend not trying to create a complex JSON from the start, but rather using the minimal template introduced here as a base and adding your own character settings little by little.
The frustration of "not being able to create the character I want with AI" is not yours alone.
However, if you try the "passing structure via JSON" approach introduced here, you should definitely feel like you've made some progress. It's okay if it doesn't go well at first. The process of repeating trial and error to gradually increase accuracy is the greatest thrill of AI creation.
The moment your original character appears on the screen exactly as you imagined—please experience that joy for yourself!
Are you interested in AI utilization techniques to increase your note access numbers, not just for character consistency?
The strategy I practiced to reach 10,000 PV is published in "[Full Data Disclosure] Everything I Did to Exceed 10,000 PV on AI Note."
If this article was even a little helpful, please be sure to press the "Like❤️" button, as it will encourage my future writing. Let's continue to enjoy AI creation together!🎨
Articles on generative AI and JSON prompts are collected in this magazine.
💡 Bonus: Must-read books for "100% control" of AI
Skills that make AI work exactly as intended, such as the "structuring in JSON format" introduced this time, will undoubtedly become a powerful weapon in the coming era.
"I want to learn prompt engineering more systematically." "I want to know the 'universal rules' of AI output practiced by experts overseas."
For those who say this, I would like to introduce one book that I recommend.
By reading systematic, high-quality books rather than just fragmented information on the internet, your fundamental understanding of "why it works that way" for the techniques introduced this time should deepen further. Please pick it up for your holiday skill-up.
