In brand IP design and content creation, designers often face the challenge of "difficulty maintaining consistency of the same character across different scenarios". The root cause of this problem lies in traditional AI image generation models lacking character memory capability, each generation being independent creation, leading to unstable IP images and low brand recognition. This article will deeply analyze Nano Banana Pro character consistency technology implementation principles and provide 5+ verified practical techniques.

nano-banana-pro-brand-ip-character-consistency-guide-en 图示

Nano Banana Pro Character Consistency Technical Principles

Nano Banana Pro (Gemini 3 Pro Image), when released in November 2025, introduced industry-leading multi-image reference and character consistency technology. This technology can simultaneously process up to 14 reference images and maintain appearance consistency of up to 5 character roles during generation, completely solving character stability challenges in IP design.

Detailed Multi-image Reference Architecture

Nano Banana Pro multi-image reference system adopts layered processing architecture:

  1. Character Reference Layer (Up to 5 images): Specifically for identifying and maintaining character features, including facial features, body proportions, clothing style, etc.
  2. Object Reference Layer (Up to 6 images): For high-fidelity replication of scene props, background elements, brand LOGOs and other objects
  3. Style Reference Layer (Remaining images): Controls overall artistic style, color tone, composition and other visual styles

This layered architecture ensures that in complex scenarios, character features are not interfered with by scene elements, each layer is processed independently before fusion to generate final images.

🎯 Technical Recommendation: In actual IP design projects, we recommend testing Nano Banana Pro character consistency functionality through APIYI apiyi.com platform. The platform provides complete multi-image upload interface, supports 14-image reference parameter configuration, helps quickly verify character library construction solutions.

nano-banana-pro-brand-ip-character-consistency-guide-en 图示

Character Recognition and Feature Extraction Mechanism

Nano Banana Pro uses Gemini 3 Pro multimodal understanding capability for character recognition:

Facial Feature Extraction: Identifies facial feature proportions, skin tone, hairstyle, eye-brow-nose-mouth and other detailed features, establishes character's "facial fingerprint"

Body Posture Feature Extraction: Analyzes height proportions, body type characteristics, posture habits and other body language features

Clothing Style Extraction: Identifies clothing styles, color schemes, accessory elements and other visual identifiers

Artistic Style Extraction: Extracts painting style (realistic/cartoon/3D rendering), line treatment, color saturation and other style features

Extracted features are encoded as high-dimensional vectors, used as strong constraints during generation process, ensuring output images remain consistent with reference characters. Even when scenarios, angles, lighting change, core character features remain stable.

💡 Selection Recommendation: For brand IPs requiring long-term operation, we recommend prioritizing establishment of complete character reference library. When calling through APIYI apiyi.com platform, can upload multi-angle character reference images in requests. The platform supports image preprocessing and feature analysis, convenient for quickly verifying character recognition effects.

5 Core Techniques for Nano Banana Pro Character Consistency Generation

Technique 1: Build Multi-angle Character Reference Library

Core Principle: Single-angle reference images easily lead to "face blindness" in generation results. Only by providing multi-angle, multi-expression reference images can the model fully understand character features.

Best Practices:

  • Front View: Clearly displays facial feature proportions and facial characteristics
  • Side View: Provides head outline and side face features
  • 3/4 View: Most commonly used composition angle, must be included
  • Different Expressions: Expression variations such as smile, serious, surprise
  • Different Scenarios: Indoor/outdoor, different lighting conditions

Practical Case: Build Character Library for Corporate Mascot

import google.generativeai as genai
from PIL import Image

genai.configure(api_key="YOUR_API_KEY")
model = genai.GenerativeModel('gemini-3-pro-image-preview')

# Prepare 5 character reference images from different angles
character_refs = [
    Image.open("mascot_front.png"),      # Front View
    Image.open("mascot_side.png"),       # Side View
    Image.open("mascot_3quarter.png"),   # 3/4 view
    Image.open("mascot_smile.png"),      # Smiling expression
    Image.open("mascot_action.png")      # Action Poses
]

prompt = """
Using the provided character references, create a new scene showing the mascot:
- Standing in a modern office environment
- Holding a laptop and presenting to colleagues
- Maintaining the exact character design and proportions
- Professional lighting, corporate setting

Style: 3D rendered illustration, Pixar-quality
"""

response = model.generate_images(
    prompt=prompt,
    reference_images=character_refs,  # Pass multiple reference images
    resolution="2K",
    guidance_scale=7.5  # Moderate guidance, maintain consistency
)

response.images[0].save("mascot_office_scene.png")

Technical Points:

  • Reference image count controlled at 3-5 images is optimal, too many increases processing complexity
  • Ensure reference images have clean backgrounds, avoid complex backgrounds interfering with character recognition
  • Reference image resolution recommended at least 1024×1024, ensure features are clearly distinguishable

🚀 Quick Start: It is recommended to use APIYI apiyi.com platform to quickly build character library management system. The platform provides batch image upload, reference image preview and automated calling functionality, no need to manually manage image paths, can complete character library API integration in 5 minutes.

nano-banana-pro-brand-ip-character-consistency-guide-en 图示

Technique 2: Precise Control of Reference Image Weights and Priorities

Core Principle: Not all reference images are equally important. By adjusting weights, key features can be emphasized and secondary elements weakened.

Weight Control Strategy:

Element Type Recommended Weight Description
Facial Features High Weight (0.8-1.0) Most Critical Recognition Features
Clothing Accessories Medium Weight (0.6-0.8) Can Vary Moderately But Maintain Style
Background Elements Low Weight (0.3-0.5) Flexible Adjustment Based on New Scenarios
Posture Actions Medium Weight (0.5-0.7) Maintain Character's Body Language Characteristics

Practical Case: Generate Brand IP Series Marketing Posters

prompt = """
Create a marketing poster series for a tech brand featuring the character:

PRIMARY CHARACTER (weight: 1.0):
- Maintain exact facial features and expressions
- Keep signature clothing style and color scheme
- Preserve body proportions and pose style

SCENE VARIATIONS (weight: 0.4):
- Background 1: Futuristic city skyline at sunset
- Background 2: Minimalist tech workspace with holographic displays
- Background 3: Nature-inspired tech garden with digital flowers

Style: Modern tech illustration with vibrant colors and clean lines
"""

# Clearly specify weight allocation in prompts
response = model.generate_images(
    prompt=prompt,
    reference_images=[
        ("character_main.png", 1.0),      # Main character reference, highest weight
        ("character_outfit.png", 0.8),    # Clothing details, high weight
        ("style_reference.png", 0.5),     # Artistic style, medium weight
        ("scene_mood.png", 0.3)           # Scene mood, low weight
    ],
    resolution="4K",
    thinking_mode=True  # Enable thinking mode, optimize weight balance
)

Technical Points:

  • Facial feature weights always remain highest, ensuring character recognizability
  • Scene and background weights reduced, giving model more creative freedom
  • Use thinking_mode=True to let model reason weight allocation first, then generate image

💰 Cost Optimization: For scenarios requiring large-scale generation of marketing materials, can consider calling Nano Banana Pro API through APIYI apiyi.com platform. The platform provides bulk generation price discounts, can save approximately 30% cost compared to official API, suitable for brand marketing teams' scaled content production needs.

Technique 3: Maintain Character Feature Stability Across Scenarios

Core Principle: Real IP application scenarios are ever-changing, from indoor to outdoor, from day to night, from static to dynamic. Character features must remain stable across all scenarios.

Scenario Adaptation Strategy:

Lighting Adaptation: Clearly state lighting conditions in prompts, but emphasize "maintain character's original colors and features"

Example Prompt:

The character is in a dimly lit cyberpunk alley with neon signs,
but maintain the character's original bright and cheerful color palette
and facial features exactly as in the reference images.

Action Adaptation: When describing actions, emphasize "character's signature posture and style"

Example Prompt:

Show the character running energetically through the scene,
maintaining their signature animation style with exaggerated movements
and characteristic facial expressions from the reference.

Practical Case: Generate IP Character Comic Panels

# Scene 1: Waking Up in the Morning
scene1_prompt = """
Comic panel 1: The character waking up in bed, morning sunlight streaming through window.
- Maintain exact character design from references
- Show characteristic sleepy expression
- Keep signature pajama color scheme (blue with stars)
- Comic book style with clear outlines
"""

# Scene 2: Company Meeting
scene2_prompt = """
Comic panel 2: The character presenting at a business meeting, office setting.
- Same character features and proportions
- Now wearing business casual outfit (maintain character's color palette)
- Confident professional expression
- Same comic book art style
"""

# Scene 3: Evening Relaxation
scene3_prompt = """
Comic panel 3: The character relaxing at home with a book, cozy evening lighting.
- Maintain all character features consistently
- Casual home clothing
- Relaxed, content expression
- Warm lighting but keep character colors recognizable
"""

# Batch generation maintains consistency
scenes = []
for i, prompt in enumerate([scene1_prompt, scene2_prompt, scene3_prompt]):
    response = model.generate_images(
        prompt=prompt,
        reference_images=character_refs,  # Use same character reference library
        resolution="2K",
        aspect_ratio="16:9",  # Comic panel landscape format
        guidance_scale=8.0,   # Increase guidance strength, ensure consistency
        seed=12345 + i        # Use similar seed values to enhance continuity
    )
    scenes.append(response.images[0])

# Save panel sequence
for i, scene in enumerate(scenes):
    scene.save(f"comic_panel_{i+1}.png")

Technical Points:

  • Each panel uses same character reference images
  • Repeatedly emphasize "maintain exact character design" in prompts
  • Use similar seed values (12345, 12346, 12347) to enhance continuity
  • Set guidance_scale to 8.0, increase adherence to reference images

🎯 Comic Creation Recommendation: For serialized comics and long-form storyboards, we recommend batch generating panels through APIYI apiyi.com platform. The platform supports automated panel sequence generation, can configure unified character reference library and style parameters, ensures visual coherence of entire work, and provides panel preview and batch download functionality.

Technique 4: Style Consistency Control During Batch Generation

Core Principle: Brand IPs often need to generate large amounts of materials (emoji packs, social media images, product packaging, etc.), must ensure all materials have unified style and consistent brand recognition.

Batch Generation Best Practices:

  1. Establish Standard Prompt Template: Encapsulate fixed character descriptions and style requirements as templates
# Standard prompt template
BASE_TEMPLATE = """
Character reference: Maintain exact appearance from provided images
- Facial features: [Keep all proportions and details identical]
- Color palette: [Primary: #FF6B6B, Secondary: #4ECDC4, Accent: #FFE66D]
- Art style: Modern flat illustration with subtle gradients
- Line weight: Medium-thick outlines, smooth curves
- Lighting: Soft ambient light with gentle shadows

Scene: {scene_description}
Action: {action_description}
Mood: {mood}

Technical: 2K resolution, PNG with transparency
"""

# Use template for batch generation
scenarios = [
    {
        "scene": "Social media profile background",
        "action": "Character waving hello cheerfully",
        "mood": "Friendly and welcoming"
    },
    {
        "scene": "Product packaging design",
        "action": "Character holding the product with excitement",
        "mood": "Energetic and enthusiastic"
    },
    {
        "scene": "Email newsletter header",
        "action": "Character reading a letter with curiosity",
        "mood": "Engaged and interested"
    }
]

for scenario in scenarios:
    prompt = BASE_TEMPLATE.format(
        scene_description=scenario["scene"],
        action_description=scenario["action"],
        mood=scenario["mood"]
    )

    response = model.generate_images(
        prompt=prompt,
        reference_images=character_refs,
        resolution="2K",
        guidance_scale=7.5,
        temperature=0.7  # Control randomness, maintain style stability
    )

    filename = scenario["scene"].replace(" ", "_").lower() + ".png"
    response.images[0].save(filename)
  1. Fixed Random Seed Strategy: For scenarios requiring fine-tuning, use fixed seed to ensure reproducibility
# Fixed seed generation, convenient for subsequent fine-tuning
BRAND_SEED = 888888

response = model.generate_images(
    prompt=prompt,
    reference_images=character_refs,
    seed=BRAND_SEED,  # Use brand-exclusive seed
    resolution="2K"
)
  1. Color Consistency Verification: Automatically detect dominant colors after generation, ensure compliance with brand VI standards
from PIL import Image
import colorsys

def extract_dominant_colors(image_path, n_colors=5):
    """Extract dominant colors from image"""
    img = Image.open(image_path)
    img = img.resize((150, 150))  # Resize to speed up processing
    pixels = img.getdata()

    # Count color frequency
    color_freq = {}
    for pixel in pixels:
        if len(pixel) == 4 and pixel[3] < 128:  # Skip transparent pixels
            continue
        rgb = pixel[:3]
        color_freq[rgb] = color_freq.get(rgb, 0) + 1

    # Return most frequently occurring colors
    sorted_colors = sorted(color_freq.items(), key=lambda x: x[1], reverse=True)
    return [color[0] for color in sorted_colors[:n_colors]]

def verify_brand_colors(image_path, brand_palette):
    """Verify if generated image complies with brand color scheme"""
    dominant_colors = extract_dominant_colors(image_path)

    # Check if contains brand main colors
    for brand_color in brand_palette:
        # Allow certain color difference
        if any(color_distance(brand_color, dom_color) < 50
               for dom_color in dominant_colors):
            return True
    return False

# Brand standard colors
BRAND_PALETTE = [
    (255, 107, 107),  # #FF6B6B Primary color
    (78, 205, 196),   # #4ECDC4 Secondary color
    (255, 230, 109)   # #FFE66D Accent color
]

# Verify generation results
if verify_brand_colors("generated_image.png", BRAND_PALETTE):
    print("✅ Colors comply with brand standards")
else:
    print("❌ Need to regenerate, colors deviate from brand VI")

Technical Points:

  • Prompt templating, ensure core descriptions consistent
  • Use fixed guidance_scale and temperature parameters
  • Automatically verify color and style consistency after batch generation
  • Build brand material library, record successful parameter configurations

💡 Batch Generation Optimization: When calling through APIYI apiyi.com platform, can use platform-provided batch task management functionality. The platform supports submitting batch generation queues, automatic concurrent processing, and provides preview and filtering functionality for generation results, greatly improving material production efficiency.

Technique 5: Combine Thinking Mode to Improve Consistency in Complex Scenarios

Core Principle: In multi-character, complex composition scenarios, enabling Thinking Mode lets model reason character layout and feature allocation first, then generate images, can significantly improve consistency accuracy.

Applicable Scenarios:

  • Multi-character Group Portraits: 3-5 different characters appearing simultaneously
  • Complex Interaction Scenarios: Characters have interactive actions
  • Special Perspectives: Top-down, bottom-up, fisheye and other unconventional perspectives
  • Style Mixing: Need to blend multiple artistic styles

Practical Case: Generate 5-Character Brand Group Photo

# Prepare reference images for 5 different characters
characters = {
    "hero": [Image.open("hero_ref1.png"), Image.open("hero_ref2.png")],
    "sidekick": [Image.open("sidekick_ref1.png"), Image.open("sidekick_ref2.png")],
    "mentor": [Image.open("mentor_ref1.png")],
    "rival": [Image.open("rival_ref1.png")],
    "mascot": [Image.open("mascot_ref1.png")]
}

# Merge all reference images (up to 14, using 9 here)
all_refs = []
for char_refs in characters.values():
    all_refs.extend(char_refs)

prompt = """
Create a promotional group photo featuring all five brand characters:

COMPOSITION:
- Hero (main character): Center position, slightly forward
- Sidekick: Right side of hero, friendly pose
- Mentor: Left rear, wise and guiding posture
- Rival: Right rear, confident stance
- Mascot: Front center-left, playful pose

CRITICAL REQUIREMENTS:
1. Maintain EXACT facial features and body proportions for each character from references
2. Each character must be clearly recognizable and match their established design
3. Natural interactions: characters looking at each other or camera
4. Unified lighting: warm studio lighting with soft shadows
5. Brand colors visible in each character's outfit

STYLE: Professional promotional artwork, Pixar-quality 3D rendering
MOOD: Friendly, energetic, and cohesive team spirit
BACKGROUND: Simple gradient backdrop with subtle brand logo watermark
"""

response = model.generate_images(
    prompt=prompt,
    reference_images=all_refs,
    resolution="4K",  # High resolution ensures clear details
    thinking_mode=True,  # Enable thinking mode, reason layout first
    guidance_scale=8.5,  # High guidance strength, strictly follow references
    number_of_images=3   # Generate 3 candidates, select best
)

# Save candidate results
for i, img in enumerate(response.images):
    img.save(f"group_photo_candidate_{i+1}.png")

Thinking Mode Workflow:

  1. Layout Reasoning: Model first analyzes spatial layout requirements in prompts, plans each character's position
  2. Feature Matching: Identifies reference images corresponding to each character, extracts key features
  3. Conflict Resolution: Detects possible visual conflicts (occlusion, color conflicts), adjusts composition
  4. Generation Execution: Generates final image based on reasoning results

Technical Points:

  • Clearly state each character's position and posture in prompts
  • Use emphasis words such as "EXACT", "MAINTAIN" to ensure consistency
  • thinking_mode=True will add 2-3 seconds processing time, but significantly improves accuracy
  • Generate multiple candidate results, manually select best solution

🎯 Complex Scenario Recommendation: For multi-character or complex composition IP material generation, we recommend calling Thinking Mode functionality through APIYI apiyi.com platform. The platform supports viewing model reasoning process logs, helps you understand character layout decision logic, and provides visualized reasoning step displays, convenient for optimizing prompts and parameter configurations.

Practical Application Scenarios of Nano Banana Pro Character Consistency

Scenario 1: Complete Brand Mascot VI System

Enterprise brands need to use unified mascot images across various media, from business cards to billboards, from APP icons to product packaging.

Application Solution:

# Generate complete VI materials based on core reference images
vi_scenarios = {
    "business_card": {
        "prompt": "Character portrait for business card, professional headshot, neutral background",
        "size": (512, 512),
        "format": "square"
    },
    "app_icon": {
        "prompt": "Character face close-up for mobile app icon, cheerful expression, vibrant colors",
        "size": (1024, 1024),
        "format": "square"
    },
    "billboard": {
        "prompt": "Full body character for billboard advertisement, dynamic pose, urban background",
        "size": (3840, 2160),
        "format": "widescreen"
    },
    "packaging": {
        "prompt": "Character with product, excited expression, clean product photography style",
        "size": (2048, 2048),
        "format": "square"
    }
}

for name, config in vi_scenarios.items():
    response = model.generate_images(
        prompt=config["prompt"],
        reference_images=mascot_refs,
        resolution=config["size"],
        guidance_scale=8.0
    )
    response.images[0].save(f"vi_{name}.png")

Value: Ensures visual consistency of brand across all touchpoints, improves brand recognition and professional image.

Scenario 2: Rapid Production of Emoji Series

Self-media operations need to regularly launch brand IP emoji packs, maintaining character consistency while showing rich expressions.

Application Solution:

expressions = [
    "Happy and laughing",
    "Surprised with wide eyes",
    "Confused and thinking",
    "Angry with steam coming out",
    "Sad and crying",
    "Excited jumping",
    "Sleepy and yawning",
    "Cool with sunglasses"
]

for i, expression in enumerate(expressions):
    prompt = f"""
    Create an emoji-style sticker of the character showing: {expression}
    - Maintain exact character design from references
    - Large expressive face, exaggerated emotion
    - Transparent background
    - Bold outlines, vibrant colors
    - Square composition suitable for messaging apps
    """

    response = model.generate_images(
        prompt=prompt,
        reference_images=character_refs,
        resolution="1K",
        aspect_ratio="1:1"
    )
    response.images[0].save(f"emoji_{i+1}_{expression.replace(' ', '_')}.png")

Value: Quickly generate complete emoji sets, reduce design costs, maintain unified IP image.

🚀 Emoji Generation Acceleration: It is recommended to use APIYI apiyi.com platform's batch emoji generation functionality. The platform provides preset emoji templates and size configurations, supports one-click generation of 12 common expressions, and automatically adds transparent backgrounds, suitable for quickly launching social media operation materials.

Scenario 3: Serialized Comics and Picture Book Creation

Comic creators need to maintain absolutely consistent character appearance across hundreds of pages. Nano Banana Pro can significantly lower creation barriers.

Application Solution:

# Comic panel generation workflow
def generate_comic_page(page_number, panels_data):
    """Generate one page of comic (usually 4-6 panels)"""
    page_images = []

    for panel_num, panel in enumerate(panels_data):
        prompt = f"""
        Comic panel {panel_num + 1} for page {page_number}:

        SCENE: {panel['scene']}
        ACTION: {panel['action']}
        DIALOGUE: {panel['dialogue']}

        CHARACTER REQUIREMENTS:
        - Maintain exact character design from references
        - Emotional expression: {panel['emotion']}
        - Comic book art style: clean lines, flat colors, dynamic composition

        PANEL LAYOUT: {panel['layout']} (e.g., full width, half width, close-up)
        """

        response = model.generate_images(
            prompt=prompt,
            reference_images=character_refs,
            resolution="2K",
            guidance_scale=8.0,
            seed=page_number * 1000 + panel_num  # Ensure panel continuity
        )

        page_images.append(response.images[0])

    return page_images

# Example: Generate 4 panels for first page
page1_panels = [
    {
        "scene": "Bedroom interior, morning",
        "action": "Character waking up, stretching arms",
        "dialogue": "What a beautiful day!",
        "emotion": "Happy and energetic",
        "layout": "full width establishing shot"
    },
    {
        "scene": "Same bedroom, closer view",
        "action": "Character looking at phone, surprised expression",
        "dialogue": "Oh no, I'm late!",
        "emotion": "Shocked",
        "layout": "medium shot"
    },
    {
        "scene": "Bathroom, quick movements",
        "action": "Character brushing teeth hurriedly",
        "dialogue": "(Muffled sounds)",
        "emotion": "Rushed",
        "layout": "close-up action shot"
    },
    {
        "scene": "Front door, rushing out",
        "action": "Character running out with backpack",
        "dialogue": "See you later, home!",
        "emotion": "Determined",
        "layout": "full width action panel"
    }
]

page1_images = generate_comic_page(1, page1_panels)

# Save panels
for i, img in enumerate(page1_images):
    img.save(f"comic_page1_panel{i+1}.png")

Value: Independent creators can quickly produce high-quality comic panels, complete serialized works without a team.

Scenario 4: E-commerce Product Marketing Material Matrix

E-commerce brands need to generate matching marketing images for each product, using unified brand IP images to enhance recognition.

Application Solution:

products = [
    {"name": "T-shirt", "color": "white", "category": "Clothing"},
    {"name": "Water Bottle", "color": "blue", "category": "Daily Necessities"},
    {"name": "Notebook", "color": "pink", "category": "Stationery"},
    {"name": "Canvas Bag", "color": "beige", "category": "Accessories"}
]

for product in products:
    prompt = f"""
    E-commerce product photography featuring the brand character:

    PRODUCT: {product['name']} ({product['color']} color)
    CHARACTER ACTION: Holding/using the {product['name']} with enthusiasm

    COMPOSITION:
    - Product prominently displayed, well-lit
    - Character showing excitement and endorsement
    - Clean white or subtle gradient background
    - Professional product photography lighting

    STYLE: High-quality commercial photography with 3D character integration
    MAINTAIN: Exact character design from references
    """

    response = model.generate_images(
        prompt=prompt,
        reference_images=brand_mascot_refs,
        resolution="4K",
        guidance_scale=7.5
    )

    response.images[0].save(f"product_{product['name']}_{product['color']}.png")

Value: Unified IP image strengthens brand memory points, improves visual appeal and conversion rate of product pages.

💰 E-commerce Batch Generation Optimization: For e-commerce brands with large numbers of SKUs, can consider calling batch product image generation services through APIYI apiyi.com platform. The platform provides e-commerce scenario exclusive optimization parameters, supports product data import and batch rendering, can save approximately 30% cost compared to official API, and provides automatic image cutout and background replacement functionality for product images.

Nano Banana Pro Character Consistency Best Practices

Reference Image Preparation Standards

Image Quality Requirements:

  • Resolution: At least 1024×1024, recommended 2048×2048
  • Format: PNG (supports transparent background) or JPG
  • Compression: Use lossless or light compression, avoid JPEG artifacts
  • Background: Solid color background or clean scene, avoid complex backgrounds interfering

Character Coverage:

  • Facial Close-up: At least 1 image, clearly displays facial features
  • Full Body Shot: At least 1 image, displays body type and proportions
  • Side/Multi-angle: 1-2 images, provides 3D understanding
  • Different Expressions: Optional, for emoji generation
  • Different Clothing: Optional, for clothing variant generation

File Organization Structure:

character_refs/
├── main_character/
│   ├── front_view.png
│   ├── side_view.png
│   ├── 3quarter_view.png
│   ├── expression_happy.png
│   └── expression_serious.png
├── sidekick/
│   └── ...
└── reference_library.json  # Record reference image paths for each character

Prompt Engineering Best Practices

Structured Prompt Template:

STRUCTURED_PROMPT_TEMPLATE = """
[CHARACTER CONSISTENCY]
- Use provided reference images to maintain exact character appearance
- Facial features: {facial_description}
- Body proportions: {body_description}
- Signature elements: {signature_elements}

[SCENE DESCRIPTION]
- Environment: {environment}
- Lighting: {lighting}
- Mood: {mood}

[ACTION AND POSE]
- Primary action: {action}
- Character expression: {expression}
- Body language: {body_language}

[STYLE AND TECHNICAL]
- Art style: {art_style}
- Color palette: {color_palette}
- Resolution: {resolution}
- Additional notes: {notes}
"""

# Usage example
prompt = STRUCTURED_PROMPT_TEMPLATE.format(
    facial_description="Round friendly face, large expressive eyes, small nose, warm smile",
    body_description="Chibi-style proportions, 3 heads tall, round body shape",
    signature_elements="Always wears blue cap with star logo, red sneakers",
    environment="Cozy coffee shop interior with warm wooden furniture",
    lighting="Soft natural window light, warm tone",
    mood="Relaxed and friendly",
    action="Sitting at table, holding coffee cup",
    expression="Content smile, eyes slightly closed enjoying the moment",
    body_language="Relaxed posture, leaning back comfortably",
    art_style="Flat illustration with subtle gradients, modern clean design",
    color_palette="Primary blues, warm browns, accent yellows",
    resolution="2K",
    notes="Maintain brand color scheme, transparent background preferred"
)

API Parameter Configuration Recommendations

Parameter Recommended Value Description
guidance_scale 7.5-8.5 Higher values ensure strict adherence to reference images
temperature 0.6-0.8 Moderate randomness, avoid repetition but maintain consistency
thinking_mode true (complex scenarios) Enable for multi-character or complex compositions
resolution 2K (general) / 4K (printing) Choose resolution based on usage
seed Fixed Value (when fine-tuning) Use fixed seed when iterative optimization needed
number_of_images 2-4 Generate multiple candidates, select best result

💡 Parameter Optimization Recommendation: When calling through APIYI apiyi.com platform, can use platform-provided "Parameter Recommendation Engine". This function automatically recommends optimal parameter combinations based on your character type (realistic/cartoon/3D) and application scenario (social media/print/video), no need for manual debugging, quickly obtain ideal results.

Quality Verification and Iterative Optimization Process

Automated Verification Checklist:

def validate_character_consistency(generated_image, reference_images):
    """Verify character consistency of generated image"""
    checks = {
        "facial_similarity": False,
        "color_palette_match": False,
        "style_consistency": False,
        "resolution_quality": False
    }

    # 1. Facial similarity detection (using face_recognition library)
    from face_recognition import face_encodings, face_distance

    gen_encoding = face_encodings(generated_image)
    ref_encodings = [face_encodings(ref) for ref in reference_images]

    if gen_encoding and ref_encodings:
        distances = [face_distance([gen_encoding[0]], ref[0])[0]
                     for ref in ref_encodings if ref]
        avg_distance = sum(distances) / len(distances)
        checks["facial_similarity"] = avg_distance < 0.6  # Threshold adjustable

    # 2. Color consistency detection
    gen_colors = extract_dominant_colors(generated_image)
    ref_colors = extract_dominant_colors(reference_images[0])

    color_match_count = sum(
        1 for gen_color in gen_colors
        if any(color_distance(gen_color, ref_color) < 50
               for ref_color in ref_colors)
    )
    checks["color_palette_match"] = color_match_count >= 3

    # 3. Style consistency (simplified: check edge sharpness)
    from PIL import ImageFilter
    edges = generated_image.filter(ImageFilter.FIND_EDGES)
    edge_strength = sum(edges.getdata()) / (edges.width * edges.height)
    checks["style_consistency"] = 10 < edge_strength < 100  # Empirical threshold

    # 4. Resolution quality detection
    checks["resolution_quality"] = (
        generated_image.width >= 1024 and
        generated_image.height >= 1024
    )

    return checks

# Verify and decide
validation_result = validate_character_consistency(
    generated_img,
    character_refs
)

if all(validation_result.values()):
    print("✅ Generation quality qualified, can be used")
else:
    print("❌ Need to regenerate, problem items:")
    for check, passed in validation_result.items():
        if not passed:
            print(f"  - {check}")

Iterative Optimization Strategy:

  1. First Generation: Use default parameters, generate 3-4 candidates
  2. Manual Selection: Select 1-2 results closest to expectations
  3. Parameter Fine-tuning:
    • If character features not obvious enough → Increase guidance_scale to 8.5-9.0
    • If style too rigid → Decrease guidance_scale to 6.5-7.0
    • If completely deviated → Check reference image quality, optimize prompt description
  4. Fixed Seed Regeneration: Use best candidate's seed, regenerate after fine-tuning prompt
  5. Batch Verification: Perform above automated verification on final version

🎯 Quality Assurance Recommendation: APIYI apiyi.com platform provides intelligent quality detection functionality, can automatically analyze similarity between generation results and reference images, and provide optimization suggestions. Enterprise users can configure custom quality standards (facial similarity threshold, color deviation range, etc.), ensure batch generation content 100% complies with brand standards.

Nano Banana Pro Character Consistency Common Questions and Answers

Why Do Character Features Sometimes Change Slightly?

There are three main reasons:

  1. Insufficient Reference Image Quality: Resolution too low, single angle or complex background, causing model to extract features inaccurately
  2. Prompt Weight Imbalance: Scene description too complex, weakens character feature constraint weights
  3. Excessive Randomness: temperature parameter set too high, introduces too much random variation

Solution:

  • Use high-resolution (2K or above), multi-angle, clean background reference images
  • Repeatedly emphasize "maintain exact character features" in prompts
  • Reduce temperature to 0.6-0.7, increase guidance_scale to 8.0-8.5
  • Enable thinking_mode to let model reason first then generate

How to Handle Scenarios with Multiple Characters Appearing Simultaneously?

Nano Banana Pro supports consistency maintenance of up to 5 character roles. Processing method:

  1. Reference Image Grouping: Prepare 2-3 reference images for each character, total not exceeding 14 images
  2. Clear Prompt Annotation: Clearly describe each character's position, action and features
prompt = """
Group scene with 3 characters:

Character A (main hero):
- Position: Center foreground
- Reference images: 1-3
- Action: Standing confidently, arms crossed
- Features: Maintain spiky blue hair, red jacket, determined expression

Character B (sidekick):
- Position: Right side, slightly behind Character A
- Reference images: 4-6
- Action: Pointing excitedly at something off-screen
- Features: Maintain round glasses, green hoodie, cheerful smile

Character C (mentor):
- Position: Left background
- Reference images: 7-9
- Action: Observing with wise gaze
- Features: Maintain grey beard, purple robe, calm demeanor

Scene: Fantasy forest clearing with magical glowing mushrooms
"""
  1. Use Thinking Mode: Must enable, let model plan character layout first
  2. Generate Multiple Candidates: Due to high complexity, recommend generating 4-6 candidates to select best

💡 Multi-character Scenario Recommendation: When calling multi-character scenario generation through APIYI apiyi.com platform, can use platform-provided "Character Annotation Tool". This tool allows you to assign independent reference image sets and feature descriptions for each character, and automatically generates structured prompts, greatly reducing multi-character scenario generation difficulty.

Can Local Details Be Modified After Generation While Maintaining Overall Character Consistency?

Yes, use Nano Banana Pro's Localized Editing functionality:

# Generate initial image
initial_image = model.generate_images(
    prompt="Character in a park",
    reference_images=character_refs,
    resolution="2K"
).images[0]

# Localized editing: only change background, keep character unchanged
edited_image = model.edit_image(
    base_image=initial_image,
    mask_region="background",  # Specify editing area
    edit_prompt="Change background to cyberpunk city at night, neon lights",
    preserve_regions=["character"],  # Clearly protect character area
    reference_images=character_refs  # Continue providing character references
)

Technical Points:

  • Use mask_region to specify editing area (background, clothing, accessories, etc.)
  • Use preserve_regions to clearly protect areas that should not change
  • Continue providing character reference images, ensure consistency of unedited parts

How to Maintain Character Consistency for Different Styles (Realistic/Cartoon/3D)?

Nano Banana Pro supports cross-style character consistency conversion. Key is providing multi-style reference images:

Strategy 1: Consistency Within Single Style (Simplest)

  • All reference images use same artistic style (such as all cartoon style)
  • Emphasize style name in prompts when generating

Strategy 2: Cross-style Conversion (Requires Additional References)

  • Provide original style reference images + target style example images
# Convert cartoon character to realistic style
prompt = """
Transform the cartoon character into photorealistic style:

CHARACTER FEATURES TO MAINTAIN:
- Facial structure and proportions (adapted to realistic human proportions)
- Signature color scheme (blue jacket, red scarf)
- Personality traits (friendly, approachable expression)

TARGET STYLE:
- Photorealistic human portrait
- Professional studio lighting
- High detail skin texture and fabric materials
- Cinematic quality rendering

Maintain the recognizable identity of the character despite style change.
"""

response = model.generate_images(
    prompt=prompt,
    reference_images=[
        *cartoon_character_refs,  # Original cartoon references
        realistic_style_example   # Realistic style example image
    ],
    resolution="4K",
    thinking_mode=True,
    guidance_scale=7.0  # Moderately reduce, give model freedom for style conversion
)

Technical Points:

  • When cross-style converting, set guidance_scale to 6.5-7.5, not too high
  • Clearly define which are "core features" (must maintain), which can adapt to new style
  • Use thinking_mode to let model reason style conversion strategy

🎯 Style Conversion Recommendation: APIYI apiyi.com platform provides "Style Transfer Presets", includes common style conversion solutions (cartoon→realistic, 2D→3D, hand-drawn→digital painting, etc.). Using presets can quickly obtain stable cross-style consistency effects without manual debugging of complex parameters.

Nano Banana Pro Character Consistency Comparison with Other Models (Midjourney/DALL-E)?

Feature Nano Banana Pro Midjourney DALL-E 3
Multi-image Reference Count ✅ 14 images ⚠️ 1-2 images (cref) ❌ Not directly supported
Character Consistency Count ✅ Up to 5 ⚠️ 1 ⚠️ 1 (requires multiple attempts)
Object Reference Count ✅ 6 images ⚠️ Limited ❌ Not supported
Cross-scenario Stability ✅ Excellent ✅ Excellent (requires cref) ⚠️ Average
API Availability ✅ Complete API ❌ No Official API ✅ Complete API
Chinese Support ✅ Native Support ⚠️ Requires English prompt ✅ Supports Chinese
Price Medium High (subscription) Medium

Best Choice Recommendations:

  • Professional IP Design: Nano Banana Pro (multi-character, large amounts of materials)
  • Artistic Creation: Midjourney (most artistic)
  • Rapid Prototyping: DALL-E 3 (simple and easy to use)

Summary and Outlook

Nano Banana Pro's multi-image reference and character consistency technology brings revolutionary efficiency improvements to brand IP design, content creation and marketing material production. Through the 5 core techniques introduced in this article, creators can achieve:

  • Brand Consistency: Maintain unified IP image across all touchpoints, strengthen brand recognition
  • Creation Efficiency: Reduce work that originally required professional teams to individual creators
  • Cost Optimization: Reduce 90% of manual design costs, accelerate material production cycle
  • Scalability: Batch generate hundreds of materials, maintain consistent style and quality

As Gemini 3 Pro series models continue to iterate, we expect character consistency functionality will be further enhanced:

  1. Support more characters (10+ characters maintaining consistency simultaneously)
  2. Provide finer localized editing control (hairstyle, clothing independent adjustment)
  3. Cross-modal consistency (from static images to video animation)
  4. Automated character library management (AI-assisted organization and annotation of reference images)

For brands, content creators and designers, now is the best time to adopt AI-assisted IP design. Recommend starting from small-scale testing, gradually building your own character library and workflow, fully leveraging Nano Banana Pro's unique advantages in consistency and efficiency.

🚀 Start Now: Recommend quickly experiencing Nano Banana Pro character consistency functionality through APIYI apiyi.com platform. The platform provides free trial credits, supports online character library management and batch generation, can start experimenting without complex configuration. Enterprise users can apply for brand IP customization solutions and technical support, accelerate AI-assisted design capability landing in business scenarios.

类似文章