Google 官方示範 Nano Banana 圖片生成與編輯技巧:提示詞策略全解析

從零開始學會如何用自然語言生成高品質圖片,並精準編輯細節,打造系列創作與連續場景

Google 官方示範 Nano Banana 圖片生成與編輯技巧:提示詞策略全解析

Nano Banana(即 Gemini 2.5 Flash Image)是 Google 最新推出的高效能文生圖模型,以「極速生成」與「高一致性」兩大優勢領先同級模型。其卓越的生成速度,搭配在連續編輯中精準保持人物特徵與物件細節的能力,特別適合用於敘事性創作、系列插圖或多場景設計,大幅提升創作效率與視覺連貫性。只需輸入簡單的自然語言提示,使用者即可輕鬆完成去背、風格轉換、背景替換、元素移除,甚至是多張影像的智慧融合,一鍵生成符合需求的全新畫面。這不僅降低設計門檻,更為創作者開啟前所未有的靈感可能。

這篇文章是根據 Google 官方文件所提及的內容,教你如何掌握專業的提示詞撰寫技巧,創作出令人驚豔的 AI 圖像作品。

Gemini 可以生成及處理圖片,並以對話方式提供相關資訊。你可以使用文字、圖片或兩者組合提示 Gemini,以前所未有的控制程度建立、編輯及反覆調整圖像:

  • Text-to-Image:根據簡單或複雜的文字描述生成高品質圖片。
  • 圖片 + 圖片生成文字 (編輯):提供圖片並使用文字提示新增、移除或修改元素、變更風格,或調整色彩分級。
  • 多張圖片生成圖片 (合成和風格轉換):使用多張輸入圖片合成新場景,或將一張圖片的風格套用至另一張圖片。
  • 反覆修正:透過對話逐步修正圖片,進行微調,直到滿意為止。
  • 高擬真度文字算繪:準確生成含有清晰易讀文字的圖片,並將文字妥善放置在適當位置,非常適合用於標誌、圖表和海報。

所有生成的圖像都會加上 SynthID 浮水印

Google 這次分享的是著重在文字生成與編輯圖片,每一項除了有提示詞的撰寫方法說明,也會給出範例。

§相關文章,還可以參閱:

提示撰寫指南和策略

如要精通 Gemini 2.5 Flash 圖片生成功能,請先掌握一項基本原則:

描述場景,不要只列出關鍵字。 這項模型的核心優勢在於深入理解語言,相較於不相關的字詞清單,敘事性描述段落幾乎都能產生更優質、更連貫的圖片。

生成圖像的提示

1. 擬真場景

若要生成真實感十足的圖片,建議在提示詞中融入專業攝影術語。具體描述相機角度、鏡頭類型(如廣角、定焦)、光影配置(如自然光、柔光、背光)以及細節層次(如紋理、質感、景深),能有效引導模型產出更具臨場感與寫實質感的高品質影像。

範本:

A photorealistic [shot type] of [subject], [action or expression], set in [environment]. The scene is illuminated by [lighting description], creating a [mood] atmosphere. Captured with a camera/lens details], emphasizing [key textures and details]. The image should be in a [aspect ratio] format.

Google 官方示範 Nano Banana 圖片生成與編輯技巧:提示詞策略全解析

範本所生成的提示詞:一位年長的日本陶藝家,以寫實風格拍攝的特寫肖像照...

A photorealistic close-up portrait of an elderly Japanese ceramicist with deep, sun-etched wrinkles and a warm, knowing smile. He is carefully inspecting a freshly glazed tea bowl. The setting is his rustic, sun-drenched workshop. The scene is illuminated by soft, golden hour light streaming through a window, highlighting the fine texture of the clay.Captured with an 85mm portrait lens, resulting in a soft, blurred background (bokeh). The overall mood is serene and masterful. Vertical portrait orientation.

2. 風格化插圖和貼紙

如要建立貼紙、圖示或素材資源,請明確指定樣式,並要求透明背景。

範本:

A [style] sticker of a [subject], featuring [key characteristics] and a [color palette]. The design should have [line style] and [shading style].The background must be transparent.

Google 官方示範 Nano Banana 圖片生成與編輯技巧:提示詞策略全解析

範本所生成的提示詞:一隻開心的紅熊貓,以可愛風格的貼紙呈現...

A kawaii-style sticker of a happy red panda wearing a tiny bamboo hat. It is munching on a green bamboo leaf. The design features bold, clean outlines,simple cel-shading, and a vibrant color palette. The background must be white.

3. 圖片中的文字準確

Gemini 擅長顯示文字,清楚說明文字、字型樣式 (描述性) 和整體設計。

範本:

Create a [image type] for [brand/concept] with the text "[text to render]" in a [font style]. The design should be [style description], with a [color scheme].

Google 官方示範 Nano Banana 圖片生成與編輯技巧:提示詞策略全解析

範本所生成的提示詞:為名為「The Daily Grind」的咖啡店設計現代簡約的標誌...

Create a modern, minimalist logo for a coffee shop called "The Daily Grind".The text should be in a clean, bold, sans-serif font. The design should feature a simple, stylized icon of a a coffee bean seamlessly integrated with the text. The color scheme is black and white.

4. 產品模型和商業攝影

非常適合為電子商務、廣告或品牌宣傳製作乾淨俐落的專業產品照。

範本:

A high-resolution, studio-lit product photograph of a [product description] on a [background surface/description]. The lighting is a [lighting setup,e.g., three-point softbox setup] to [lighting purpose]. The camera angle is a [angle type] to showcase [specific feature]. Ultra-realistic, with sharp focus on [key detail]. [Aspect ratio].

範本所生成的提示詞:為名為「The Daily Grind」的咖啡店設計現代簡約的標誌...

Google 官方示範 Nano Banana 圖片生成與編輯技巧:提示詞策略全解析

A high-resolution, studio-lit product photograph of a minimalist ceramic coffee mug in matte black, presented on a polished concrete surface. The lighting is a three-point softbox setup designed to create soft, diffused highlights and eliminate harsh shadows. The camera angle is a slightly elevated 45-degree shot to showcase its clean lines. Ultra-realistic, with sharp focus on the steam rising from the coffee. Square image.

5. 極簡風和負空間設計

非常適合用於建立網站、簡報或行銷素材的背景,並在上面疊加文字。

範本:

A minimalist composition featuring a single [subject] positioned in the [bottom-right/top-left/etc.] of the frame. The background is a vast, empty [color] canvas, creating significant negative space. Soft, subtle lighting.[Aspect ratio].

範本所生成的提示詞:以極簡風格呈現單一精緻的紅楓葉...

Google 官方示範 Nano Banana 圖片生成與編輯技巧:提示詞策略全解析

A minimalist composition featuring a single, delicate red maple leaf positioned in the bottom-right of the frame. The background is a vast, empty off-white canvas, creating significant negative space for text. Soft,diffused lighting from the top left. Square image.

6. 連續圖像 (漫畫格 / 分鏡腳本)

以角色一致性和場景描述為基礎,為視覺敘事建立面板。

範本:

A single comic book panel in a [art style] style. In the foreground,[character description and action]. In the background, [setting details].The panel has a [dialogue/caption box] with the text "[Text]". The lighting creates a [mood] mood. [Aspect ratio].

範本所生成的提示詞:以粗獷的黑色電影藝術風格呈現的單一漫畫格...

Google 官方示範 Nano Banana 圖片生成與編輯技巧:提示詞策略全解析

A single comic book panel in a gritty, noir art style with high-contrast black and white inks. In the foreground, a detective in a trench coat stands under a flickering streetlamp, rain soaking his shoulders. In the background, the neon sign of a desolate bar reflects in a puddle. A caption box at the top reads "The city was a tough place to keep secrets." The lighting is harsh, creating a dramatic, somber mood. Landscape.

※以上的提示詞範本,只要將[]中的內容,替換成自己的,這樣就能輕鬆生成出你想要的圖片了。

編輯圖片的提示

1. 新增及移除元素

提供圖片並說明變更內容。模型會與原始圖片的風格、光線和透視效果相符。

範本:

Using the provided image of [subject], please [add/remove/modify] [element] to/from the scene. Ensure the change is [description of how the change should integrate].

Google 官方示範 Nano Banana 圖片生成與編輯技巧:提示詞策略全解析

範本所用的提示詞:

Using the provided image of my cat, please add a small, knitted wizard hat on its head. Make it look like it is sitting comfortably and matches the soft lighting of the photo.

2. 局部重繪 (語意遮蓋)

以對話方式定義「遮罩」,編輯圖片的特定部分,同時保留其他部分。

範本:

Using the provided image, change only the [specific element] to [new element/description]. Keep everything else in the image exactly the same, preserving the original style, lighting, and composition.

Google 官方示範 Nano Banana 圖片生成與編輯技巧:提示詞策略全解析

範本所用的提示詞:

Using the provided image of a living room, change only the blue sofa to be a vintage, brown leather chesterfield sofa. Keep the rest of the room, including the pillows on the sofa and the lighting, unchanged.

3. 風格轉換

提供圖片,要求模型以不同藝術風格重新創作圖片內容。

範本:

Transform the provided photograph of [subject] into the artistic style of [artist/art style]. Preserve the original composition but render it with [description of stylistic elements].

Google 官方示範 Nano Banana 圖片生成與編輯技巧:提示詞策略全解析

範本所用的提示詞:

Transform the provided photograph of a modern city street at night into the artistic style of Vincent van Gogh is "Starry Night". Preserve the original composition of buildings and cars, but render all elements with swirling, impasto brushstrokes and a dramatic palette of deep blues and bright yellows.

4. 進階合成:合併多張圖片

提供多張圖片做為情境,建立新的複合場景。非常適合製作產品模型或創意拼貼。

範本:

Create a new image by combining the elements from the provided images. Take the [element from image 1] and place it with/on the [element from image 2].The final image should be a [description of the final scene].

Google 官方示範 Nano Banana 圖片生成與編輯技巧:提示詞策略全解析

範本所用的提示詞:

Create a professional e-commerce fashion photo. Take the blue floral dress from the first image and let the woman from the second image wear it.Generate a realistic, full-body shot of the woman wearing the dress, with the lighting and shadows adjusted to match the outdoor environment.

5. 保留高保真細節

為確保編輯時保留重要細節 (例如臉部或標誌),請詳細描述這些細節,並一併提出編輯要求。

範本:

Using the provided images, place [element from image 2] onto [element from image 1]. Ensure that the features of [element from image 1] remain completely unchanged. The added element should [description of how the element should integrate].

Google 官方示範 Nano Banana 圖片生成與編輯技巧:提示詞策略全解析

範本所用的提示詞:

Take the first image of the woman with brown hair, blue eyes, and a neutral expression. Add the logo from the second image onto her black t-shirt.Ensure the woman is face and features remain completely unchanged. The logo should look like it is naturally printed on the fabric, following the olds of the shirt.

Google 也在文字提出如要讓成果從良好提升至優異,請將下列專業策略納入工作流程。

最佳做法

  • 具體說明:提供的詳細資訊越多,您就越能掌控生成結果。請改為詳細描述,例如「精緻的精靈板甲,刻有銀葉圖案,高領,肩甲形狀像獵鷹翅膀」,而不是「奇幻盔甲」。
  • 提供背景資訊和意圖:說明圖片的用途。模型對背景資訊的理解程度會影響最終輸出內容。舉例來說,「為高檔簡約護膚品牌設計標誌」比「設計標誌」更能產生理想結果。
  • 反覆測試及修正:請勿期待第一次就能生成完美圖片。運用模型的對話性質進行小幅變更。接著輸入「這很棒,但可以讓光線暖一點嗎?」或「維持所有設定,但將角色的表情改為更嚴肅。」等提示。
  • 使用逐步指示:如果場景複雜且包含許多元素,請將提示分成多個步驟。「首先,請在黎明時分製作寧靜的霧林背景。接著,在前景中加入長滿青苔的古老石祭壇。 最後,將一把發光的劍放在祭壇上。」
  • 使用「語意負面提示」:不要說「沒有車輛」,而是正面描述想要的場景:「空蕩蕩的荒涼街道,沒有任何交通跡象」。
  • 控制攝影機:使用攝影和電影語言控制構圖。例如wide-angle shot、macro shot、low-angle perspective。

Google 在這篇文章中,有三個重點:

  • 以程式碼示範如何根據描述性提示生成圖片與圖像編輯 (文字和圖像轉圖像)
  • 提供生成圖像的提示範本與利用範本生成的提示詞及所生成的圖像
  • 提供編輯圖片的提示範本與利用範本編輯的提示詞及編輯後所生成的圖像

該文章對想入門 Gemini 2.5 Flash Image 是個非常好的教學文章,大家也可以到官網閱讀本篇文章沒有寫到的部分,另外,以上所有的範本、提示詞及圖片均來自Google AI for Developers。