Hugging Face blog · AIHOT featured · Published 2026-09-03

Teach a coding model to paint watercolors with preference feedback

The model writes JavaScript, p5.brush renders the image, and execution checks plus human preferences feed back into training. The author shares code, an environment and a model for following the experiment.

Watercolor flowers in the original painting-with-code article
Image: Hugging Face source image · Open full-size image

中文

Connect code-based painting to training feedback

The experiment has a language model write JavaScript, renders watercolor images with p5.brush and wraps the painting environment in OpenEnv. Execution checks and image-preference scores provide feedback for training updates with TRL.

Connect code-based painting to training feedback
BitShovel illustration · Article dated 2026-09-03 · Flowers and environment are schematic · 1/2 · Open full-size image

中文

Where preferences come from

The author selected and manually rated 178 generated images to form a reference pool. These ratings express preferences embodied in the reference examples. The diagram follows the cycle from code to rendering, evaluation and another model update.

Sergio Paniego described the experiment in Hugging Face’s September 3 article, crediting Surya Narreddi’s original idea. Code, environment, data and trained models are published. Flowers here illustrate the process; they are not actual outputs or a measured comparison.

Where preferences come from
BitShovel illustration · Article dated 2026-09-03 · Flowers and environment are schematic · 2/2 · Open full-size image

Important additions and corrections

Dates below mark changes to our coverage.

  • Correction ·

    Withdrew a value claim not grounded in a specific use case, retaining the original tutorial for further review.

Sources and notes

sources中文

Sources and notes

Retained summary and context

Same-story corroboration proves multi-source collection and reachability only. Titles and claims are the creator self-report of the author or the carrying feeds' relay — not an independent BitShovel review, not proof of quality or adoption; the surrounding discussion is a discussion snapshot of attention, and attention is not proof of fact. Some origin domains may be unstable from mainland China.

Sources and evidence · 2 links

Each link has a purpose and scope. Link counts do not establish independent confirmation; direct support applies only to the statements specified below.

This page keeps the original link and a short account. Follow the links below for the publisher’s full explanation.

Source timeline
  1. · Found this reading link via Hugging Face blog, AIHOT featured.
Collection record

First discovered:

Collection and source publication have distinct dates.

Editorial record

Sources reviewed

· Beijing time (UTC+8)

This record lacks an interpretation for a specific use case. Its source material and prior selections are retained, while it is classified as a source note outside the three focus picks. Provenance and event dates remain unchanged.

Sources and full record

This dates our review of the wording and sources, not a project release or product update.

Full record: before, after and sources (JSON)

Corrections and feedback