Training AI to Paint with Code

surya.website

219 points by Tiberium 4 days ago


radarsat1 - 2 days ago

Beautiful.

I am reminded of a paper I was inspired by a long time ago [0], (okay it's 2018 so I guess just 8 years ago, but it feels like longer, from the before-times), that demonstrated learning brush strokes. At the time there was already a lot of work on GANs, but these are pixel-based methods, and I was really interested in the idea of how to derive descriptive methods of scene generation/understanding. I found this work really interesting because it combined RL and GAN techniques in a creative way. I miss that kind of research.

Now of course VLMs have shown that you can mix modalities in generalized sequence-to-sequence problems and it doesn't surprise me that this kind of thing is possible, but it's so nice to see it done well using modern techniques.

[0] https://proceedings.mlr.press/v80/ganin18a.html

kickingkeys - 2 days ago

Thank you for sharing this! did not expect to find my work on HN randomly haha

lxrogers - 2 days ago

Really awesome! Been thinking about how to get LLMs to do generative art (yes, the pre-AI definition of generative art). Love to see this approach and results!

lindyman - 15 hours ago

A fun diversion and general capabilities test that I like to do is to ask the models to "programmatically assign color and alpha values to a png to generate an image. it should be a painting or whatever subject interests you in the moment. 800x800" or something along those lines, and they'll make a "generative" art piece for you. For example first time I tried this Claude Fable used Python to generate a transparent PNG of a quartz crystal with inclusions that were variable depending on the seed number. So anyway yeah it's surprisingly easy to get the frontier models nowadays to make cool art!

_boffin_ - 3 days ago

I think this actually might be one of the best ways to train people to use AI. I can see this honing people's prompting abilities and expressiveness, along with constraints and desired outcome.

Wild the possibilities

mskogly - 2 days ago

Really liked your video presentation, thanks for sharing, especially the part of image generators locking us into a certain context immediately, reducing us to spectators instead of creatives.

Played a lot with p5js some years ago, might pick it up again and try some of your ideas. The reinforcement learning part sounds about above my skill level though. :)

dolmen - a day ago

SVG is image as code. This is basically a DSL with graphics primitives.

It seems to me that teaching a model to directly produce SVG is more helpful than teaching to write JavaScript that produce pixels.

By the way, someone here is benchmarking LLMs on how they draw an SVG of a pelican on a bicycle.

Brendinooo - 2 days ago

This is really nice, and it's a good reminder that we're so early with regards to how AI can be used to make art.

And the fact that it's flowers creates a pretty nice mental model for it! One can plant seeds and cultivate the plants that grow from them but ultimately aren't in complete control of the outcome.

iambenm - 2 days ago

It's Genetic Programming via LLM, cool!

mysterydip - 3 days ago

Makes me wonder, can any LLMs code in Logo? Could result in some interesting designs.

QAtration - 17 hours ago

thats cool) my Claudy always gives me "amazing" vector style pictures

eramooh - a day ago

jack lacan - sözü yazan bir doğa resmi yap

bombastic311 - 2 days ago

This is really really awesome

- a day ago
[deleted]
accomplishdent - 3 days ago

What is the JavaScript doing?

- a day ago
[deleted]
retinaros - 2 days ago

I did that on SVG mostly to teach it to draw pelicans but also to generalize it. most of the behavior is from SFT on the base model tho. RL is very ineficient at style or at least at generating novelty out of distrib.

thrance - 2 days ago

I've been building something similar, but for voxels. It's able to make pretty good models from just Python code (calling into a custom native module written in Rust). Better than I hoped it would, in fact, but it's still not perfect.

ACCount37 - 2 days ago

I wonder how the image generation models that generate SVGs work.

Are they trained roughly like this? Or is it an LLM conditioned on image? Or on diffusion latents from a model trained to emit SVG-compatible imagery?

- a day ago
[deleted]
13639366668 - 2 days ago

[flagged]

behnamoh - 2 days ago

[flagged]

yoloakki - 2 days ago

[flagged]

Alien1Being - 2 days ago

AI HYPE