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

原始链接: https://simonwillison.net/2026/Nov/28/code-driven-ai-illustrations/

HN 上围绕 Simon Willison 的主张展开讨论:代码驱动的 AI 插图比图像模型输出更有用。核心论点是:大语言模型可以生成 SVG、HTML/CSS、Blender/Python 或 3D/CAD 代码,这些代码可编辑、可按参数调整、可进行版本管理,并且便于迭代;图像模型往往能给出更漂亮的一次性出图,但会抹平细节,而且难以精确修改。评论者表示,在图表、幻灯片、图标、游戏素材、室内地图、3D 打印和技术插图方面效果很好,尤其是当模型能够渲染并检查自己的输出时。许多人提倡混合工作流:先用图像模型生成风格参考或概念图,再让具备视觉能力的大语言模型把设计用代码重建;有些人则使用灰度 Blender 场景或控制图像来约束视频/图像生成。批评者认为,示例中的鸮鹦鹉海报看起来像千篇一律的 AI 粗制滥造内容,视觉层级薄弱,存在事实和设计错误,而且“可编辑”并不意味着作品就好。另一些人指出,审美、领域约束、验证和人工精修仍然至关重要。另一个争论质疑 Anthropic 缺少文生图模型:有人认为 Claude 的代码生成能力以及面向企业/编码的定位让文生图模型变得不必要,另一些人则认为视觉/图像支持薄弱会带来不利影响。
相关文章

原文

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:

Retro-style illustrated conservation poster in cream, dark teal, orange and yellow. Header text: "★ AOTEAROA NEW ZEALAND • TAONGA CONSERVATION ★", large title "KĀKĀPŌ", banner "RECOVERY PROGRAMME • PROTECT THE NIGHT PARROT". Centre: a plump green kākāpō with a grey beak and whiskered face perched on a branch with red rimu berries, in front of concentric orange and yellow rings on a starry night-sky arch, with curved text "★ STRIGOPS HABROPTILUS • WORLD'S ONLY FLIGHTLESS NOCTURNAL PARROT ★". Orange starburst badge: "2026 RECORD 325 BIRDS ALIVE UP FROM 51". Three stats below: "1995 → 2026 51 TO 325 75-YEAR POPULATION HIGH", "2026 RIMU MAST 90 CHICKS SINGLE-SEASON RECORD", "PREDATOR-FREE 3 ISLANDS WHENUA HOU • PUKENUI • TE KĀKAHU". Footer banner: "ADOPT A KĀKĀPŌ • KEEP SANCTUARIES WILD", "DOC TE PAPA ATAWHAI & NGĀI TAHU • DOC.GOVT.NZ/KAKAPO".

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.

Update: There has been innovation here that I was unaware of when I wrote this article. Ideogram 4.0 for example claims “bounding-box layout control” through structured JSON prompting.

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.

联系我们 contact @ memedata.com