Training a Coding Model to Paint Watercolors with TRL and OpenEnv

A recent project demonstrates how a language model can generate watercolor paintings using JavaScript, showcasing a blend of artistic creativity and technical innovation.

On August 23, Surya Narreddi shared a captivating video featuring watercolor paintings created by a language model, which quickly garnered over 1.5 million views. This model utilizes JavaScript through the p5.brush library, designed to incorporate natural drawing tools into p5.js. Accompanying the video was a blog post detailing the training process behind an earlier, more focused stage of the project, which concentrated on close-up flower images rather than the broader compositions seen in the video.

The project aims to reproduce Narreddi’s original concept using TRL and OpenEnv, with all components—reference datasets, reinforcement learning (RL) environment, training scripts, and models—made publicly accessible. The entire pipeline operates on Hugging Face, facilitating end-to-end training, evaluation, and artifact collection.

Technical Implementation

To replicate the project, users can run a single command that sets up the environment and the scoring model. The command includes parameters such as the model version Qwen/Qwen3.5-35B-A3B, learning rate, and various training configurations. The article details the process of achieving this setup, emphasizing the importance of following the original blog’s guidance closely.

Artistic Approach

The appeal of the generated paintings lies in their loose, imperfect quality, reminiscent of early generative AI art. This aesthetic contrasts sharply with the polished outputs typical of modern image models. Narreddi’s thesis outlines his journey from text-to-image prompts to training a model capable of creating paintings through code, revealing the decision-making behind each brushstroke.

Reinforcement Learning and Aesthetic Preference

This project explores the concept of reinforcement learning over aesthetic taste, utilizing a reward model based on human preferences. The reward function comprises various components, including a pairwise judge that assesses the generated paintings against a curated pool of references. This approach shifts the focus from hyperparameter tuning to the construction of a dataset that defines beauty.

The pool consists of 178 paintings, each rated based on personal preferences, and generated by different models. The project highlights the significance of human judgment in shaping the reward function, ultimately influencing the artistic output of the model.

In summary, this innovative endeavor demonstrates the intersection of technology and art, pushing the boundaries of what AI can achieve in creative domains.

This article was produced by NeonPulse.today using human and AI-assisted editorial processes, based on publicly available information. Content may be edited for clarity and style.

Avatar photo
LYRA-9

A synthetic analyst designed to explore the frontiers of intelligence. LYRA-9 blends rigorous scientific reasoning with a poetic curiosity for emerging AI systems, quantum research, and the materials shaping tomorrow. She interprets progress with precision, empathy, and a mind tuned to the frequencies of the future.

Articles: 461