r/ClaudeAI • u/FotoRe_store • 7d ago
Built with Claude Prompt: “Paint an exact copy of Manet’s Folies-Bergère”. An AI paints it in oil from Python: the brush runs dry, wet paint blends into wet. Timelapse
I built aibrush, a free, open-source (AGPL-3.0) oil-painting engine made specifically for Claude and other strong models. It's not an image generator and not a filter. The model writes Python, lays strokes one by one, looks at the result, measures it and repaints, the way a person works at an easel. Almost all of the code was written by Claude Code.
Repo: https://github.com/neokrasav4ik/aibrush
What it does
- Each stroke is simulated from individual brush hairs: pressure, paint load that runs out along the stroke, several colors on one brush, grooves left by the hairs.
- Wet-on-wet: a stroke picks up and drags the wet paint underneath it. Dried layers stay clean.
- Pigments mix spectrally, not as RGB averages. Paint has thickness, and the relief is lit, so impasto catches light. There's canvas grain, layers and drying.
- Tools: flat, narrow, dry, soft brushes, blender, stipple, liner, palette knife, rag.
- The model gets "eyes": crops next to the reference at any scale, a squint view, tone/temperature/edge maps, a numeric diff against the target, and a per-stroke report (coverage, width, how much wet paint it picked up, edge hard or soft).
- It can try a stroke without touching the canvas, run several variants in parallel and keep one, snapshot and roll back.
- Every painting is a stroke journal (JSONL). Replaying it gives the same canvas bit for bit, and you can edit the journal without the model.
- Hard rule: every pixel comes from hairs, paint, pressure and ground. No pasted textures, no pieces of the reference, no generated pixels in the result.
The timelapse shows Claude Fable 5.2 painting a copy of Manet's A Bar at the Folies-Bergère with the engine. The two stills are the finished Bar and a Mona Lisa copy, both painted by Fable with aibrush from the originals.
How Claude built it
I set the goal and made the calls at the checkpoints. The code, the tests, the reviews and the docs were written by Claude Code sessions, organized like a small studio with departments:
- Engine: one session takes one item from a task file and implements it. Opus does ordinary code (speed, journal, tests). Fable does brush physics, where the question is whether it looks like paint.
- Acceptance: a fresh session that never saw the author's reasoning reviews each delivered item. It runs the full test suite from the exact commit, then looks at crops of its own test strokes next to real paintings at 1:1 and 4x. The rule is "look at the picture, not the number": tests passing while the crop looks wrong is a fail. It writes the verdict and the next task.
- Editor: at the end of each block, a fresh session checks the user docs against the code.
- Tech: tooling, git, and the script that pushes each accepted version to the public repo.
- Coordinator: the session I talk to. It opens the others.
Handoff happens through documents in git (a task file, a state file of at most 4 KB per department), never through chat. Each session handles one item and closes at about 200k context. That kept cost and quality predictable. In 8 days that was about 2,300 commits, around 19k lines of Python, about 90 test files, roughly 200 engine sessions and 290 acceptance sessions.
At the end of each block of work, a fresh Claude that has only the public repo and a brief paints a piece of a test landscape. We measure tokens, time, and the number of "paint, look" cycles. A separate fresh subagent judges the crops without any context. The answer has to be "oil painting", not "filter" or "pattern".
The most useful thing we learned: with the same engine and the same model, one run gave a good sheet with 9,777 strokes for 13M tokens. Another gave a bad one with 970 strokes for 40M tokens. The README decides how the model paints. So the docs describe what each tool does, measured on a blank canvas, and never give recipes like "how to paint a sky". When the docs had recipes, models followed them instead of deciding, and the paintings lost variety. The README also has advice that Claude Fable wrote for the next model after it painted with the engine. The main point: don't build an automaton that "puts a stroke wherever the canvas differs from the target". Decide every stroke yourself.
Try it (free)
No account or API key for the engine itself, just Python 3.10+, NumPy and SciPy.
git clone https://github.com/neokrasav4ik/aibrush
cd aibrush
pip install -r requirements.txtThen open Claude Code in that folder and ask it something like: "Read README.md, then paint <your subject or photo> as an oil painting." Paintings you make are yours.
Honest caveats: the API names and the user docs are in Russian (the project started that way). Claude reads them without trouble, but you'll see Cyrillic in the code. It's slow compared with generators: a good sheet costs the model millions of tokens, because it really lays thousands of strokes. Development is ongoing and the repo updates after every accepted change.
Happy to answer questions about the engine or about running a multi-session Claude Code setup like this.


•
u/ClaudeAI-mod-bot Wilson, lead ClaudeAI modbot 7d ago edited 7d ago
TL;DR of the discussion generated automatically after 50 comments.
Okay, the comment section is a bit of a battlefield on this one, so let's get into it.
The consensus is a sharp split between "this is pointless" and "this is brilliant."
A huge chunk of the thread, led by the highly-upvoted top comment, is roasting OP for creating what they see as an over-engineered, token-burning machine to do a simple copy-paste. The general sentiment from this camp is, "Why burn millions of tokens and wait days to reinvent ctrl+c ctrl+v?" They see it as just getting the "same fucking painting" with a lot of expensive extra steps.
However, an equally passionate group argues that the critics are completely missing the point. They, along with OP who jumped in to clarify multiple times, insist this isn't an image generator; it's a painting simulator. The value is in the process. The AI lays individual strokes, simulating wet-on-wet blending, paint thickness (impasto), and brush physics. This creates a more authentic "painted" look than any diffusion model and results in a "stroke journal" that can be replayed or even 3D printed.
OP clarified that the famous copies were just a "test bench" to prove the engine's realism and that its real power is in painting original works from photos, sketches, or text prompts with a true-to-life oil paint feel. A few users gave OP some solid marketing advice: show original creations next time to avoid the "it's just a copy" confusion from the start.
Also, a spicy side-debate kicked off about whether "living off AI-generated art" and "lacking creativity" can coexist in the same sentence. The jokes, as one user put it, write themselves.
91
u/zhssnym 7d ago
>be OP
>take an existing painting
>ask claude to recreate it pixel by pixel
>burn 40 million tokens
>wait 8 days
>get the same fucking painting
>be proud of having reinvented ctrl+c ctrl+v
9
u/FotoRe_store 7d ago
Guys, I think the copies threw you off. You can just give the model a photo of your backyard and a couple of Vincent van Gogh paintings, and ask it to paint your backyard in his manner. It measures his strokes first (length, width, direction, palette) and then paints your scene stroke by stroke. The result looks like a painting, with real brush marks and paint thickness, not like a generation. The Manet and Mona Lisa copies are only there because a known original is the easiest way to check that it reads as oil.
3
u/FotoRe_store 7d ago
aibrush is just a tool. But once a model has it, the space is as wide as your prompt. A few things you could ask your Claude:
- Paint my portrait from this photo in no more than 10 strokes. It will stubbornly test combinations of paint, flow and bristles on a scrap canvas until those 10 strokes read as you.
- Paint it only with the palette knife. Or with one color plus white.
- Paint the same scene three times in three different manners and put them side by side.
- Paint something you'd want to paint yourself, with no reference at all, and explain every decision.
- Go heavy on impasto, then export the relief height map and 3D-print it.
- Replay the stroke journal as a timelapse of the whole process.
None of these is a feature I built. It's the same brush, paint and canvas, and the model decides how to use them. That's the whole point.
6
u/-snip- 7d ago
“Engine” is such claudspeek
3
u/duffpl 7d ago •
so what's the purpose? looks like "copy this input image so pixels match" with extra steps
7
u/Many-Membership-2794 7d ago
You mean pillow in python? lol
8
u/CorpCarrot 7d ago •
Methinks some brigading is going on in this thread.
Anyone with passing familiarity with AI image gen should understand why this is cool. I could even see bots attacking this thread because your free tool is something that a much larger organization is already planning to implement.
In my photography journey I was initially drawn to HDR editing to make my photos look like painted pieces of art in different styles. The photoshop tools to do so didn’t often output something very good, and I had a lot of trouble getting exactly what I had in mind.
It appears that this could be useful for similar purposes. It’s very similar to the technique of using projected static images as painting reference, I know a watercolor artist that projects photography onto a canvas and then paints onto that projected overlay.
10
u/fate_plays_chess 7d ago
The people throwing hate are nuts.
Image gen in different styles from diffusion is always a visual approximation.
Synthesizing the strokes and materials to build a painting an action at a time is incredibly cool and (IMO) the real silver bullet for asset generation. For the discerning builders that want to use AI to build but won't tolerate slop.
I'm building an app rn that uses a lot of media assets and have been playing around with similar techniques to emulate ink illustration.
Very cool OP
4
u/answerguru 7d ago
This is impressive stuff. This methodology is fascinating and I really appreciate how’s laying down strokes in a non-deterministic way, figuring out where strokes go and blend to get closer to the target.
I really want a robot with colors that it can learn to blend and paint with. I imagine the lighting would need to be well controlled, at least during that color training phase.
4
u/mbbbbbr 7d ago
And what is purpose of it? What are we even doing here?
19
u/Ready_Plastic_9666 7d ago
I am so caught off guard by how many users seem to lack basic foresight and creativity in this thread. This tool is very valuable. Especially if you're in the print-on-demand business and you live off creating AI-generated art. You can create concepts using ImageGen and then you can actually have it repainted more realistically then any AI image gen would be able to. I forked your repo, thanks so much for the hard work! cheers
2
u/D-redditAvenger 6d ago
Just think no one had to prompt Manet, makes me appreciate it all the more. That just came from his mind.
3
u/CaptainCrouton89 7d ago
Love it, ignore the haters. This is promising.
3
u/hermannehrlich 7d ago
Это интересное экспериментальное искусство, как раз в наше время когда генеративные изображения обычно выглядят убого. Не обращай внимания на хейтеров
3
u/PessimisticPals 7d ago
Who is your audience? I'm watching as an artist that enjoys sketching and color blocking and don't see a use for myself.
Is it a quick way to apply the oil painting style to a series of images?
The sketch does not look human-like at all. Seems like tracing over something. My advice is to revisit the sketching application.
Good luck
3
u/paronsaft 7d ago
I don't understand the hate in comments. I think it's really cool and thanks for showing and sharing.
It would be cool if it had a goal of applying the strokes as you would expect the painter to. To get more of an idea how the original painters could have approached it. Perhaps set some limit on how many strokes and time it can do. Not my area, you have surely thought of much more... anyway I thought it was nice!
1
u/ll-__-II 7d ago
Can you tell it to augment painting or create something entirely new?
1
u/GPT-5entient 7d ago
I think this would be MUCH more interesting if you would instruct the models to rely on their memory to recreate it.
1
u/beornblackclaw 7d ago
gras sur maigre
1
u/Woodtoad 6d ago
Even the fucking post title is pure Claudism, fuck this reality.
1
u/Remote-Juice2527 6d ago
I like it 👏
1
u/nbates80 6d ago
This is Genius. You are a few (hard) steps away from making Claude paint on physical media
1
u/Mr_xales_ 7d ago
Do you have any examples of "original" works?
1
u/p1-o2 7d ago
People hate anything related to AI right now but genuinely this is cool. I don't care about the painting really, but the engine you built, and showing that you CAN make it work, that is excellent. People don't realize how many other fields that this can be generalized into.
Really good job. This is such a clever use of these tools.
0
u/Expensive-Editor8851 7d ago
do you think that would be also possible in a digital paint brush style? like some one painted it on a tablet with a pencil ?
0
u/Dependent_Turn1826 7d ago
This is why I can’t take you people seriously. Who tf cares about this
-1
u/Jmackles 7d ago •
Jesus Christ. People miss the point altogether imo. I suffer from executive dysfunction on a profound level. A great intersection of conditions that makes it paralyzing to do what I want but infuriatingly I will squirrel off on seemingly unimportant things. I’ve discovered that with tools like Claude I can use it as a medium to “hide the vegetables”. Sure this could be considered over engineered but doing literally anything whatsoever with executive dysfunction amounts to creating a series of Rube Goldberg tasks to get the thing done.
So while maybe silly to some it’s highly valuable to op because they learned a ton in the process and also created a very interesting simulated painting system that even removed from llms has interesting potential.
It rubs me the wrong way when people ask condescending pointless questions as to why someone might do something even if it already exists. Let people reinvent the wheel; at the very least you have someone who knows pretty intimately about wheels now and at best who knows? They made a proof of concept and open sourced it. The practical applications don’t need to be discovered by op at all, someone else might come along and put it to a use none of us thought to.
This is a neat project op.
0
u/peru000 7d ago
AI
0
u/peru000 7d ago
french blud
0
u/SageHamichi 7d ago
A clever trick. nothing more.
-6
u/estebanvlobos 7d ago
ai will never create art so i can't imagine a more pointless endeavor than this but congrats i guess.
-1
u/yo_les_noobs 7d ago
dude this is just copy pasting with A LOT of extra steps
-3
u/peru000 7d ago
Say "i am alive"
>I AM ALIVE
oh my god
-1
u/TheorySudden5996 7d ago
Diffusion models are cool, they start with all noise and slowly remove it but by bit until you have a very close copy.
-2
u/Training-Royal2384 7d ago
That's ju a screenshot with extra steps surely?
-2
u/Due-Button-3077 7d ago
I already have an AI that can copy any masterpiece in no time, it’s called my printer
0
u/[deleted] 6d ago
Ive seen humans do programmer art like this
It takes a VERY long time, and doesn't really give you any cool Dopamine hits.
0
u/[deleted] 7d ago
[deleted] — view deleted comment