r/StableDiffusion • u/FotoRe_store • 4d ago
Resource - Update Not diffusion: a strong language model paints in oil, stroke by stroke, in an open-source painting simulator, a Python easel for LLMs
Prompt: draw an exact copy of the Mona Lisa using Leonardo da Vinci’s techniques.
Prompt: Draw a picture based on the photo in the expressionist style →
Draw a picture based on the photo as if you were a great marine artist →
Prompt: draw an exact copy of the Mona Lisa using Leonardo da Vinci’s techniques.
Prompt: Draw a classic portrait using oil paints →
Prompt: Draw a winter version of the logo.
Prompt: Draw a picture based on the photo in a free style →
Almost everything in this subreddit is about diffusion, so I want to show a different path to a picture. aibrush is an open-source oil-painting simulator in Python. Think of it as a Python easel built specifically for strong language models to work with. There’s no generative model inside and no GPU needed. The picture is painted by a language model (I’ve been using Claude): it lays strokes with code, looks at the result with code, and decides what to do next, like an artist at an easel, except it does everything in code (that’s what’s comfortable for it).
How it differs from generation. Generated “paintings” look like paintings only from a distance. Up close they fall apart: you can’t follow a single stroke, the texture is the same across the whole canvas, the “brush marks” don’t follow the form, the light behaves strangely, the paint never runs out, and so on. In aibrush, every stroke is computed from individual brush hairs: pressure, paint that runs out and gets dirty, wet paint mixing into wet, paint thickness with light on the relief, canvas grain, drying layers, spectral color mixing. There are tools like the palette knife and masking tape, different brush shapes and ways of using them, and more. No pixels come from a reference or a network: everything on the canvas comes from paint, brush and the work of the AI artist, like at a real easel.
What you get besides the picture (which looks strikingly different from generation):
- A stroke journal. Replaying it gives the same canvas, you can ask the model to fix a single stroke or a group of strokes, or build a timelapse.
- A height map of the paint relief in millimetres, even for 3D printing.
- The model’s decisions in words. In my runs it writes down its plan before the first stroke and an honest list of weak spots at the end. You can give the model full autonomy with a one-shot prompt, or stand at the AI artist’s shoulder and correct every step.
- It plays well with generation. For example, your SD image can be the input: a sketch or reference that the model paints as a real oil painting.
How to try it. Free, no account: https://github.com/neokrasav4ik/aibrush. Give the model a link to the repo, or drop the archive into a chat where it can run Python, or git clone and pip install -r requirements.txt. Then in your own words: “Read README.md and paintin oil.”
The best results so far come from strong models at the level of Claude Opus and Fable. The API names and docs are in Russian, but that doesn’t bother the model.
44
u/Formal-Exam-8767 4d ago
Ingenious! Thanks for sharing.
I suppose those images pass AI art detector?
33
u/Altruistic-String891 4d ago
But a LLM is a generative model. "no GPU needed" because you're using a sub; you wouldn't need a gpu if you sub to or pay for cloud services hosting diffusion/flow models either.
Otherwise, nice work.
8
u/Ireallydonedidit 4d ago
How is the token usage on something like this? Does it continuously make screenshots to look at the result?
I remember someone making something like this but physical and it was very expensive
4
u/FotoRe_store 4d ago
The image features a table lamp, a window, and the caption “Claude,” and it was accompanied only by a text prompt: “Draw a self‑portrait that reflects your inner world.” Fable 5.2
71
u/Enshitification 4d ago
Up until now, I've said that the only artists that were actually threatened by generative art were digital artists. Add a robot arm and some additional controller software, and more traditional canvas artists are going to go apeshit too.
3
u/DelinquentTuna 4d ago
There's no reason it must be so.
And again, no reason it must be so.
I don't read Russian, but I expect your harness probably already has most of what you'd need to setup a perceptual anchor to train a dit to very nicely mimic your outputs. Honestly, even the height maps alone are possibly sufficient.
6
u/KriosXVII 4d ago
This is a great idea and will likely create much better results that the current approach.
1
u/FotoRe_store 3d ago
starter prompt template/example:
TASK Paint an oil painting in aibrush: [subject]. Format: [size, orientation]. References: [photo / sketch / description / none]. Style models: [artists or paintings]. What to take from them: [color, light, brushwork, composition…]. Mood: [2–3 words]. Focus of the painting: [object or area].
BEFORE YOU START Study the engine documentation and the style models. Write a short plan: the idea, the palette, the order of work, where the paint is thick and where it is thin, where edges are hard and where they are soft, and what stays generalized. Ask all your questions now.
A PAINTING, NOT IMAGE PROCESSING
The reference gives you the motif, the drawing and the light. Color, tone, selection and brushwork are your decisions.
Do not fit the canvas to the reference: do not take the color of each stroke from it, and do not place strokes by the difference between the canvas and the reference.
Paint with a limited palette of your own mixes.
Strokes follow the form of the object. Choose the brush for the task, from wide to narrow.
Put detail into the focus; generalize what is secondary. Detail means drawn objects, not tiny strokes.
Do not repeat one move on a grid: vary length, angle, pressure, tone and rhythm.
WORKFLOW
A small study of the whole canvas. Show it and wait for my answer.
One finished fragment of the hardest area. Show it and wait for my answer.
Then work autonomously: from general to specific, from far to near. After each major stage, show the whole canvas and several 1:1 crops. Test every new technique on a fragment first, in two or three variants.
PAINT
Cover the whole canvas from the first layer; neighboring areas overlap.
Plan paint thickness from the start: unwanted relief is hard to remove later.
Use texture where the idea needs it; keep the rest calm.
CHECK AFTER EVERY STAGE Look at the whole canvas and at 1:1, with lighting and without it. Measure gaps and relief with the engine’s own tools. Look for: ground or lower layers showing through, ripple, repeating patterns, seams and mask borders, flat empty areas, drawing and perspective errors, accidental color, inconsistent handling. Fix what you find before the next stage.
CORRECTIONS
Repair in place, with a before/after test.
Do not repaint what already works. Restart the whole canvas only with my consent.
Keep every version I have seen.
DELIVERY Deliver when a repeated check finds nothing left to improve. Include a list of weak points: what did not work and what was not checked.
TECHNICAL Use no more than [N] CPU cores; memory: [no limit]. Save the canvas state and the journal after every stage. Run long jobs so that an app crash does not kill them. Look up difficult techniques from artists who work in real oil paint, not in digital painting.
9
u/lostinspaz 4d ago
neat technique.
fyi for those who don’t know, this kind of thing was also done algorithmically before the ai era though.
for example,
https://www.researchgate.net/publication/216813528_From_Image_Parsing_to_Painterly_Rendering
and various other programs.
4
u/Ghostwoods 4d ago
Extremely clever.
3
u/Altruistic_Heat_9531 4d ago
Do Monet lmao
2
u/shroddy 4d ago
How well can smaller local models do it?
2
u/Hexxxer 4d ago
Ill piss around with this tonight. Looks fun
2
u/Loonsive 4d ago
alright its happening
2
u/sp3zmustfry 2d ago
I was eagerly waiting for the release of this.
Qwen painted me Saturn.
2
u/Uncensored4488 4d ago
Thank you for sharing
2
u/whatever462672 4d ago
This is really interesting. Nice work, thank you for sharing!
2
u/herr-tibalt 4d ago
Take my upvote although the sub is wrong😀
1
u/Stepfunction 4d ago
This is really neat.
1
u/StableLlama 4d ago
Sou nds interesting, especially when you could make a video of how it is done, how the empty canvas turns to the image stroke by stroke.
Bob Ross anyone? Where are the little accidents?
1
u/Deep-Sprinkles-3970 4d ago
I have no idea how this works for now, but I have given it to GPT to remind me to try later. I love the way it looks!
1
u/ResearcherSuitable45 4d ago
This is very cool, how does the cost compare with respect to the generation models?
1
u/TizocWarrior 3d ago
This is scary, thanks.
1
u/FinAdda 3d ago
Do you need to have an image of the painting? or can you describe the painting?
1
u/PoleRacers 3d ago
Super interesting. I'd love to see a timelapse of the stroke log!
1
u/namitynamenamey 3d ago
Can this be used with local models? As in, can they use it at all, technically speaking?
1
u/mastaquake 2d ago
How long does it take to generate an image.
1
u/NoYogurtcloset4090 16h ago
The painters were left truly speechless. I believe that one day, it will be possible to produce a solution to the Riemann Hypothesis that is easy for humans to read and understand.
-1
u/detailteufel 4d ago
We've had this 15 years ago it was called Dynamic Auto Painter and the results are just as bad now as they were back then
17
u/answerguru 4d ago
Glad to see this reposted as you got slaughtered jn the Claude sub. I think this is brilliant work.
Would love to see this not only connected to robot arm and vision system, but also see how quickly an algorithm could be tuned to mix the paints on demand which isn’t an intuitive process.