跳到主内容
@wquguru
精选88Simon Willison 博客(RSS)技巧与观点

代码驱动AI插图比专用图像模型更实用

Code-driven AI illustrations are more useful than images from dedicated image models

原文
发到 X
推荐理由

深度复盘了从专用图像模型转向代码驱动生成的工程实践与取舍逻辑,对从事Agent开发与AIGC工作流的从业者极具参考价值。

An interesting trend in frontier LLMs released in the second half of 2026 is that they tend to be much better at visual reasoning and creative "design" than their predecessors. If you ask these text-output models to create a 2D image (or a 3D model, as discussed here previously), you're very likely to get a useful result, and you may even get one that's aesthetically impressive. Most importantly, because these images are defined using code you (or the model) can make further edits to them without any of the weirdness that comes from iterating with a text-input, image-output model.

2026年下半年发布的前沿大语言模型(LLMs)中,一个有趣的趋势是,它们在视觉推理和创意“设计”方面往往比前代模型出色得多。如果你让这些仅输出文本的模型创建一张2D图像(或3D模型,如前文所述),你很可能会得到一个有用的结果,甚至可能得到在美学上令人印象深刻的作品。最重要的是,由于这些图像是使用代码定义的,你(或模型)可以对其进行进一步编辑,而无需经历使用文本输入、图像输出模型进行迭代时会出现的那些怪异问题。

Poster design with Gemini 4 Neon

使用 Gemini 4 Neon 设计的海报

Gemini 4 Neon is getting some buzz for its 2D design skills, so I decided to try it out in AI Studio starting with the prompt:

Gemini 4 Neon 因其2D设计技能而备受瞩目,因此我决定在 AI Studio 中尝试一下,从以下提示开始:

Create an SVG poster promoting the Kakapo recovery project, research details first, make the poster look really cool and give it a 1970s graphic design

创建一个推广鸮鹦鹉(Kakapo)保护项目的SVG海报,先研究相关细节,使海报看起来非常酷,并采用1970年代的平面设计风格

It took some iteration, partly because AI Studio doesn't render SVGs, so the models there can't spot visual mistakes without assistance.

经过了一些迭代,部分原因是AI Studio不渲染SVG,因此那里的模型在没有辅助的情况下无法发现视觉错误。

Make the kakapo a bit more realistic, especially the face (image search for references)

让鸮鹦鹉看起来更逼真一些,尤其是面部(通过图片搜索参考资料)

Then:

然后:

[IMAGE] The text here doesn't fit the pill, fix it

[IMAGE] 这里的文字不适合药丸形状,请修复它

And:

以及:

[IMAGE 2], [IMAGE 3] Also these

[IMAGE 2], [IMAGE 3] 还有这些

Here's the full transcript, exported from AI Studio as Markdown because I couldn't find a way to share a session that didn't require a Google login to view.

以下是完整对话记录,我从 AI Studio 导出为 Markdown 格式,因为我找不到一种无需 Google 登录即可查看会话的分享方式。

The end result is pretty solid:

最终结果相当扎实:

AI Studio ran Google searches to find those numbers - I've checked and they are all correct. I like that it included red rimu tree fruit on the branch, since those are essential for the breeding season.

AI Studio 运行了谷歌搜索来查找这些数据——我已经核实过,它们都是正确的。我喜欢它在树枝上包含了红罗汉松(red rimu)的果实,因为这对繁殖季节至关重要。

Whether or not you like the poster, the key thing about it is that everything is editable. You can directly edit the text in the SVG, or you can open it in Inkscape or Adobe Illustrator or Boxy SVG and edit it visually.

无论你是否喜欢这张海报,其关键点在于所有内容均可编辑。你可以直接编辑 SVG 中的文本,或者将其在 Inkscape、Adobe Illustrator 或 Boxy SVG 中打开并进行可视化编辑。

It's not just SVG

不仅仅是 SVG

I have a well documented fondness for SVG generation, but it's not the only game in town.

我对 SVG 生成有着有据可查的偏爱,但它并非唯一的选择。

A model hooked up to a coding agent environment can execute code to generate images. This opens up a whole realm of possibilities - generated image files, HTML and CSS, 2D HTML Canvas elements, Blender scripts, WebGPU shaders, PDF... any image mechanism that can be represented by a file on disk or the output of a script can be targeted by a model with a coding agent.

连接到编码代理环境(coding agent environment)的模型可以执行代码来生成图像。这开启了无限的可能性——生成的图像文件、HTML 和 CSS、2D HTML Canvas 元素、Blender 脚本、WebGPU 着色器、PDF……任何可以通过磁盘上的文件或脚本输出来表示的图像机制,都可以成为拥有编码代理的模型的目标。

One of the reasons vibe game development has exploded recently is that models like Claude Opus 5.5 and GPT-6 Astra and Gemini 4 Neon are capable of creating good-enough quality game assets - 3D models, textures, sprites, etc - entirely through writing code.

近期氛围游戏开发爆发式增长的原因之一是,Claude Opus 5.5、GPT-6 Astra 和 Gemini 4 Neon 等模型能够通过编写代码完全生成质量足够好的游戏资产——3D 模型、纹理、精灵图等。

Building them with code means that tweaking, reusing, and remixing them is a case of the model writing even more code.

用代码构建这些资产意味着,调整、复用和重新混合它们只需让模型编写更多代码即可。

In comparison to image models

与图像模型相比

Most AI image generation tools use models that directly output bitmap graphics. Stable Diffusion, DALL-E, and Midjourney were early leaders in that space. The past ~15 months have seen the emergence of LLM-driven variants of this like Google's Nano Banana and OpenAI's ChatGPT Images. These have become competent at editing existing images and preserving details, which means you can iterate on a design over multiple conversation turns without it devolving into a mess.

大多数 AI 图像生成工具使用直接输出位图图像的模型。Stable Diffusion、DALL-E 和 Midjourney 是该领域的早期领导者。过去约 15 个月里,出现了由大语言模型驱动的此类变体,如 Google 的 Nano Banana 和 OpenAI 的 ChatGPT Images。这些模型在编辑现有图像和保留细节方面已相当熟练,这意味着你可以在多轮对话中对设计进行迭代,而不会使其变得一团糟。

They still have their limitations. They can produce weird glitches which become apparent when you zoom in on the details. They output text shapes directly from the model, which means you don't get the same guaranteed consistency that you would have with a real font-based typography system.

它们仍有其局限性。它们会产生奇怪的故障效果,在放大查看细节时尤为明显。它们直接从模型中输出文字形状,这意味着你无法获得基于真实字体的排版系统所保证的那种一致性。

They are also inherently flat. You can describe changes you want in text, or draw annotations on an image to describe what you want, but you can't take control of an individual element or layer and directly manipulate it to get exactly what you want.

它们本质上也是平面的。你可以用文字描述你想要的更改,或在图像上绘制注释来说明你的需求,但你无法控制单个元素或图层并直接操作它以精确实现你的意图。

Images created through generated code solve all of those problems.

通过生成代码创建的图像解决了所有这些问题。

If you are generating photorealistic images then dedicated image models still have their place. For most of what I care about - explanatory diagrams, editable poster designs, UI components, visualizations, assets for games - code-driven images feel to me like a better bet.

如果你要生成照片级逼真的图像,专用图像模型仍有其用武之地。但对于我关心的大多数内容——解释性图表、可编辑的海报设计、UI 组件、可视化图表、游戏资产——我认为代码驱动的图像是更好的选择。

I thought Anthropic was at a disadvantage

我曾认为 Anthropic 处于劣势

After Nano Banana and ChatGPT Images I thought Anthropic had a serious product gap on their hands.

在 Nano Banana 和 ChatGPT Images 出现后,我曾认为 Anthropic 在产品层面存在严重差距。

OpenAI and Google both had excellent image generation models as part of their product suites. They even had generative video models - Google still does with Veo and now Omni, OpenAI sunset Sora.

OpenAI 和 Google 的产品套件中都包含了优秀的图像生成模型。它们甚至拥有生成视频模型——Google 目前仍拥有 Veo 和 Omni,而 OpenAI 则停用了 Sora。

The business world still runs on PowerPoint, so if you're selling an enterprise contract having a great image generation model seemed to me like it would be an expected feature for many customers.

商业世界仍然依赖 PowerPoint,因此如果你正在销售企业合同,在我看来,拥有一个出色的图像生成模型似乎是许多客户期望的功能。

These days Claude can quite happily churn out visually compelling presentations and website designs, and Claude Design provides a full design system platform. All built around code-driven images!

如今,Claude 可以非常愉快地生成视觉上引人注目的演示文稿和网站设计,而 Claude Design 提供了一个完整的设计系统平台。这一切都围绕代码驱动的图像构建!

This feels like another variant of the bitter lesson: I was convinced a specialist image model was necessary to serve customers with design problems. It turns out the text-output LLMs just kept getting more capable until they could handle visual design by writing code.

这感觉像是‘痛苦教训’的另一种变体:我曾深信,为有设计问题的客户提供服务必须依赖专业的图像模型。结果发现,输出文本的大语言模型(LLM)能力不断增强,直到能够通过编写代码来处理视觉设计。

Tags: design, svg, ai, openai, generative-ai, llms, anthropic, claude, gemini, text-to-image, coding-agents

标签:design, svg, ai, openai, generative-ai, llms, anthropic, claude, gemini, text-to-image, coding-agents

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

关联信息,但可能不是同一事件