代码驱动的 AI 插图比专用图像模型生成的图片更有用
2026年11月28日
2026年下半年发布的前沿 LLMs 出现了一个有趣的趋势:它们在视觉推理和创意"设计"方面往往比前代模型强得多。如果你要求这些文本输出模型创建一张 2D 图像(或如之前在此处讨论过的 3D 模型),你很可能会得到一个有用的结果,甚至可能得到一个在美学上令人惊艳的作品。最重要的是,由于这些图像是通过代码定义的,你(或该模型)可以对其进一步编辑,而不会出现文本输入、图像输出模型反复迭代时所产生的那些怪癖。
使用 Gemini 4 Neon 进行海报设计
Gemini 4 Neon 因其 2D 设计能力而备受关注,所以我决定在 AI Studio 中试一试,从以下提示词开始:
创建一张 SVG 海报来推广 Kakapo 恢复项目,先研究相关细节,让海报看起来非常酷炫,并赋予其 1970s 平面设计风格
经历了一些迭代,部分原因是 AI Studio 不渲染 SVG,因此那里的模型在没有辅助的情况下无法发现视觉错误。
让 Kakapo 稍微更写实一些,尤其是脸部(用图像搜索查找参考)
然后:
[IMAGE] 这里的文字放不进胶囊形容器里,请修复
还有:
[IMAGE 2]、[IMAGE 3] 这些也是
以下是完整的对话记录,以 Markdown 格式从 AI Studio 导出,因为我找不到一种无需 Google 登录即可查看的会话分享方式。
最终效果相当不错:
AI Studio 执行了 Google 搜索来查找那些数字——我已核实,它们全部正确。我喜欢它在树枝上加入了红色的 rimu 树果实,因为那些对繁殖季节至关重要。
无论你是否喜欢这张海报,它的关键在于所有内容都是可编辑的。你可以直接编辑 SVG 中的文本,也可以在 Inkscape、Adobe Illustrator 或 Boxy SVG 中打开它并进行可视化编辑。
不仅仅是 SVG
我对 SVG 生成的热爱是有充分记录的,但它并非唯一的玩法。
连接编码 agent 环境的模型可以执行代码来生成图像。这开辟了一整片可能性领域——生成的图像文件、HTML 和 CSS、2D HTML Canvas 元素、Blender 脚本、WebGPU 着色器、PDF……任何可以通过磁盘上的文件或脚本输出来表示的图像机制,都可以被配备编码 agent 的模型所生成。
近期氛围编程游戏开发迅速爆发的原因之一,在于诸如 Claude Opus 5.5、GPT-6 Astra 和 Gemini 4 Neon 等模型能够完全通过编写代码来创建质量足够的游戏资源——3D 模型、纹理、精灵图等。
用代码构建它们意味着调整、复用和混编它们不过是模型编写更多代码的事情。
与图像模型的对比
大多数 AI 图像生成工具使用的模型直接输出位图。Stable Diffusion、DALL-E 和 Midjourney 是该领域的早期领跑者。过去大约 15 个月里,出现了由 LLM 驱动的此类变体,例如 Google 的 Nano Banana 和 OpenAI 的 ChatGPT Images。这些模型在编辑现有图像和保留细节方面已经相当成熟,这意味着你可以在多轮对话中反复迭代设计,而不会让画面变得一团糟。
它们仍然有其局限性。它们可能会产生一些奇怪的瑕疵,当你放大查看细节时就会显现出来。它们直接从模型输出文字形状,这意味着你无法获得像真正基于字体的排版系统那样的保证一致性。
它们本质上是扁平的。你可以描述想要对文字做的修改,或在图片上绘制注释来说明你想要什么,但你无法控制某个单独的要素或图层,并直接对其进行操作来精确得到你想要的效果。
通过生成代码创建的图像解决了所有这些问题。
如果你要生成照片级真实的图像,那么专用图像模型仍然有其用武之地。对于我关注的多数内容——解释性图表、可编辑的海报设计、UI 组件、数据可视化、游戏素材——代码驱动的图像在我看来是更好的选择。
我曾以为 Anthropic 处于劣势
在 Nano Banana 和 ChatGPT Images 之后,我以为 Anthropic 面临着严重的产品空白。
OpenAI 和 Google 的产品套件中都有出色的图像生成模型。它们甚至有生成式视频模型——Google 现在仍有 Veo 和 Omni,OpenAI 则已下线 Sora。
商业世界仍然离不开 PowerPoint,因此如果你在推销企业合同,拥有一个出色的图像生成模型在我看来对许多客户来说似乎是一项预期功能。
如今 Claude 可以轻松地产出视觉冲击力十足的演示文稿和网站设计,而 Claude Design 则提供了一套完整的设计系统平台。所有这些都以代码驱动的图像为核心构建!
这感觉又是"苦涩教训"的又一个变体:我曾坚信,需要一个专业的图像模型才能为有设计需求的客户服务。结果发现,基于文本输出的 LLM 不断变得越来越强大,直到它们能够仅凭编写代码来处理视觉设计。
最近的文章
- 十二个月内的三个 LLM inflection 点 - 2026年11月24日
- Ladybird 的首个 alpha 版本 - 2026年11月23日
- 使用 service workers 和 Pyodide 在浏览器中运行完整的服务器端 Datasette Python 应用 - 2026年11月17日
- 使用 Claude 定位神秘蜂鸣声的来源 - 2026年11月9日
本文由 AI图鉴自动抓取并翻译,版权归原作者所有;如需查看原文请点下方链接。
Code-driven AI illustrations are more useful than images from dedicated image models
28th November 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.
Poster design with 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:
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
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] The text here doesn't fit the pill, fix it
And:
[IMAGE 2], [IMAGE 3] Also these
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 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.
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.
It’s not just SVG
I have a well documented fondness for SVG generation, but it’s not the only game in town.
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.
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
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.
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.
I thought Anthropic was at a disadvantage
After Nano Banana and ChatGPT Images I thought Anthropic had a serious product gap on their hands.
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.
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.
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!
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.
More recent articles
- Three LLM inflection points in twelve months - 24th November 2026
- Ladybird's first alpha release - 23rd November 2026
- Running the full server-side Datasette Python app in the browser with service workers and Pyodide - 17th November 2026
- Locating the source of a mysterious beep with Claude - 9th November 2026
Auto-fetched and translated by AI Atlas. All rights belong to the original author.