r/ClaudeAI • • 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.txt

Then 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.

115 Upvotes

79 comments sorted by

•

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

16

u/FotoRe_store 7d ago

Small correction: the 8 days went into building the engine, and 40M tokens was the failed run we learned from. A good sheet took 13M. Nothing is copied pixel by pixel. The model lays brush strokes, and every pixel comes out of hairs, paint and canvas. Copies of known paintings are the test, because that’s where you can see whether it reads as oil. The engine paints from a photo, a sketch or plain text just as well.

30

u/joonty 7d ago

was the failed run we learned from.

Hi Claude

17

u/unoriginal_npc 7d ago

How is this not over engineered copy pasta?

3

u/thinkt4nk 6d ago

"in oil" lol

6

u/kilopeter 7d ago

It is.

2

u/5ollys 7d ago

What are some practical uses of that? Why not just copy paste?

14

u/swelteh 7d ago

“Claude paint me like one of your French girls”

1

u/boyyouguysaredumb 6d ago

It can be used as a filter for an existing photograph to get the same look or told to create something the same way from scratch?

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.

9

u/Kindly-Sail6260 7d ago

I think a much stronger show of your app is to show original works that Claude can make rather than telling to paint an established painting. That way there’s no confusion as to how good your product can be. I hope this helps.

You have good intentions, but people on Reddit don’t want to see copied works anymore. They want to see originality shine through. Even if it’s AI generated.

2

u/FotoRe_store 7d ago

You don’t have to wait for me: it’s free, so give your own Claude the repo and ask it to paint anything you like. Your dog, a street from your trip, or even something it “wants” to paint itself with no reference at all. You’ll get your answer to “how good can it be” first-hand, and I’d honestly love to see what people get. Post them here!

0

u/Kindly-Sail6260 7d ago

That’s the thing, I can’t right now lol I’m away from home and my Claude sub is overdue haha so I have no way of testing it myself.

Don’t take this the wrong way, but from a marketing perspective, if you want people to recognize the work you’ve done, telling them to do it yourself after showing someone else’s work doesn’t instill trust in the consumer. It feels disingenuous even though you mean well.

Just a food for thought for the next time you show off your product. I you have your own personal examples to show original work through this app, I guarantee you, you will find people to be more agreeable and appreciative rather than being standoffish since right now, the climate surrounding AI is very divisive. I wish you all the best of luck with your endeavors though!

Keep pushing!

1

u/Either-Complex11 4d ago

Waste of time post

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 • Bravo

so what's the purpose? looks like "copy this input image so pixels match" with extra steps

3

u/FotoRe_store 7d ago

The copies are just the test bench: with a known original it’s easy to see whether the result reads as paint or as a filter. The engine itself has no “match the input” mode. The input can be a photo, a sketch, or just text, and the model decides every stroke: which brush, which direction, where the paint is thick and where an edge goes soft. That’s why the README warns models against exactly the thing you describe. A loop of “put a stroke wherever the canvas differs from the target” works within an hour and gives a dead, coloring-book result.

The point is to give a model a real painting tool instead of making it fight with Paint or Krita. What it paints, and in what manner, is up to the model and you. What you get back isn’t a bitmap. It’s a stroke journal you can replay and edit, with real paint thickness: the engine can even export a height map of the relief in millimetres.

3

u/my_penis_loves_you 7d ago

Maybe if it actually controlled a robot arm with real brushes and oil paints it would be cool.

1

u/ElasticSpeakers 7d ago

ngl this is what I thought OP did, and this is sort of on the path to that, but also not since robotic arm control for painting is extremely difficult

7

u/Many-Membership-2794 7d ago

You mean pillow in python? lol

8

u/CorpCarrot 7d ago • Bravo

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?

1

u/Either-Complex11 4d ago

What are you even doing on this sub if you cant see this is an interesting and novel approch to AI image gen

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

43

u/brokenwingsR 7d ago edited 7d ago

'Live off creating AI generated art'

'Lack creativity'

Lmfao. The jokes just write themselves.

8

u/MissingBothCufflinks 7d ago

People reflexively hate AI because it makes them pointless

7

u/fligglymcgee 7d ago

I personally don’t hate ai as a broad technology, but I think it’s understandable how many people are exasperated at the percentage of ai-related output that is made up of knockoffs and get-rich-quick schemes.

4

u/P529 7d ago

lmao no

2

u/Siriann 7d ago • Bravo

People hate AI because they define themselves by their job.

1

u/CheckMateFluff 7d ago

People can see how valuable it is. They just don't like what they see; that's why you see them pretending it's nothing.

-3

u/peru000 7d ago

ImageGen makes slop, this thing just de-sloppifies it a little. Opus 5.5 can make good art on its own tho

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 ?

1

u/FotoRe_store 7d ago

Not really what it’s built for. aibrush simulates oil paint: hairs, wet paint mixing, thickness, relief catching light. A tablet painting is the opposite physics: clean digital strokes with no paint load and no relief.

1

u/Expensive-Editor8851 6d ago

well... i build it with claude in 10min myself... i was thinking it takes more time

i also gave it 20 different styles, also oilpainting, pencil, and so on... works perfect

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 • Bravo

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.

2

u/ShesMashingIt 7d ago

Can you tell me more about what you mean by "hide the vegetables"? I too suffer from executive dysfunction (I both know I do, and have been told so), but I am somehow always surprised by learning new things about what executive dysfunction even means. I just feel so powerless to help myself when I don't even understand well what's wrong with me

0

u/Jmackles 7d ago edited 7d ago

Oh yeah I lost the thread in my comment there 😅

I play the long game with my executive dysfunction because it entirely depends on

a. If I have the spoons to do something that day in the first place (Google spoon theory if you don’t know what that is! Super useful and you will like it if you don’t already) ,

b. Those spoons don’t get immediately consumed by a totally irrelevant hyperfixation. I’ve found that while I cannot control my executive function into something other than my hyperfixation (ie simply change what I’m fixated on), I can channel it down a path of least resistance. And I can set up dominos in advance to act as shiny attractants to catch my eye when the wheel of hyperfixation spins yet again as it inevitably will. And the key thing I keep in the forefront is that I will experience these things whether I want to or not. I forget that on my productive days. Which is where the next one comes in

c. I have the wherewithal and determination to lay out those initial pieces.

Sorry I’m so disjointed. I’m digressing hard.

If I know I am trying to learn programming and have a project I want to make, but don’t have the motivation to do it, I will try to have things easier to access that are tangential to the project or close enough to where I might overlap it into the other hyperfixation.

Because I have ODD, I have this absurd notion that doing something correctly or completing a task proves naysayers right and that in itself paralyzes me from doing the thing. But I’m crafty. If I know I’m trying to just hop tracks from a video game I like to modding it for instance I might buck because instinctively I know the real purpose is to do the modding.

But do it with enough things at once and you can’t quite tell which one is the important one and which one is the trick and the whole while you’re doing something because hyperfixation is free spoons and you’re gonna use them.

So I call it hiding the vegetables or playing 5D chess with myself because I’m having to elaborately dance around the preposterous lengths I will go to to avoid doing something I absolutely need to get done.

Edit- not to imply I don’t experience executive function outside of hyperfixation, it’s just a regular up in the air thing day to day. Hyperfixations are mostly a stable period of predictable function. Think trisolaris from 3 body problem. Focus on preserving state through chaotic eras and quickly rebuilding in the stable ones.

I also forgot to point out that I would be surprised if OP didn’t have some interest in painting and oil painting and how it works, but that’s purely an assumption.

2

u/SageHamichi 7d ago

If you have an executive dysfunction, work on it and yourself, don't use these "tools" as crutches for your inadequacy. Pathetic.

0

u/Jmackles 6d ago • Bravo

“If you don’t have use of your legs, work on it yourself, don’t use literal crutches for your inadequacy. Pathetic.” The fucking irony and to actually use the word crutch in it is priceless. Classic stupid take and classic surface level armchair diagnosis with surface level understanding.

But for real though homie you are not giving me some sort of revelatory secret that I somehow didn’t think about or hadn’t heard before this point.

There are disabilities that are invisible to the naked eye. There are conditions that flare up, there are conditions that are triggered by stimuli, there are conditions where a person might appear functional but are masking and that in itself is its own set of tasks to maintain which can be draining. Sometimes people even have to recover for hours or days for mundane activities you and even I take for granted every single day.

I shouldn’t even have to qualify what causes my executive dysfunction nor validate its impact; it’s a documented symptom of several disabilities and many of them overlap and therefore compound.

All that aside how dickish it is of you to tell randos you know nothing about that they are pathetic when they simply refer to a symptom of their disability. Have you considered going and fucking yourself?

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.

0

u/[deleted] 7d ago

[deleted] — view deleted comment

0

u/estebanvlobos 7d ago

art is an expression of human emotion, humanity creates art. robots do not nor will they ever.

0

u/Derefringence 6d ago

Go get some sleep

-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

10

u/FotoRe_store 7d ago

Flip it around: why doesn’t anyone want Claude to have its own Krita? People get Photoshop, Procreate, real brushes and real paint. Models get either a diffusion model that makes the whole picture for them, or a pixel API where they suffer through every line. Claude can already write code, plan and look at an image critically. aibrush just gives it a proper tool for the hand: a brush, paint and a canvas that respond the way real ones do. Then you can see what a model actually does as a painter, stroke by stroke, instead of getting one more generated image.

2

u/coolerdeath 6d ago

i see what you mean, but this seems kinda like algorithmic paiting, or a filter. have you tried making claude drawing something original of it?

-2

u/Psittacula2 7d ago

Thing is, if AI can do art well it can then teach art at more levels to more people also…

I would say that might be a wonderful thing? ;-)

1

u/Jmackles 6d ago

Something capable of guiding you brush stroke by brush stroke would be pretty cool for a unique painting from a photo. Sort of like you can use augmented reality on quest 3 to learn piano. Seems like an application this concept could be tooled towards

1

u/Psittacula2 6d ago

However it turns out, different applications will lead to more consolidation of techniques which are then amenable to learning (in this case) art, most likely so accessibility should eventually rise.

0

u/[deleted] 6d ago

[deleted] — view deleted comment

0

u/Psittacula2 6d ago

Your argument fails to hold up: Test, 100 students 5 teachers. While teachers are busy, AI can help with basic help… simple.