22 C
New York
Wednesday, September 3, 2025

Google’s Nano-Banana Simply Unlocked a New Period of Picture Technology


Google’s Nano-Banana Simply Unlocked a New Period of Picture TechnologyGoogle’s Nano-Banana Simply Unlocked a New Period of Picture Technology
Picture by Creator | Gemini (nano-banana self portrait)

 

Introduction

 
Picture era with generative AI has grow to be a broadly used device for each people and companies, permitting them to immediately create their meant visuals while not having any design experience. Basically, these instruments can speed up duties that will in any other case take a major period of time, finishing them in mere seconds.

With the development of expertise and competitors, many fashionable, superior picture era merchandise have been launched, similar to Steady Diffusion, Midjourney, DALL-E, Imagen, and plenty of extra. Every gives distinctive benefits to its customers. Nonetheless, Google lately made a major affect on the picture era panorama with the discharge of Gemini 2.5 Flash Picture (or nano-banana).

Nano-banana is Google’s superior picture era and modifying mannequin, that includes capabilities like life like picture creation, a number of picture mixing, character consistency, focused prompt-based transformations, and public accessibility. The mannequin gives far better management than earlier fashions from Google or its opponents.

This text will discover nano-banana’s potential to generate and edit photos. We are going to show these options utilizing the Google AI Studio platform and the Gemini API inside a Python setting.

Let’s get into it.

 

Testing the Nano-Banana Mannequin

 
To observe this tutorial, you will have to register for a Google account and sign up to Google AI Studio. Additionally, you will want to amass an API key to make use of the Gemini API, which requires a paid plan as there isn’t any free tier out there.

When you choose to make use of the API with Python, be sure to put in the Google Generative AI library with the next command:

 

As soon as your account is ready up, let’s discover how you can use the nano-banana mannequin.

First, navigate to Google AI Studio and choose the Gemini-2.5-flash-image-preview mannequin, which is the nano-banana mannequin we shall be utilizing.

 
Nano Banana AINano Banana AI
 

With the mannequin chosen, you can begin a brand new chat to generate a picture from a immediate. As Google suggests, a basic precept for getting one of the best outcomes is to describe the scene, not simply listing key phrases. This narrative strategy, describing the picture you envision, sometimes produces superior outcomes.

Within the AI Studio chat interface, you may see a platform just like the one under the place you may enter your immediate.

 
Nano Banana AINano Banana AI
 

We are going to use the next immediate to generate a photorealistic picture for our instance.

A photorealistic close-up portrait of an Indonesian batik artisan, arms stained with wax, tracing a flowing motif on indigo material with a canting pen. She works at a picket desk in a breezy veranda; folded textiles and dye vats blur behind her. Late-morning window gentle rakes throughout the material, revealing nice wax strains and the grain of the teak. Captured on an 85 mm at f/2 for mild separation and creamy bokeh. The general temper is concentrated, tactile, and proud.

 

The generated picture is proven under:

 
Nano Banana AINano Banana AI
 

As you may see, the picture generated is life like and faithfully adheres to the given immediate. When you choose the Python implementation, you should use the next code to create the picture:

from google import genai
from google.genai import sorts
from PIL import Picture
from io import BytesIO
from IPython.show import show 

# Substitute 'YOUR-API-KEY' together with your precise API key
api_key = 'YOUR-API-KEY'
shopper = genai.Shopper(api_key=api_key)

immediate = "A photorealistic close-up portrait of an Indonesian batik artisan, arms stained with wax, tracing a flowing motif on indigo material with a canting pen. She works at a picket desk in a breezy veranda; folded textiles and dye vats blur behind her. Late-morning window gentle rakes throughout the material, revealing nice wax strains and the grain of the teak. Captured on an 85 mm at f/2 for mild separation and creamy bokeh. The general temper is concentrated, tactile, and proud."

response = shopper.fashions.generate_content(
    mannequin="gemini-2.5-flash-image-preview",
    contents=immediate,
)

image_parts = [
    part.inline_data.data
    for part in response.candidates[0].content material.components
    if half.inline_data
]

if image_parts:
    picture = Picture.open(BytesIO(image_parts[0]))
    # picture.save('your_image.png')
    show(picture)

 

When you present your API key and the specified immediate, the Python code above will generate the picture.

We’ve seen that the nano-banana mannequin can generate a photorealistic picture, however its strengths prolong additional. As talked about beforehand, nano-banana is especially highly effective for picture modifying, which we are going to discover subsequent.

Let’s strive prompt-based picture modifying with the picture we simply generated. We are going to use the next immediate to barely alter the artisan’s look:

Utilizing the offered picture, place a pair of skinny studying glasses gently on the artisan’s nostril whereas she attracts the wax strains. Guarantee reflections look life like and the glasses sit naturally on her face with out obscuring her eyes.

 

The ensuing picture is proven under:

 
Nano Banana AINano Banana AI
 

The picture above is similar to the primary one, however with glasses added to the artisan’s face. This demonstrates how nano-banana can edit a picture primarily based on a descriptive immediate whereas sustaining total consistency.

To do that with Python, you may present your base picture and a brand new immediate utilizing the next code:

from PIL import Picture

# This code assumes 'shopper' has been configured from the earlier step
base_image = Picture.open('/path/to/your/photograph.png')
edit_prompt = "Utilizing the offered picture, place a pair of skinny studying glasses gently on the artisan's nostril..."


response = shopper.fashions.generate_content(
    mannequin="gemini-2.5-flash-image-preview",
    contents=[edit_prompt, base_image])

 

Subsequent, let’s check character consistency by producing a brand new scene the place the artisan is trying immediately on the digicam and smiling:

Generate a brand new and photorealistic picture utilizing the offered picture as a reference for id: the identical batik artisan now trying up on the digicam with a relaxed smile, seated on the identical picket desk. Medium close-up, 85 mm look with comfortable veranda gentle, background jars subtly blurred.

 

The picture result’s proven under.

 
Nano Banana AINano Banana AI
 

We have efficiently modified the scene whereas sustaining character consistency. To check a extra drastic change, let’s use the next immediate to see how nano-banana performs.

Create a product-style picture utilizing the offered picture as id reference: the identical artisan presenting a completed indigo batik material, arms prolonged towards the digicam. Comfortable, even window gentle, 50 mm look, impartial background litter.

 

The result’s proven under.

 
Nano Banana AINano Banana AI
 

The ensuing picture exhibits a very completely different scene however maintains the identical character. This highlights the mannequin’s potential to realistically produce various content material from a single reference picture.

Subsequent, let’s strive picture fashion switch. We are going to use the next immediate to vary the photorealistic picture right into a watercolor portray.

Utilizing the offered picture as id reference, recreate the scene as a fragile watercolor on cold-press paper: unfastened indigo washes for the fabric, comfortable bleeding edges on the floral motif, pale umbers for the desk and background. Hold her pose holding the material, mild smile, and spherical glasses; let the veranda recede into gentle granulation and visual paper texture.

 

The result’s proven under.

 
Nano Banana AINano Banana AI
 

The picture demonstrates that the fashion has been reworked into watercolor whereas preserving the topic and composition of the unique.

Lastly, we are going to strive picture fusion, the place we add an object from one picture into one other. For this instance, I’ve generated a picture of a girl’s hat utilizing nano-banana:

 
Nano Banana AINano Banana AI
 

Utilizing the picture of the hat, we are going to now place it on the artisan’s head with the next immediate:

Transfer the identical lady and pose outdoor in open shade and place the straw hat from the product picture on her head. Align the crown and brim to the top realistically; bow over her proper ear (digicam left), ribbon tails drifting softly with gravity. Use comfortable sky gentle as key with a mild rim from the brilliant background. Preserve true straw and lace texture, pure pores and skin tone, and a plausible shadow from the brim over the brow and high of the glasses. Hold the batik material and her arms unchanged. Hold the watercolor fashion unchanged.

 

This course of merges the hat photograph with the bottom picture to generate a brand new picture, with minimal adjustments to the pose and total fashion. In Python, use the next code:

from PIL import Picture

# This code assumes 'shopper' has been configured from step one
base_image = Picture.open('/path/to/your/photograph.png')
hat_image = Picture.open('/path/to/your/hat.png')
fusion_prompt = "Transfer the identical lady and pose outdoor in open shade and place the straw hat..."

response = shopper.fashions.generate_content(
    mannequin="gemini-2.5-flash-image-preview",
    contents=[fusion_prompt, base_image, hat_image])

 

For greatest outcomes, use a most of three enter photos. Utilizing extra could scale back output high quality.

That covers the fundamentals of utilizing the nano-banana mannequin. For my part, this mannequin excels when you’ve present photos that you just wish to remodel or edit. It is particularly helpful for sustaining consistency throughout a collection of generated photos.

Attempt it for your self and do not be afraid to iterate, as you typically will not get the proper picture on the primary strive.

 

Wrapping Up

 
Gemini 2.5 Flash Picture, or nano-banana, is the most recent picture era and modifying mannequin from Google. It boasts highly effective capabilities in comparison with earlier picture era fashions. On this article, we explored how you can use nano-banana to generate and edit photos, highlighting its options for sustaining consistency and making use of stylistic adjustments.

I hope this has been useful!
 
 

Cornellius Yudha Wijaya is a knowledge science assistant supervisor and information author. Whereas working full-time at Allianz Indonesia, he likes to share Python and information suggestions through social media and writing media. Cornellius writes on a wide range of AI and machine studying matters.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles