agentic image loops

A fixed image pipeline.
An agent making the decisions.

Three experiments in iterative image generation with ComfyUI. The workflow never changes; between frames, an LLM agent scores the image against a fixed rubric and writes the next prompt. The same grey coupe runs through all three: refined into a studio hero shot, moved from the studio onto a coastal highway through chained img2img, and improved further by selection and mutation across a population of prompts and seeds.

3 loop designs 41 images generated 5.1 min of GPU, total 1 frozen workflow (Krea 2 Turbo) every decision logged

How the work is divided

PYTHON

Everything that repeats is code

A small script watches a folder. When a prompt file appears, it runs it through the same frozen ComfyUI graph, saves the image, and appends one line to a log. It makes no judgment calls and never changes between runs, so results are repeatable and failures are easy to isolate.

THE AGENT

Everything that requires judgment is the agent

Between frames, an LLM looks at the image, scores it against a rubric locked before the run started, and writes the next prompt as a small JSON file. The two halves communicate only through files on disk, so the agent can be swapped — a frontier model, a local model, or a person with a text editor — without changing anything else.

The three experiments

What the logs taught us

The full write-up is on the findings page. Every prompt, seed, score and judge note is in data/, unedited.