從「單字」到「詩意」:掌握10個提示工程心法,釋放Gemini AI圖像生成力

AI 生成的圖片:一隻貓正在吃奈米香蕉
AI 生成的圖片:一隻貓正在吃奈米香蕉

從「單字」到「詩意」:掌握10個提示工程心法,釋放Gemini AI圖像生成力

前言

當你初次接觸AI圖像生成工具,是否曾感到挫折?輸入幾個關鍵字,卻只得到一些模糊不清、與想像相差甚遠的圖片。這時你可能會懷疑:是AI不夠強大,還是我不會「對話」?

這篇文章將帶你進入 「提示工程」(Prompt Engineering) 的世界,特別是針對Google的最新模型 Gemini (前身為 Nano Banana)。它不僅僅是一門技術,更是一種與AI協作的藝術。我們將從「描述場景」這個基本原則出發,透過10個實用的心法與範例,教你如何從簡單的「關鍵字」使用者,進化為能夠精準駕馭AI、生成超乎想像圖像的「創作者」。


Gemini (Nano Banana) 的圖像生成與編輯能力

Gemini 是一個多模態(Multimodal)模型,這意味著它能理解文字、圖片,甚至兩者混合的指令,從而提供前所未有的創作自由度:

  • Text-to-Image(文字生成圖片):根據文字描述產生全新的視覺內容。
  • Image-to-Image(圖片編輯與風格轉換):在提供的圖片基礎上進行修改、新增或移除元素。
  • 多圖生成(合成與拼貼):結合多張圖片的元素,創造出全新的複合場景。
  • 高保真度文字算繪:能準確地在圖片中生成清晰可讀的文字,這對於設計標誌、海報或圖表尤其重要。
  • 對話式反覆修正:透過對話逐步微調圖像,讓創作過程更直觀。

所有透過Gemini生成的圖像,都會加上 SynthID 浮水印,這確保了圖像的可追溯性與真實性,符合當今AI倫理與內容來源透明化的趨勢。


掌握圖像生成提示的六大心法

要精通Gemini的圖像生成功能,最核心的原則是:描述場景,不要只列出關鍵字。AI模型透過語言理解來建構畫面,一段敘事性的描述遠比一串不相關的關鍵字清單,更能產生精準且連貫的結果。

攝影術語:創造擬真場景的魔法

如果你的目標是生成具有真實感的照片,請像一位專業攝影師一樣思考。使用攝影術語能精準引導AI生成理想的光線、氛圍與細節。

一位年長的日本陶藝家,以寫實風格拍攝的特寫肖像照...
一位年長的日本陶藝家,以寫實風格拍攝的特寫肖像照...

範本

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.

解析

  • 主體:詳細描述人物特徵(「deep, sun-etched wrinkles」)與表情(「a warm, knowing smile」)。
  • 環境:設定具體場景(「his rustic, sun-drenched workshop」)。
  • 光線:使用專業詞彙(「soft, golden hour light streaming through a window」)來營造氛圍。
  • 鏡頭:指定鏡頭類型(「85mm portrait lens」)與效果(「soft, blurred background (bokeh)」)。
  • 情感:定義圖片的整體情緒(「serene and masterful」)。

極簡與負空間:為文字預留呼吸

如果你需要為網站、簡報或行銷素材製作背景,並在上面疊加文字,負空間(Negative Space)設計是極佳的選擇。

以極簡風格呈現單一精緻的紅楓葉...
以極簡風格呈現單一精緻的紅楓葉...

範本

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.

解析

  • 構圖:明確指定物體位置(「positioned in the bottom-right」)。
  • 負空間:要求一個廣闊、空白的背景(「a vast, empty off-white canvas」),並說明其用途(「creating significant negative space for text」)。

連續圖像:說一個視覺故事

如果你正在為漫畫、故事板或動畫設計分鏡,Gemini可以幫你創建具有一致角色和場景的面板。

以粗獷的黑色電影藝術風格呈現的單一漫畫格...
以粗獷的黑色電影藝術風格呈現的單一漫畫格...

範本

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.

解析

  • 風格:明確指定藝術風格(「gritty, noir art style」)與繪畫技法(「high-contrast black and white inks」)。
  • 前景與背景:詳細描述前景與背景的元素與動作。
  • 文字:直接指定畫面中應包含的文字內容(「A caption box...reads...」)。

準確文字算繪:讓AI寫出漂亮字

Gemini 擅長在圖片中生成文字。請清楚說明文字內容、字型風格和整體設計。

為名為「The Daily Grind」的咖啡店設計現代簡約的標誌...
為名為「The Daily Grind」的咖啡店設計現代簡約的標誌...

範本

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 a coffee bean seamlessly integrated

with the text. The color scheme is black and white.

解析

  • 圖片類型與用途:明確是「logo」且用於「coffee shop」。
  • 文字內容:指定要呈現的文字(「The Daily Grind」)。
  • 字體與設計:描述字型風格(「clean, bold, sans-serif font」)和設計元素(「a simple, stylized icon of a a coffee bean seamlessly integrated with the text」)。

風格化插圖和貼紙

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

一隻開心的紅熊貓,以可愛風格的貼紙呈現...
一隻開心的紅熊貓,以可愛風格的貼紙呈現...

範本

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.

提示詞

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.


產品模型:打造專業級商業攝影

想為你的電商產品製作高質感照片,又不想花大錢請攝影師?AI可以辦到。

高解析度產品相片,以攝影棚燈光拍攝極簡風格的陶瓷咖啡杯...
高解析度產品相片,以攝影棚燈光拍攝極簡風格的陶瓷咖啡杯...

範本

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.

解析

  • 產品細節:描述產品材質、顏色和樣式(「minimalist ceramic coffee mug in matte black」)。
  • 布景:指定背景(「polished concrete surface」)和光線佈局(「three-point softbox setup」)。
  • 特寫:要求聚焦的細節(「sharp focus on the steam rising from the coffee」)。

這是一個更複雜的範例,結合了多個描述來創造一個逼真的產品模型。

提示詞

A hyper-realistic 1/7 scale figurine of a character, designed as a finished commercial product, placed on an iMac computer desk with a white Apple keyboard. The figurine stands on a clean, round transparent acrylic base with no labels or text. Professional studio lighting highlights the sculpted details. On the iMac screen in the background, display the ongoing ZBrush modeling process of the same figurine, showing the contrast between "work in progress" and the finished product. Next to the figurine, place its packaging box with rounded corners and a transparent front window. The box is open at the top, revealing only the inner transparent plastic clamshell, and its height is slightly taller than the figure, realistically sized to contain it.

解析

多層次細節:這段提示詞不僅描述了人偶本身,還包含了其周圍的環境(「iMac computer desk」)、配件(「packaging box」)、背景(「ongoing ZBrush modeling process」)以及光線(「Professional studio lighting」),建構了一個豐富且真實的產品情境。


進階應用:圖片編輯與合成的四種心法

Gemini 不僅能從零開始生成圖像,還能根據你的指令編輯現有圖片。

新增與移除元素

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

一張毛茸茸的薑黃色貓咪擬真圖片...
一張毛茸茸的薑黃色貓咪擬真圖片...
請使用我提供的貓咪圖片,加上一頂小小的針織巫師帽...
請使用我提供的貓咪圖片,加上一頂小小的針織巫師帽...

範本

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."

解析

描述變更內容,並要求AI保持與原始圖片一致的風格、光線與透視。


局部重繪 (語意遮蓋)

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

現代風客廳的廣角照片,光線充足...
現代風客廳的廣角照片,光線充足...
使用提供的客廳圖片,將藍色沙發換成復古棕色皮革 Chesterfield 沙發...
使用提供的客廳圖片,將藍色沙發換成復古棕色皮革 Chesterfield 沙發...

範本

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."

解析

精準指定要修改的物件(「only the blue sofa」),並強調保留其他所有細節,確保編輯不影響整體畫面。


風格轉換

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

高解析度擬真相片:繁忙的城市街道...
高解析度擬真相片:繁忙的城市街道...
將提供的現代城市街道夜景相片轉換成...
將提供的現代城市街道夜景相片轉換成...

範本

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."

解析

提供參考風格(「Vincent van Gogh's 'Starry Night'」),並描述該風格的具體特徵(「swirling, impasto brushstrokes」),讓AI能精準掌握創作意圖。


進階合成:合併多張圖片

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

專業拍攝的相片:藍色碎花夏季洋裝...+全身照:一名女性將頭髮綁成髮髻,...=Create a professional e-commerce fashion photo...

範本

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.

提示詞

"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."

解析

明確指定從哪張圖片取用哪些元素,並要求AI進行合理的合成與調整(「lighting and shadows adjusted to match the outdoor environment」),創造出一個逼真的新場景。


保留高保真細節

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

A professional headshot of a woman with brown hair and blue eyes...+簡單的現代風格標誌,包含「G」和「A」字母...=

範本

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].

提示詞

"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's face and features remain completely unchanged. The logo

should look like it's naturally printed on the fabric, following the folds

of the shirt."


最佳做法

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

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

限制

  • 為獲得最佳成效,請使用下列語言:英文、西班牙文 (墨西哥)、日文 (日本)、中文 (中國)、印地文 (印度)。
  • 圖像生成功能不支援音訊或影片輸入內容。
  • 模型不一定會輸出使用者明確要求的圖片數量。
  • 模型最多可接受 3 張圖片做為輸入內容,效果最佳。
  • 為圖片生成文字時,建議先生成文字,然後要求 Gemini 根據文字生成圖片。
  • 目前歐洲經濟區、瑞士和英國不支援上傳兒童圖片。
  • 所有生成的圖像都會加上 SynthID 浮水印。

結語

提示工程不是一次性的學習,而是一種持續精進的思維方式。透過不斷地實驗與微調,你將會發現,與AI的對話就像與一位創意夥伴進行腦力激盪。從一開始的「請幫我畫一隻貓」,到後來能夠精準地描述「一隻身穿太空服的橘貓,在月球表面凝視著地球,採用85mm長焦鏡頭拍攝,光線來自背後,營造出剪影效果」,你的指令越具體,AI的回應就越接近你的心之所想。

現在,就開始將這些心法應用到你的創作流程中吧。AI圖像生成的功能正在以前所未有的速度發展,而掌握提示工程,就是你駕馭這股力量、走在時代尖端的最佳利器。

延伸閱讀

張貼留言

0 留言