Skip to main content

Short answer

Distorted prints with Nano Banana Pro are not a model failure — they come from two stacked causes: inherent randomness in single-shot generation plus overly assertive prompts. Use this order:
  1. First reproduce with the same prompt + reference images on imagen.apiyi.com to rule out client-side issues
  2. Rewrite the prompt: drop absolute phrases like “strictly lock” or “pixel-perfect restore”; use concrete color / position / preserve-item descriptions instead
  3. Upload clear, well-defined reference images using Base64 encoding (Nano Banana series does NOT support OpenAI-style URL uploads)
  4. Enable multi-roll retries: have your business code auto-retry the same prompt 1~3 times
  5. If still no luck, switch channel or model: banana pro defaults to AI Studio — switch to the Vertex group, or try the gpt-image-2 series (whose edit style stays closer to the source)

Why prints get distorted

AI image generation is single-shot atomic sampling — every call is an independent draw, with no “strict restore” toggle. The two most common culprits:
  • Overly assertive prompt phrasing: phrases like “strictly lock in place”, “pixel-perfect restore”, or “1:1 reproduce” can make the model interpret the request as “redraw it”, and the print gets redrawn along with everything else
  • Wrong reference-image upload format: Nano Banana series only supports Base64-encoded uploads. Pasting a URL directly into the OpenAI-compatible image_url field makes the model “not see” the reference, so the print is free to drift
Even with a perfect description, the model will still “wander” in roughly 5%~15% of single-shot samples. This is not a defect — it is inherent to generative models: the same prompt naturally yields different results across calls.

Step-by-step troubleshooting

1

Reproduce in the test tool to rule out client issues

Open imagen.apiyi.com/#generate and run the exact same prompt + reference images again:
  • Print is also distorted in the tool → most likely a prompt issue, go to Step 2
  • Print is preserved in the tool → debug your integration (image actually uploaded? parameters correct?), see Generated image differs too much from reference
2

Rewrite the prompt, drop absolute phrasing

Replace command-style language like “strictly restore” or “pixel-perfect” with concrete attribute descriptions (see “Prompt optimization examples” below).
3

Make sure reference images are uploaded correctly

  • Nano Banana series does NOT support OpenAI-format URL uploads — you must use Base64
  • Reference images should be clear and feature-rich: blurry or cluttered references force the model to “guess”, making prints more likely to drift
  • Single image ≤ 7MB (Gemini’s official limit) — lossless compression recommended before upload
  • Each prompt accepts up to 14 reference images; if you only need to preserve one print, upload just that close-up and raise its weight
4

Enable multi-roll retries (auto retry)

In your business code, implement 1~3 automatic retries for the same prompt. One failed attempt doesn’t mean the model is broken — more rolls significantly raise the hit rate.
5

Switch channel or model as fallback

  • Switch to the Vertex group (just pick the Vertex group when editing the token in the console — no code change) — Vertex’s moderation differs from AI Studio’s, and some outfit-swap requests that get falsely flagged on AI Studio pass cleanly on Vertex
  • Or try the gpt-image-2 series — its edit style stays closer to the source image, with less color drift and style shift, ideal when “stay close to the original” is the priority

Prompt optimization examples

Below is a bad-vs-good comparison table for the outfit swap + print preservation scenario: Improved full prompt example:
Edit this image. Complete two things: ① Change the two teapots inside the red box to matte pure black, preserving the original material texture and shape; ② Delete the red box outline itself. The color, position, dimension labels, and text of all other objects in the image must remain completely unchanged.
General principle: change one category per call. If your outfit swap needs “change color + change background + add text”, split it into multiple edits — each call’s success rate will be noticeably higher than one mega-instruction.

About overall red / warm color tint

If you notice the whole image skews red or warm after the swap, that’s a different problem — its usual cause is banana pro edit results in overall red tint. The causes and fixes are different from print distortion (switch to Vertex channel or fall back to gpt-image-2).

Contact support

If the steps above still don’t resolve it, contact support in the workspace or email [email protected] with:
  • Reproduction result of the same prompt in imagen.apiyi.com (screenshot or link)
  • The model name you’re using (e.g. gemini-3-pro-image-preview / Nano Banana 2)
  • API call timestamp + request ID (if available)