在线观看日韩三级视频,国产久久精品在线播放,精品人妻伦一二三区久久简爱,久久亚洲精品一区二区,日韩人妻一区二区av,欧美黑人又粗又大高潮喷水,国产91精品在线播放,国产欧美日韩一区二区三视频,亚洲一区二区伦理在线

Nano Banana 官方提示詞來(lái)了,附完整代碼示例

量子位 2025/9/3 14:58:34 責(zé)編:清源

Nano banana 正火爆全球,谷歌立馬推出官方提示詞指南

下面先進(jìn)行一些效果展示,看看它的強(qiáng)大之處。

借助 Nano-banana、Seedance 和 Kling,梵高、蒙娜麗莎、戴珍珠耳環(huán)的少女都能在紐約中央公園里合照。

不僅如此,還能生成十分炫酷的動(dòng)畫(huà)視頻。

甚至能毫無(wú)痕跡的換臉?!

好家伙,香蕉這波真是讓我開(kāi)眼了。感覺(jué)官方再不出教程,網(wǎng)友們自己都能搞個(gè)“百科全書(shū)”了。

正值香蕉熱度爆棚之際,谷歌總結(jié)其 5 大核心功能,助你輕松玩轉(zhuǎn)這一創(chuàng)新工具。

  • 文本轉(zhuǎn)圖像:從文本描述生成高質(zhì)量圖像。

  • 圖像 + 文本轉(zhuǎn)圖像(編輯):可通過(guò)文本提示對(duì)圖像進(jìn)行添加、刪除或修改元素,還能改變風(fēng)格和調(diào)整色彩。

  • 多圖像到圖像(構(gòu)圖和風(fēng)格轉(zhuǎn)換):使用多張輸入圖像來(lái)組成一個(gè)新場(chǎng)景或?qū)L(fēng)格從一張圖像轉(zhuǎn)換到另一張圖像。

  • 迭代細(xì)化:可通過(guò)多次對(duì)話(huà)逐步微調(diào)圖像,直至完美。

  • 高保真文本渲染:準(zhǔn)確生成清晰且布局合理的文字圖像,適用于 logo、圖表和海報(bào)等。

谷歌還特別提示了,描述場(chǎng)景,不要僅僅列出關(guān)鍵詞

相比簡(jiǎn)單、不連貫的關(guān)鍵詞列表,一段敘事性強(qiáng)、描述詳細(xì)的段落通常能生成更好、更連貫的圖像。

對(duì)于此指導(dǎo),網(wǎng)友可謂十分喜歡。

下面讓我們一起看看具體提示詞是什么樣的。

6 類(lèi) Nano banana 提示詞

生成圖像最常見(jiàn)的方法,就是告訴它你想看什么。

先看看官方生成的圖片,貓貓?jiān)陔p子座星空下的豪華餐廳里吃香蕉。

哇哦,貓貓桌子上還擺著刀叉和酒杯,餐廳里其他桌子上也有客人,真是充滿(mǎn)了細(xì)節(jié)。

如果你也想用納米香蕉生成如此驚艷的效果,就一起來(lái)學(xué)學(xué)谷歌的 6 大類(lèi)提示詞吧。

逼真的場(chǎng)景

要獲得逼真的圖像,最好像攝影師一樣思考。提及相機(jī)角度、鏡頭類(lèi)型、光線(xiàn)和精細(xì)細(xì)節(jié),這將使模型達(dá)到最逼真的效果。

通用提示如下所示:

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.

不僅如此,谷歌還特意給出了 API 代碼。

 1    from google import genai
 2    from google.genai import types
 3    from PIL import Image
 4    from io import BytesIO
 5
 6    client = genai.Client()
 7
 8    # Generate an image from a text prompt
 9    response = client.models.generate_content(
10    model="gemini-2.5-flash-image-preview",
11    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.",
12    )
13
14    image_parts = [
15    part.inline_data.data
16    for part in response.candidates[0].content.parts
17    if part.inline_data
18    ]
19
20    if image_parts:
21    image = Image.open(BytesIO(image_parts[0]))
22    image.save('photorealistic_example.png')
23    image.show()

以下為官方生成的一位老年陶瓷藝術(shù)家的特寫(xiě)。

柔和的金色陽(yáng)光透過(guò)窗戶(hù)灑進(jìn)畫(huà)面,照亮了陶土的細(xì)膩質(zhì)感和老人臉上的皺紋。

風(fēng)格化的插圖和貼紙

如果你想為項(xiàng)目創(chuàng)建貼紙、圖標(biāo)或其他素材,務(wù)必明確指定風(fēng)格,并在需要時(shí)要求使用白色背景。

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.

 1from google import genai
 2from google.genai import types
 3from PIL import Image
 4from io import BytesIO
 5
 6client = genai.Client()
 7
 8# Generate an image from a text prompt
 9response = client.models.generate_content(
10    model="gemini-2.5-flash-image-preview",
11    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.",
12)
13
14image_parts = [
15    part.inline_data.data
16    for part in response.candidates[0].content.parts
17    if part.inline_data
18]
19
20if image_parts:
21    image = Image.open(BytesIO(image_parts[0]))
22    image.save('photorealistic_example.png')
23    image.show()

以下為一張卡哇伊風(fēng)格的快樂(lè)小熊貼紙。

背景為設(shè)定的白色,整體采用清晰輪廓和大膽配色,整個(gè)設(shè)計(jì)十分生動(dòng)和吸引人。

圖像中的準(zhǔn)確文本

在渲染文本時(shí),需具體描述文本內(nèi)容、字體風(fēng)格,以及整體設(shè)計(jì)。

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

 1from google import genai
 2from google.genai import types
 3from PIL import Image
 4from io import BytesIO
 5
 6client = genai.Client()
 7
 8# Generate an image from a text prompt
 9response = client.models.generate_content(
10    model="gemini-2.5-flash-image-preview",
11    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.",
12)
13
14image_parts = [
15    part.inline_data.data
16    for part in response.candidates[0].content.parts
17    if part.inline_data
18]
19
20if image_parts:
21    image = Image.open(BytesIO(image_parts[0]))
22    image.save('logo_example.png')
23    image.show()

以下是為名為“The Daily Grind”的咖啡店創(chuàng)建的一個(gè)現(xiàn)代簡(jiǎn)約風(fēng)格的標(biāo)志。

此圖整體采用黑白風(fēng)格,中間的咖啡豆圖標(biāo)成為了整個(gè)設(shè)計(jì)的焦點(diǎn),非常符合咖啡店的品牌形象。

產(chǎn)品模型和商業(yè)攝影

納米香蕉還能為電子商務(wù)、廣告或品牌創(chuàng)建清晰、專(zhuān)業(yè)的產(chǎn)品照片。

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

 1from google import genai
 2from google.genai import types
 3from PIL import Image
 4from io import BytesIO
 5
 6client = genai.Client()
 7
 8# Generate an image from a text prompt
 9response = client.models.generate_content(
10    model="gemini-2.5-flash-image-preview",
11    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.",
12)
13
14image_parts = [
15    part.inline_data.data
16    for part in response.candidates[0].content.parts
17    if part.inline_data
18]
19
20if image_parts:
21    image = Image.open(BytesIO(image_parts[0]))
22    image.save('product_mockup.png')
23    image.show()

以下為一張高分辨率、工作室燈光下的簡(jiǎn)約陶瓷咖啡杯產(chǎn)品照片。

此圖可以清晰地看到杯內(nèi)升起的蒸汽,整體線(xiàn)條簡(jiǎn)約,畫(huà)面極其逼真。

極簡(jiǎn)主義和空間設(shè)計(jì)

它還非常適用于創(chuàng)建網(wǎng)站、演示文稿或營(yíng)銷(xiāo)材料的背景,并在這些背景上覆蓋文本加以修飾。

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

 1from google import genai
 2from google.genai import types
 3from PIL import Image
 4from io import BytesIO
 5
 6client = genai.Client()
 7
 8# Generate an image from a text prompt
 9response = client.models.generate_content(
10    model="gemini-2.5-flash-image-preview",
11    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.",
12)
13
14image_parts = [
15    part.inline_data.data
16    for part in response.candidates[0].content.parts
17    if part.inline_data
18]
19
20if image_parts:
21    image = Image.open(BytesIO(image_parts[0]))
22    image.save('minimalist_design.png')
23    image.show()

以下是一張極簡(jiǎn)主義構(gòu)圖,右下角以一片精致的紅色楓葉為特色。

連環(huán)畫(huà)(漫畫(huà)面板 / 故事板)

通過(guò)清晰的場(chǎng)景描述,逐幀創(chuàng)建引人入勝的視覺(jué)敘事,特別適合制作故事板、漫畫(huà)或任何形式的連環(huán)畫(huà)。

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

 1from google import genai
 2from google.genai import types
 3from PIL import Image
 4from io import BytesIO
 5
 6client = genai.Client()
 7
 8# Generate an image from a text prompt
 9response = client.models.generate_content(
10    model="gemini-2.5-flash-image-preview",
11    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.",
12)
13
14image_parts = [
15    part.inline_data.data
16    for part in response.candidates[0].content.parts
17    if part.inline_data
18]
19
20if image_parts:
21    image = Image.open(BytesIO(image_parts[0]))
22    image.save('comic_panel.png')
23    image.show()

以下是一幅黑色藝術(shù)風(fēng)格的漫畫(huà)書(shū)面板。

此漫畫(huà)中,主人公身穿風(fēng)衣站在路燈下,背景中,一家荒涼酒吧的燈牌映照在水中,整體充滿(mǎn)了濃厚的隱秘與危險(xiǎn)氛圍。

這些提示詞指南和效果展示難道還沒(méi)有引起你的興趣嗎?

心動(dòng)不如行動(dòng),趕緊去體驗(yàn)一下這項(xiàng)創(chuàng)新技術(shù)的強(qiáng)大吧~

參考鏈接:

  • [1]https://x.com/googleaistudio/status/1962957615262224511

  • [2]https://ai.google.dev/gemini-api/docs/image-generation

本文來(lái)自微信公眾號(hào):量子位(ID:QbitAI),作者:時(shí)令

廣告聲明:文內(nèi)含有的對(duì)外跳轉(zhuǎn)鏈接(包括不限于超鏈接、二維碼、口令等形式),用于傳遞更多信息,節(jié)省甄選時(shí)間,結(jié)果僅供參考,IT之家所有文章均包含本聲明。

相關(guān)文章

關(guān)鍵詞:谷歌人工智能,Nano Banana

軟媒旗下網(wǎng)站: IT之家 最會(huì)買(mǎi) - 返利返現(xiàn)優(yōu)惠券 iPhone之家 Win7之家 Win10之家 Win11之家

軟媒旗下軟件: 軟媒手機(jī)APP應(yīng)用 魔方 最會(huì)買(mǎi) 要知