Subscribe to mailing list

Get notified when we have new updates or new posts!

Subscribe Unicorn Data Science cover image
jen@unicornds.org profile image jen@unicornds.org

Nano Banana One Day Tour: Dog and Monsters

Google's new nano-banana image model is genuinely impressive. It's an image editor, graphic asset designer, and creative collaborator rolled into one. Plus, GPU not required!

Nano Banana One Day Tour: Dog and Monsters
Generated with nano banana. Original image from Wikipedia. Note the "DOGGO" replacing "MARIO" on the top left. I didn't prompt nano banana to do this. It just did. I felt so seen.

I've been having toe cramps lately. So the timing worked out great when Google released the new Gemini image model, codenamed nano-banana. So put on some Hollaback Girl, grab a pillow, and let's make some pics and giggles!

Prerequisites

  • A Gemini API key (from Google AI Studio)
  • We will use the python Google Gen AI SDK. And again, using uv for python project.
  • In any folder, initialize the project and add dependencies:
> uv init
> uv add google-genai pillow

Then we can follow the simple instruction to try out nano-banana's capabilities.

Image Editing

I wonder how many fictional bananas was generated by Gemini over the last few days following the developer guide. Well, we are contributing. Starting from an input image, it's extremely easy to edit the scene.

Merch Generation

Who doesn't love stickers? With Jack the corgi again serving as the starting template, we asked Gemini to make a sticker, a plushie, and a 3D figurine.

Iterative Editing

A super cool functionality of nano-banana is that it can be used as part of a chat (chat mode), making iteratively refining the image very easy. So, starting from the corgi figurine, we asked nano-banana to rotate it left and right, and chained the results into a gif.

🥹🥹🥹

Monster Bake-Off

It's really quite wild how fast AI is moving in the last few years. So I looked up what I did for "genuary" back in January 2024. At that time, I was using SDXL from Hugging Face. And the theme for January 24, 2024 was "Impossible objects (undecided geometry)." So I made a bunch of impossible monsters with Stable Diffusion, running on GPU on Google Colab. To test how well the image model could handle "impossible" and "unrealistic" instructions, the prompts were intentionally difficult to satisfy (I thought). Now, reusing the same prompts, let's see how nano banana compares.

Like many people have already attested, nano-banana is versatile, fun, and easy to work with. Comparing with running a stable diffusion model in Colab just last year, which required a subscription upgrade, the Gemini image model runs smoothly on my 6-year-old laptop, and never had memory issue that I encountered frequently before. Pretty impressive stuff!