← All guides

Guide · Choosing a tool · ★★☆☆☆

AI image generation with Claude: Claude Code vs Artifacts vs ComfyUI

Claude is great with words and code, but it doesn't paint photos on its own. There are three ways to get an image out of it. Here is what each is good at, and which to pick.

By Arthur Hsiao · Last updated · 5 min read

The one thing to know first. As far as I can tell, Claude does not generate photos or paintings itself. It draws with code (SVG, HTML, charts) or it hands the job to an image model such as ComfyUI. So the real question is not "which AI makes the best picture". It is "does this image need to be drawn as code, or painted by a model?"

The three routes in one table

RouteMakesSetupCost
Claude ArtifactSVG, HTML, diagrams, chartsNone. Open the chat.Your Claude plan
Claude CodeThe same, as files in your project, plus PNGs rendered from themTerminal and a project folderYour Claude plan
ComfyUI (driven by Claude Code)Photos, paintings, anime, texturesA GPU, ComfyUI, models, an MCP server and a skillFree after the hardware

11. Claude Artifact: a quick drawing in the chat

An Artifact is the panel beside the chat where Claude shows what it built. Ask for "a logo as SVG" or "a diagram of how this works" and it appears right there, ready to copy or download.

Good for

  • Icons, simple logos, diagrams, flowcharts, charts and little interactive pages.
  • Trying an idea in one minute, with nothing to install.
  • Sharing a result with someone who has no setup at all.

Not good for

  • Photos, realistic scenes or detailed paintings. It is code, so it looks like code-drawn art.
  • Complex drawings. The more shapes, the more it wanders. Keep requests simple.
  • Anything that has to stay inside your project. The result lives in the chat until you copy it out.

22. Claude Code: the same drawing, as a file you control

Claude Code writes the SVG or HTML straight into your project, so you see every change as a diff and git can undo it. It can also turn the file into a PNG for you. For Arttie the otter it runs:

python source/render.py posts/<folder>    # post.html -> post.png
python source/check_posts.py               # must show 0 errors

Good for

  • Anything that must look the same every time: a mascot, a logo, a set of icons. The same path data gives the same shape.
  • Images that live in a repo, such as site graphics, diagrams in docs, or social posts.
  • Precise edits. "Move the tail 10px left" works because the image is text.

Not good for

  • Photos and painted art. It is still code-drawn.
  • Quick one-offs, when opening a chat is faster than opening a project.

33. ComfyUI: a real image model, run from Claude Code

ComfyUI runs image models on your own computer. Claude Code does not paint anything here. It starts ComfyUI, picks a model for the prompt, runs the workflow and shows you the PNG. The setup is in How to use ComfyUI with Claude Code.

Good for

  • Photos, paintings, anime art, textures and backgrounds. This is the only route here that makes them.
  • Privacy and cost: it runs on your machine, so there is no per-image fee and nothing is uploaded.
  • Control. You choose the model, size and seed, and you can re-run the same seed with small changes.
  • On this site, the sword on the About page was made with SDXL this way.

Not good for

  • Computers without a decent graphics card. Sources I found disagree on how much video memory (VRAM) plain SDXL needs. Roughly, 8 GB runs it and 12 GB is comfortable. Bigger models need more.
  • A quick start. You install ComfyUI, download models and set up a skill first.
  • Consistent characters. A model redraws the face each time, which is why Arttie is SVG.
  • Text inside images. Most models spell badly.

Check the licence of each model. ComfyUI itself is free and open source, but every model you download has its own licence, and some limit commercial use. Read it before you put the image on a client's site.

4Which one should I use?

Start with the image you want, not the tool:

I need… Use
A diagram or flowchart Artifact
A quick icon or simple logo to try Artifact
A mascot or logo that must stay identical Claude Code, as SVG
An image saved in my repo and edited later Claude Code
A photo or realistic scene ComfyUI
Painted or anime-style art ComfyUI
A background picture for a page ComfyUI
A photo and an exact logo on top Both (see below)

If you are unsure, begin with an Artifact. It costs a minute, and you learn fast whether code-drawn art is enough.

5Mix them

The routes are not rivals. On this site the About page uses both: a ComfyUI render for the sword, and code for the animation around it. A common pattern:

  1. ComfyUI makes the photo or painted background.
  2. Claude Code writes the SVG logo, text or frame on top, so the sharp parts stay sharp.
  3. Claude Code renders the final PNG and checks it.

My CLAUDE.md rule already does the first step for me: when a task needs an image, Claude asks whether to use the local ComfyUI skill or something else.

Don't ask an Artifact for a photo and expect a result. You will get a drawing made of shapes. If you want a photo, go straight to ComfyUI or another image model.