What they did
The authors developed GenClaw, a multi-stage agentic pipeline for image generation. In the first stage, an LLM performs web search and reasoning to build a conceptual knowledge base for the desired image. In the second stage, the LLM generates executable code—using SVG, HTML, or Three.js—to produce a visual sketch that defines layout, geometry, and composition. In the third stage, an image generation model (e.g., a diffusion model) applies textures, materials, and photorealistic details onto the code-rendered sketch. The system allows users to inspect and edit the intermediate code, providing a controllable canvas between language and pixels.
Key findings
- The staged code-sketch-to-texture workflow produces images with higher structural fidelity than end-to-end text-to-image models, as measured by layout consistency and object placement accuracy.
- Users can directly modify the intermediate code (e.g., change SVG coordinates or colors) to achieve targeted edits without regenerating from scratch, enabling precise local control.
- GenClaw outperforms baseline agentic image generation systems in interpretability, as the code canvas allows human inspection of the agent's geometric and compositional decisions at each step.
Why it matters
This work challenges the prevailing black-box prompt-refinement loop by reintroducing a programmatic intermediate representation that mirrors human artistic workflows (sketching before coloring). It opens the door to more controllable, interpretable, and editable image generation systems, where the agent's reasoning is transparent and modifiable via code.
Caveats
The paper does not provide quantitative comparisons on standard image generation benchmarks (e.g., FID, CLIP score) against strong text-to-image baselines. The code-sketching stage relies on the LLM's ability to generate valid, well-formed code, which may fail for complex scenes. The final texturing step assumes a compatible image model that can fill in details without distorting the sketch; robustness to varied code formats is not extensively evaluated.