4 December 2026

AI and agents, every day. Straight to it.

ModelsQuick notes

Sergio Paniego’s model paints watercolours through editable JavaScript

Sergio Paniego published preference-based training for code-generated watercolours.

Lucas Ferraz

· 1 min read

Read in Portuguese

The model produces editable JavaScript that paints an image. Sergio Paniego published an open implementation using TRL and OpenEnv to train Qwen3.5-35B-A3B to paint watercolours with the p5.brush library. The original concept comes from Surya Narreddi.

A headless Chromium browser renders each program. The environment checks that sketches compile, use the drawing library and actually apply pigment. It also rejects attempts to manipulate scoring, such as placing text on the canvas.

The reward combines sketch validity, code length, visual comparisons against references and aesthetic preferences estimated by HPSv3. Paniego individually rated a reference pool of 178 model-generated paintings. Changing that pool changes the visual preference supplied to training.

One call cited in the source controls pigment bleeding beyond a shape:

brush.fillBleed(0.25)

Sergio Paniego’s “Training a coding model to paint watercolours with TRL and OpenEnv” links the environment, training scripts and models. The implementation’s drawing vocabulary remains deliberately restricted by its prompt to filled shapes rather than unrestricted library access.

Lucas Ferraz

Code & open source.

Read articles by Lucas FerrazEditorial policy
Report an error

Use 10–1,000 characters; a reply email shares this space.

Next in your reading list