|
近日,谷歌发布了 nano banana 的官方 Prompt 模板,迅速在网上引发热议。作为一款基于 AI 技术的图像生成工具,nano banana 凭借其强大的效果吸引了众多用户的关注与尝试。各种创意使用方式层出不穷,让人感受到 AI 在图像生成和处理领域带来的巨大变革。 在社交媒体上,许多网友分享了使用 nano banana 生成的各种图片和视频,展示出其强大的创作能力。例如,有用户通过 nano banana 将经典名画的人物与现代场景相结合,创造出梵高和蒙娜丽莎在纽约中央公园浪漫相遇的画面。此外,还有用户利用该工具让我们重回中土世界,展现出仿佛3A 游戏般的史诗场景。这些创意展示了 AI 生成技术的无穷潜力。 为了帮助用户更好地掌握这一工具,谷歌特别提供了六套 Prompt 模板,涵盖了写实、贴纸、文本渲染、产品摄影等多种风格。用户只需按照这些模板填写相关信息,就能轻松生成高质量的图像。例如,在写实摄影的模板中,用户需要考虑拍摄角度、光线和细节等元素,以引导 AI 生成更真实的图片。 具体来说,模板会引导用户描述主体、场景和氛围,从而确保生成的图像达到理想效果。即使没有专业摄影经验,用户只需多加尝试,就能获得令人满意的成果。此外,对于贴纸、插图和文本渲染等需求,用户只需明确风格和背景要求,便能快速得到符合预期的设计。 nano banana 的推出为更多用户打开了创意的大门,不论是专业设计师还是普通用户,都可以在这个平台上尽情发挥创意,体验到 AI 技术带来的便利与乐趣。未来,我们期待 nano banana 能带来更多精彩的图像生成作品。 nano banana 官方 Prompt 模板具体如下: 官方参考链接:https://x.com/GoogleAIStudio/status/1962957615262224511 1.写实摄影 要获得逼真的图像,请像摄影师一样思考。提及相机角度、镜头类型、光线和精细细节,将引导模型达到逼真的效果。 示例模板:
示例Prompt:
生成的图片: 调用API生图示例Python代码: from google import genaifrom goo普奔gle.genai import typesfrom PIL import Imagefrom io import BytesIOclient = genai.Client()# Generate an image from a text promptresponse = 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 li!谷ght 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.datafor part in response.candidates[0].content.partsif part.inline_data]if image_parts:image = Image.open(BytesIO(image_parts[0]))image.save('photorealistic_example.png')image.show()2.风格化的插图与贴纸 要为您的项目创建贴纸、图标或资产,请明确说明样式,并记得在需要时请求白色背景。 示例模板:
示例Prompt:
生成的图片: 调用API生图示例Python代码: from google import genaifrom google.genai import typesfrom PIL import Imagefrom io import BytesIOclient = genai.Client()# Generate an image from a text promptresponse = 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&nbansp;features bold, clean outlines, simple cel-shading, and a vibrant color palette. The background must be white.",)image_parts = [part.inline_data.datafor part in response.candidates[0].content.partsif part.inline_data]if image_parts:image = Image.open(BytesIO(image_parts[0]))image.save('red_panda_sticker.png')image.show()3.图片中的文本渲染 nano banana在文本渲染这项任务上的表现是格外瞩目的。 你只需要把文字内容、字体风格(用描述性的词描述)、整体设计说明白,就可以产出质量很好的图片了。 示例模板:
生成的图片: 为一家名为「The Daily Grind」的咖啡店生成的现代极简风Logo 调用API生图示例Python代码: from google import genaifrom google.genai import typesfrom PIL import Imagefrom io import BytesIOclient = genai.Client()# Generate an image from a text promptresponse = 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&nbbasp;a coffee bean seamlessly integrated with the text. The color scheme is black and white.",)image_parts = [part.inline_data.datafor part in response.candidates[0].content.partsif part.inline_data]if image_parts:image = Image.open(BytesIO(image_parts[0]))image.save('logo_example.png')image.show()4.产品广告和商业摄影 为电子商务、广告或品牌创建清晰、专业的产品照片。 示例模板:
示例Prompt:
生成的图片: 调用API生图示例Python代码: from google import genaifrom google.genai import typesfrom PIL import Imagefrom io import BytesIOclient = genai.Client()# Generate an image from a text promptresponse = client.models.generate_content(model="gemini-2.5-flash-image-preview",contents="A high-resolution, studio-lit product photograph of a minimalist cenaramic 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.datafor part in response.candidates[0].content.partsif part.inline_data]if image_parts:image = Image.open(BytesIO(image_parts[0]))image.save('product_mockup.png')image.show()5.极简主义与留白设计 非常适合为网站、演示文稿或营销材料创建将叠加官方文本的背景。 示例模板:
示例Prompt:
生成的图片: 调用API生图示例Python代码: from google import genaifrom google.genai import typesfrom PIL import Imagefrom io import BytesIOclient = genai.Client()# Generate an image from a text promptresponse = client.modePrls.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.datafor part in response.candidates[0].content.partsif part.inline_data]if image_parts:image = Image.open(BytesIO(image_parts[0]))image.save('minimalist_design.png')image.show()6.连环画/漫画 通过关注清晰的场景描述,逐个面板创建引人入胜的视觉叙事,非常适合开发故事板、漫画或任何形式的连续艺术。
示例Prompt:
生成的图片: 调用API生图示例Python代码: from google import genaifrom google.genai import typesfrom PIL import Imagefrom io import BytesIOclient = ptgenai.Client()# Generate an image from a text promptresponse = 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, c模板reating a dramatic, somber mood. Landscape.",)image_parts = [part.inline_data.datafor part in response.candidates[0].content.partsif part.inline_data]if image_parts:image = Image.open(BytesIO(image_parts[0]))image.save('comic_panel.png')image.show() |
