![]()
直接和官方學習最頂級的nano banana 提示技巧,這比你看多少碎片文章和視頻都強
Nano Banana 太火了,谷歌趁熱打鐵,剛剛推出了官方認證的的Nano Banana使用指南,指南一共有六條提示詞模板和具體示例,可以在 Google AI Studio (ai.studio/banana) 中立即體驗這些功能,或通過官方文檔中的代碼進行調用
![]()
不熟悉的同學可以速覽一下Nano Banana(即 Gemini 2.5 Flash Image 圖像模型) 的核心功能:
文生圖 (Text-to-image): 從簡單或復雜的文本描述中生成高質量圖像
圖+文生圖 (編輯): 提供一張圖片,通過文本指令添加、移除或修改元素,改變風格或調整色彩
多圖生圖 (合成與風格遷移): 使用多張輸入圖像來構圖新場景,或將一張圖像的風格遷移到另一張上
迭代優化: 通過多輪對話逐步優化圖像,進行微調直至完美
文字渲染: 生成包含清晰、位置得當文字的圖像,非常適合用于徽標、圖表和海報
本指南將教會你如何編寫有效的提示詞 (prompt) 和指令,以充分發揮 nano banana 的潛力。這一切都始于一個基本原則:
描述場景,而非羅列關鍵詞,nano banana 的核心優勢在于其深度的語言理解能力。與一堆零散的關鍵詞相比,一段敘事性的、富有描述力的段落幾乎總能生成更優質、更連貫的圖像
廢話不多說,直接上干貨
Nano Banana 六大提示詞技巧 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.
示例提示詞:
一張照片級的特寫肖像,主角是一位年邁的日本陶藝家,他臉上布滿被陽光雕刻出的深深皺紋,帶著溫暖而會意的微笑。他正在仔細端詳一個剛上釉的茶碗。背景是他那間充滿陽光的鄉村風格工作室。柔和的金色黃昏光線從窗戶射入,照亮了黏土的細膩紋理。使用 85mm 人像鏡頭拍攝,背景柔和模糊(焦外成像)。整體氛圍寧靜而充滿大師風范。豎向構圖
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.
![]()
代碼調用:
from google import genai from google.genai import types from PIL import Image from io import BytesIO client = genai.Client() # Generate an image from a text prompt response = client.models.generate_content( model="gemini-2.5-flash-image-preview", contents="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 with pottery wheels and shelves of clay pots in the background. The scene is illuminated by soft, golden hour light streaming through a window, highlighting the fine texture of the clay and the fabric of his apron. Captured with an 85mm portrait lens, resulting in a soft, blurred background (bokeh). The overall mood is serene and masterful.", ) image_parts = [ part.inline_data.data for part in response.candidates[0].content.parts if part.inline_data ] if image_parts: image = Image.open(BytesIO(image_parts[0])) image.save('photorealistic_example.png') image.show()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 white.
示例提示詞 :
一張卡哇伊風格的貼紙,畫的是一只快樂的小熊貓,戴著一頂小小的竹帽,正在咀嚼一片綠色的竹葉。設計采用粗大、清晰的輪廓線,賽璐璐風格的簡單著色,以及鮮艷的調色板。背景必須為白色
A kawaii-style sticker of a happy red panda wearing a tiny bamboo hat. It's 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
![]()
代碼調用:
from google import genai from google.genai import types from PIL import Image from io import BytesIO client = genai.Client() # Generate an image from a text prompt response = client.models.generate_content( model="gemini-2.5-flash-image-preview", contents="A kawaii-style sticker of a happy red panda wearing a tiny bamboo hat. It's 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.", ) image_parts = [ part.inline_data.data for part in response.candidates[0].content.parts if part.inline_data ] if image_parts: image = Image.open(BytesIO(image_parts[0])) image.save('red_panda_sticker.png') image.show()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].
示例提示詞 :
為一家名為“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 coffee bean seamlessly integrated with the text. The color scheme is black and white
![]()
代碼調用:
from google import genai from google.genai import types from PIL import Image from io import BytesIO client = genai.Client() # Generate an image from a text prompt response = client.models.generate_content( model="gemini-2.5-flash-image-preview", contents="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.", ) image_parts = [ part.inline_data.data for part in response.candidates[0].content.parts if part.inline_data ] if image_parts: image = Image.open(BytesIO(image_parts[0])) image.save('logo_example.png') image.show()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].
示例提示詞 :
一張高分辨率、影棚光拍攝的產品照片,主體是一個極簡主義風格的啞光黑陶瓷咖啡杯,放在一個拋光的混凝土地面上。燈光采用三點式柔光箱設置,旨在創造柔和、漫射的高光并消除刺眼的陰影。相機采用略微俯視的45度角拍攝,以展示其簡潔的線條。效果超逼真,焦點清晰地對準從咖啡中升起的熱氣。方形圖像
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.
![]()
代碼調用:
from google import genai from google.genai import types from PIL import Image from io import BytesIO client = genai.Client() # Generate an image from a text prompt response = client.models.generate_content( model="gemini-2.5-flash-image-preview", contents="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.", ) image_parts = [ part.inline_data.data for part in response.candidates[0].content.parts if part.inline_data ] if image_parts: image = Image.open(BytesIO(image_parts[0])) image.save('product_mockup.png') image.show()5. 極簡主義與留白設計這種風格非常適合為網站、ppt或需要疊加文字的營銷材料創建背景
模板:
一幅極簡主義構圖,畫面中只有一個[主體],位于畫面的[右下角/左上角等位置]。背景是一塊巨大的、空白的[顏色]畫布,創造出大量的留白空間。光線柔和而微妙。[寬高比]。
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].
示例提示詞 :
一幅極簡主義構圖,畫面中只有一片精致的紅色楓葉,位于畫面的右下角。背景是一塊巨大的、空白的米白色畫布,為文字留下充足的留白空間。柔和的漫射光從左上方照來。方形圖像。
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
![]()
from google import genai from google.genai import types from PIL import Image from io import BytesIO client = genai.Client() # Generate an image from a text prompt response = client.models.generate_content( model="gemini-2.5-flash-image-preview", contents="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.", ) image_parts = [ part.inline_data.data for part in response.candidates[0].content.parts if part.inline_data ] if image_parts: image = Image.open(BytesIO(image_parts[0])) image.save('minimalist_design.png') image.show()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].
示例提示詞:
一個單格漫畫,采用粗糲的黑色電影藝術風格,配以高對比度的黑白墨水畫。前景中,一名身穿風衣的偵探站在一盞閃爍的路燈下,雨水浸濕了他的肩膀。背景中,一家荒涼酒吧的霓虹燈招牌倒映在水坑里。頂部的標題框寫著:“這座城市,秘密無處藏身。” 光線刺眼,營造出一種戲劇化而陰郁的氛圍。橫向構圖。
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.
![]()
from google import genai from google.genai import types from PIL import Image from io import BytesIO client = genai.Client() # Generate an image from a text prompt response = client.models.generate_content( model="gemini-2.5-flash-image-preview", contents="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.", ) image_parts = [ part.inline_data.data for part in response.candidates[0].content.parts if part.inline_data ] if image_parts: image = Image.open(BytesIO(image_parts[0])) image.save('comic_panel.png') image.show()參考:
https://x.com/googleaistudio/status/1962957615262224511
特別聲明:以上內容(如有圖片或視頻亦包括在內)為自媒體平臺“網易號”用戶上傳并發布,本平臺僅提供信息存儲服務。
Notice: The content above (including the pictures and videos if any) is uploaded and posted by a user of NetEase Hao, which is a social media platform and only provides information storage services.