代码驱动的 AI 插画比专用图像模型生成的图片更实用
原题Code-driven AI illustrations are more useful than images from dedicated image models
读前速览
文章认为,代码驱动的 AI 插画比专用图像模型生成的图片更实用,因为它们可编辑、风格一致,并能借助生成的代码拓展创作可能性。
代码驱动的 AI 插画比专用图像模型生成的图片更易编辑,风格也更一致
通过代码生成的图像(如 SVG、HTML、Blender 脚本等)可以直接编辑、复用和混编。相比之下,扩散模型生成的位图容易出现瑕疵、排版不一致,而且无法控制图层。
前沿 LLM 已能通过生成代码进行高水平的视觉推理和创意设计
Gemini 4 Neon、Claude Opus 5.5 和 GPT-6 Astra 等模型在被要求生成代码时,可以制作实用且美观的 2D 和 3D 设计,Kakapo 保护项目海报就是一个例子。
「苦涩的教训」同样适用于视觉设计:并非总需要专用图像模型
Willison 认为,文本输出型 LLM 的能力已经足以通过生成代码解决视觉设计问题,因此 OpenAI 和 Google 等公司推出的专用图像模型在许多应用中不再那么不可或缺。
完整摘要
Simon Willison 探讨了一种新兴趋势:前沿 LLM 擅长通过生成代码进行视觉推理和创意设计,而非直接输出图像。他以 Gemini 4 Neon 为例,展示了它如何为 Kakapo 保护项目制作 SVG 海报,并指出代码驱动的图像完全可编辑,与专用图像模型生成的图片不同。文章将代码生成图像与 Stable Diffusion、DALL-E 等传统扩散模型进行比较,强调前者在可编辑性、排版一致性以及生成多种格式(HTML、CSS、3D 模型、着色器)方面的优势。Willison 指出,Claude Opus 5.5 和 GPT-6 Astra 等模型已经能够通过代码创建游戏素材。他最后总结说,「苦涩的教训」同样适用于这一领域:文本输出型 LLM 的能力已足以通过生成代码处理视觉设计,因此在许多使用场景中,专用图像模型不再那么不可或缺。
2026年11月28日28th November 2026
2026 年下半年发布的前沿大语言模型有一个有趣的趋势:它们在视觉推理和创意“设计”方面往往远胜前代模型。如果让这些文本输出模型创建一张二维图像(或者像我们之前在这里讨论过的那样,创建一个三维模型),你很可能会得到实用的成果,甚至可能得到美学效果出众的作品。最重要的是,由于这些图像是用代码定义的,你(或模型)可以进一步修改它们,而不会遇到使用文本输入、图像输出模型反复迭代时出现的种种奇怪问题。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.
使用 Gemini 4 Neon 进行海报设计Poster design with Gemini 4 Neon
Gemini 4 Neon 的二维设计能力颇受关注,因此我决定从以下提示词开始,在 AI Studio 中试用一下: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:
创建一张宣传鸮鹦鹉恢复项目的 SVG 海报。先研究相关资料,让海报看起来非常酷,并采用 20 世纪 70 年代的平面设计风格。
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
这经历了几轮迭代,部分原因是 AI Studio 无法渲染 SVG,因此其中的模型在没有帮助的情况下无法发现视觉错误。It took some iteration, partly because AI Studio doesn’t render SVGs, so the models there can’t spot visual mistakes without assistance.
让鸮鹦鹉看起来更写实一些,尤其是脸部(搜索图片作为参考)
Make the kakapo a bit more realistic, especially the face (image search for references)
然后:Then:
[IMAGE] 这里的文字无法放进胶囊形按钮,请修复一下。[IMAGE]
The text here doesn't fit the pill, fix it
以及:And:
[IMAGE 2],[IMAGE 3] 还有这些[IMAGE 2], [IMAGE 3]
Also these
以下是完整的文字记录,以 Markdown 格式从 AI Studio 导出,因为我没找到不需要 Google 账号登录就能查看的会话分享方式。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.
最终结果相当不错:The end result is pretty solid:

AI Studio 通过 Google 搜索找到了这些数字——我核对过,它们全都正确。我喜欢它还画上了枝头的红色罗汉松果实,因为这些果实对繁殖季节至关重要。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.
不管你喜不喜欢这张海报,关键在于它的所有内容都可以编辑。你可以直接编辑 SVG 中的文本,也可以在 Inkscape、Adobe Illustrator 或 Boxy SVG 中打开它并进行可视化编辑。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.
这不仅仅是 SVGIt’s not just SVG
我一向很喜欢生成 SVG,但这并非唯一的选择。I have a well documented fondness for SVG generation, but it’s not the only game in town.
接入编码代理环境的模型可以执行代码来生成图像。这开启了广阔的可能性:生成图像文件、HTML 和 CSS、2D HTML Canvas 元素、Blender 脚本、WebGPU 着色器、PDF……任何能够表示为磁盘上的文件或脚本输出的图像生成方式,都可以由配备编码代理的模型来实现。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.
最近氛围式游戏开发迅速兴起的原因之一,是 Claude Opus 5.5、GPT-6 Astra 和 Gemini 4 Neon 这类模型能够完全通过编写代码来创建质量足够好的游戏资产——3D 模型、纹理、精灵图等。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.
用代码构建它们,意味着调整、复用或重新组合它们,都得让模型编写更多代码。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
大多数 AI 图像生成工具使用直接输出位图图像的模型。Stable Diffusion、DALL-E 和 Midjourney 是这一领域的早期领军者。过去约 15 个月里,Google 的 Nano Banana 和 OpenAI 的 ChatGPT Images 等由 LLM 驱动的此类工具相继出现。它们已经能够胜任编辑现有图像和保留细节的任务,这意味着你可以在多轮对话中反复迭代设计,而不必担心最终把它改得一团糟。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.
它们仍然存在局限性。放大查看细节时,可能会发现一些奇怪的瑕疵。它们直接由模型生成文本形状,因此无法像真正基于字体的排版系统那样保证一致性。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.
如果你要生成照片级真实感的图像,专用图像模型仍有其用武之地。至于我关心的大多数用途——说明性图表、可编辑的海报设计、UI 组件、可视化内容和游戏素材——我觉得代码驱动的图像更值得采用。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.
我原以为 Anthropic 处于劣势。I thought Anthropic was at a disadvantage
在 Nano Banana 和 ChatGPT Images 发布后,我觉得 Anthropic 面临着一个严重的产品短板。After Nano Banana and ChatGPT Images I thought Anthropic had a serious product gap on their hands.
OpenAI 和 Google 的产品套件中都曾包含出色的图像生成模型。它们甚至还推出过生成式视频模型——Google 现在仍有 Veo 和新推出的 Omni,而 OpenAI 已停止提供 Sora。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.
商业世界仍然离不开 PowerPoint,所以如果你要销售企业级合同,我觉得拥有出色的图像生成模型会是许多客户所期待的功能。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.
如今,Claude 已经能够轻松生成视觉效果出众的演示文稿和网站设计,而 Claude Design 则提供了一个完整的设计系统平台。这一切都以代码驱动的图像为核心!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!
这感觉像是“苦涩教训”的又一个变体:我曾确信,要为有设计需求的客户提供服务,就必须使用专门的图像模型。结果,文本输出型 LLM 的能力不断增强,最终已经可以通过编写代码来完成视觉设计。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.