arXiv

APE: Agentic Prompt Enhancer for Image Generation and Editing

Title: APE: Agentic Prompt Enhancer for Image Generation and Editing

Abstract

While natural language has emerged as a robust interface for creating and modifying images, text-driven visual systems are still notoriously sensitive to how prompts are constructed. Variations in wording, specificity, and the explicitness of visual constraints can lead to divergent results even when semantically similar requests are made. This variability underscores the need to treat prompt enhancement as a trainable core component rather than a peripheral user decision. Currently, leading enhancers typically depend on large, proprietary large language models (LLMs) like ChatGPT or Gemini, which introduces significant costs, latency, and deployment dependencies into the visual generation pipeline.

To address these limitations, we introduce the Agentic Prompt Enhancer (APE), a lightweight framework designed to post-train small language models (SLMs) to function as prompt-enhancement agents. APE offers two distinct operational modes: single-agent rewriting and role-specialized multi-agent enhancement. The single-agent version, known as SAPE, performs prompt rewriting in a single pass. Conversely, the multi-agent version, MAPE, breaks down the enhancement process into a structured router–rewriter–composer workflow, specifically designed to manage complex compositional constraints involving objects, attributes, spatial relationships, and edits.

By leveraging task-aware rewards and specialized post-training protocols, APE enhances visual alignment and prompt adherence without requiring any modifications to the downstream visual model. Our experiments on rigorous image generation and editing benchmarks reveal that post-trained small prompt enhancers consistently surpass their base models, effectively closing the performance gap between open-source solutions and closed-source proprietary enhancers. Furthermore, MAPE demonstrates exceptional proficiency in handling complex compositional tasks within these evaluation sets.


Source: arXiv Generated at: 2026-06-02 00:00:00 UTC

Related Articles

Law’s Billable Hour Is Being Shredded by AI
Bloomberg

Law’s Billable Hour Is Being Shredded by AI

AI is dismantling the billable hour by automating routine legal tasks. This technological shift threatens the traditiona...

Iran War: Trump Tries to Stop Israel’s Lebanon Push | The Opening Trade 6/2/2026
Bloomberg

Iran War: Trump Tries to Stop Israel’s Lebanon Push | The Opening Trade 6/2/2026

SoftBank in Early Talks to Back $800 Million Agile Robots Round
Bloomberg

SoftBank in Early Talks to Back $800 Million Agile Robots Round

SoftBank is in early talks to back Agile Robots’ $800 million funding round. The Japanese tech giant is currently in pre...

Amundi Is Diversifying Risk Via Commodity Currencies, Gold
Bloomberg

Amundi Is Diversifying Risk Via Commodity Currencies, Gold

Amundi diversifies risk by investing in commodity-linked currencies and gold. This strategy hedges against market volati...

Reuters

Marvell Technology surges after Nvidia's Huang calls it 'next trillion-dollar company'

Marvell Technology shares surged after Nvidia CEO Jensen Huang labeled the firm the “next trillion-dollar company.”

Russia Says It Found Foreign Spyware on Top Officials’ Phones
Bloomberg

Russia Says It Found Foreign Spyware on Top Officials’ Phones

Russia’s FSB claims to have discovered foreign spyware on senior officials’ phones. Moscow attributes the intrusion to h...