![]()
【本文翻譯自 Google 官方文檔】
Gemini 2.5 Flash Image(又名 Nano Banana) 是 Google 最新一代的多模態模型,速度更快、效率更高。它的特別之處在于架構從一開始就為“文本+圖像”而設計,可以在同一步里處理兩種輸入。
這意味著它不僅能生成圖像,還能做更復雜的事:比如用對話方式修改圖像、多張圖像的合成,甚至能對畫面內容進行邏輯推理。
它能做的事包括:
文生圖:根據簡單或復雜的文本描述生成高質量圖像。
圖像 + 文生圖:上傳一張圖,再用文字提示去加、刪或改元素,換風格、調顏色。
多圖像到圖像(合成&風格遷移):把多張圖片合成一張新圖,或者做風格遷移。
迭代優化:一輪輪對話中逐步調整圖像。
文本渲染:生成帶清晰文字的圖像,用于 logo、圖表或海報。
使用它時的核心原則是:盡量用完整描述來描繪場景,而不是只丟關鍵詞。因為 Gemini 的強項是語言理解,寫成小故事式的提示往往比關鍵詞堆砌效果好。
你可以在官方文檔里用代碼試試,或者直接在 Google AI Studio 上動手。
文生圖
文本生成圖像的幾種常見方式:
照片級真實感
想要逼真的效果,就像攝影師一樣描述:鏡頭角度、光線、細節都會影響結果。
模板:
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.
一個逼真的[拍攝類型]的[主體],[動作或表情],設定在[環境]中。場景由[光照描述]照亮,營造出[氛圍]的氣氛。使用[相機/鏡頭細節]拍攝,強調[關鍵紋理和細節]。圖像應為[畫幅比例]格式。
示例提示:
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.
一個逼真的特寫肖像,描繪一位日本老年陶藝家,他有著深深的日曬皺紋和溫暖的、知性的微笑。他正在仔細檢查一個剛上釉的茶碗。背景是他那間陽光明媚的鄉村工作室。場景由透過窗戶的柔和、黃金時刻的光線照亮,突出了泥土的精細紋理。使用 85mm 肖像鏡頭拍攝,產生了柔和的模糊背景(淺景深)。整體氛圍是寧靜而精湛的。垂直肖像方向。
示例輸出:
![]()
▲ photorealistic close-up portrait of an elderly Japanese ceramicist
風格化插畫與貼紙
要創建貼紙或圖標,記得把風格寫清楚,還要特別要求“背景必須是白色”。
模板:
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.
一個可愛的風格貼紙,展示了一只穿著小竹帽的開心紅熊貓,它正在啃食一片綠色的竹葉。設計特點是有粗獷、干凈的輪廓,簡單的賽璐璐著色,以及鮮艷的色彩搭配。背景必須是白色。
示例輸出:
![]()
▲ A kawaii-style sticker of a happy red panda…
圖像里的文字
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].
為 [品牌/概念] 創建一個 [圖片類型],其中包含文字 "[要渲染的文字]",使用 [字體樣式]。設計應為 [風格描述],采用 [配色方案]。
示例提示:
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.
為名為"The Daily Grind"的咖啡店設計一個現代、極簡風格的標志。文字應使用干凈、粗體的無襯線字體。設計應包含一個簡單的、風格化的咖啡豆圖標,與文字無縫融合。配色方案為黑白。
示例輸出:
![]()
▲ Create a modern, minimalist logo for a coffee shop called ‘The Daily Grind’…
產品模型與商業攝影
創建干凈、專業的產品照片,適用于電商、廣告或品牌推廣。
模板:
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].
一張高分辨率的、在[背景表面/描述]上的[產品描述]的影棚燈光產品照片。燈光設置為[燈光設置,例如,三點柔光箱設置]以達到[燈光目的]。相機角度為[角度類型]以展示[特定功能]。超逼真,對[關鍵細節]有清晰的焦點。[寬高比]。
示例提示:
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.
一張高分辨率的、在攝影棚燈光下拍攝的最小主義陶瓷咖啡杯照片,呈現在拋光混凝土地面上。燈光采用三點式柔光箱設置,旨在創造柔和的漫反射高光并消除刺眼的陰影。相機角度略微抬高45度,以展示其簡潔的線條。超逼真,焦點清晰地對準從咖啡中升起的蒸汽。方形圖像。
示例輸出:
![]()
▲ A high-resolution, studio-lit product photograph of a minimalist ceramic coffee mug…
極簡與留白設計
創建網站、演示文稿或營銷材料的背景圖,便于疊加文字。
模板:
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.
一個極簡的構圖,在畫面的右下角放置了一片精致的紅色楓葉。背景是一個廣闊、空曠的淺白色畫布,為文字創造了顯著的內負空間。光線柔和、漫射,來自左上方。方形圖像。
示例輸出:
![]()
▲ A minimalist composition featuring a single, delicate red maple leaf…
連環畫 / 分鏡
逐格創造視覺敘事,適用于分鏡腳本、連環畫或其他形式的連續藝術。
模板:
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.
一個采用硬漢、黑色電影藝術風格的漫畫書面板,采用高對比度的黑白墨水。前景是一個穿著風衣的偵探站在搖曳的街燈下,雨水浸濕了他的肩膀。背景是一個荒涼的酒吧的霓虹燈招牌在積水中反射。頂部有一個標題框,寫著“這座城市是保守秘密的艱難之地。”光照強烈,營造出戲劇性和憂郁的氛圍。橫版。
示例輸出:
![]()
▲ A single comic book panel in a gritty, noir art style…
圖像編輯
這里是 Gemini 2.5 Flash Image 多模態真正的強項。你可以在文本提示的同時提供一張或多張圖像,進行編輯、合成或風格遷移。
圖像編輯:添加與刪除元素
提供一張圖像,然后描述你希望的變化。模型會分析原圖的風格、光線和視角,使編輯看起來自然,并在系列圖像中保持角色一致性。
模板:
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].
使用提供的[主體]圖片,請[添加/移除/修改][元素]到/從場景中。確保更改能夠[描述更改應如何整合]。
示例提示:
Using the provided image of my cat, please add a small, knitted wizard hat on its head. Make it look like it’s sitting comfortably and matches the soft lighting of the photo.
使用我提供的貓的圖片,請在它的頭上加一頂小型的針織巫師帽。讓它看起來像是舒適地坐著,并且與照片的柔和光線相匹配。
示例輸入和輸出:
![]()
局部區域編輯
你可以對 Gemini 2.5 Flash Image 說,只修改圖像的一部分,而保持其余完全不變。
模板:
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.
使用提供的圖像,只將 [特定元素] 更改為 [新元素/描述]。保持圖像中的其他所有內容完全相同,保留原始風格、光照和構圖。
示例提示:
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.
使用提供的客廳圖片,僅將藍色的沙發更改為一件復古、棕色皮革的切斯特菲爾德沙發。保持房間其余部分,包括沙發上的枕頭和照明,不變。
示例輸入和輸出:
![]()
風格遷移(Style transfer)
提供一張照片,讓模型將內容以某種藝術風格重現。
模板:
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].
將提供的[主題]照片轉化為[藝術家/藝術風格]的藝術風格。保留原始構圖,但使用[風格元素描述]進行渲染。
示例提示:
Transform the provided photograph of a modern city street at night into the artistic style of Vincent van Gogh’s ‘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.
將提供的現代城市街道夜景照片轉化為文森特·梵高的《星夜》藝術風格。保留建筑物和汽車的原有構圖,但使用旋轉的厚涂筆觸和深藍色與亮黃色的戲劇性調色板來渲染所有元素。
示例輸入和輸出:
![]()
高級合成:多圖合成
提供多張圖像作為參考,生成一個全新的合成場景。這適用于產品 模型(Mockup) 或創意拼貼。
模板:
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].
通過組合提供的圖像中的元素來創建一個新的圖像。將[圖像1中的元素]放置在[圖像2中的元素]上/旁邊。最終圖像應呈現[最終場景的描述]。
示例提示:
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 an outdoor environment.
創建一張專業的電子商務時尚照片。將第一張圖片中的藍色花卉連衣裙拿給第二張圖片中的女人穿上。生成一張穿著連衣裙的女士全身真實照片,調整燈光和陰影以匹配戶外環境。
示例輸入和輸出:
![]()
最佳實踐
在構建過程中,以下是一些與圖像生成相關的小技巧:
描述要非常具體:細節越多,控制力越強。例如,不要只寫“幻想盔甲(fantasy armor)”,而是寫“裝飾華麗的精靈板甲,刻有銀葉圖案,帶有高領和鷹翼形狀的肩甲。(ornate elven plate armor, etched with silver leaf patterns, with a high collar and pauldrons shaped like falcon wings)”。
修正角色一致性:如果反復編輯后角色特征出現偏差,可以重新開始對話,并用更詳細的描述保持一致。
提供上下文與用途:說明圖像的用途會有助于模型。例如,“為一家高端、極簡風護膚品牌設計 logo(Create a logo for a high-end, minimalist skincare brand)”會比單純“創建一個 logo(create a logo)”效果更好。
迭代與優化:不要期望第一次就完美。利用對話式交互進行小改動,例如“很好,但能讓光線更暖一點嗎?”或“保持其他不變,把人物表情改得更嚴肅些。”
使用“語義否定提示”:與其說“no cars”,不如正面描述“一條空曠、荒涼的街道,沒有交通跡象。(an empty, deserted street with no signs of traffic)”。
保持縱橫比:Gemini 2.5 Flash Image 通常會保留輸入圖像的縱橫比。如果沒有,請在提示中明確指出:“Update the input image… Do not change the input aspect ratio.”
如果您上傳了具有不同寬高比的多個圖像,模型將采用提供的最后一個圖像的寬高比。如果您需要為新圖像指定特定的寬高比,而提示沒有產生所需效果,最佳做法是在提示中包含一個具有正確尺寸的參考圖像。
鏡頭控制:使用攝影和電影語言來控制構圖。諸如廣角鏡頭(wide-angel shot) 、 微距鏡頭(macro shot) 、 低角度視角(low angle perspective) 、85mm 人像鏡頭(85mm portrait lens)和傾斜角度(Dutch angle)等術語讓你能夠精確控制最終圖像。
局限性
我們在持續改進模型的過程中,希望對不足之處保持坦誠。
雖然 Gemini 2.5 Flash Image 功能強大且靈活,但對于一些復雜、細膩的請求,想在第一次就做到完美并不容易,往往需要多次嘗試。
比如在生成復雜的排版,或在多張圖片中保持角色特征完全一致時,可能需要通過追加提示來微調。
我們正在積極改進這些問題,也感謝你在探索過程中展現的創造力——這將幫助我們共同打造下一代圖像工具。
下一步?動手創作吧!
你已經具備了用 Gemini 2.5 Flash 制作和編輯精美圖像的基礎技能。要提升效果,最好的方式就是不斷實踐。以下資源可以幫你繼續深入:
在 Google AI Studio 中體驗 Gemini:用網頁工具快速上手本指南里的技巧。
閱讀官方文檔:面向希望在自己應用中集成 Gemini 2.5 Flash 圖像生成功能的開發者。
查看價格信息:了解通過 Gemini API 使用 Gemini 2.5 Flash Image 生成時涉及的費用。
嘗試 Image Editing Applet:體驗 AI 照片編輯,套用創意濾鏡,或僅憑簡單文本指令完成專業調整。
本文由 「AI 范兒」出品,關注我,一起體驗最酷的 AI 應用!
特別聲明:以上內容(如有圖片或視頻亦包括在內)為自媒體平臺“網易號”用戶上傳并發布,本平臺僅提供信息存儲服務。
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.