Abstract
ImAgent is a training-free, unified multimodal agent framework that treats image generation as an iterative, self-correcting process. By employing a "policy controller" to dynamically select actions such as prompt enhancement and detail refinement at inference time, it significantly improves image quality and semantic alignment without requiring external models or fine-tuning. This approach allows image models to benefit from test-time scaling, similar to the reasoning capabilities observed in large language models.
Introduction
Current Text-to-Image (T2I) models, while impressive, often suffer from randomness and semantic misalignment. A single prompt can produce inconsistent quality, or the model may ignore complex constraints. Existing solutions, such as prompt engineering via external LLMs or Best-of-N sampling using separate Vision-Language Models (VLMs), are often disjointed and computationally heavy. ImAgent addresses this by asking: Can we build a single, unified agent that reasons, generates, and self-evaluates within one framework?
Methods: The Agentic Loop
ImAgent leverages unified multimodal models (e.g., Bagel or Janus-Pro) that possess both understanding and generation capabilities. The core of the framework is a Policy Controller that manages an iterative generation process. Instead of a one-shot attempt, the model acts as its own manager, analyzing the current prompt, the generated image, and the history of previous attempts to select the most appropriate next action.
The agent can choose from five distinct actions:
- Naive Generation/Editing: A standard baseline attempt.
- Prompt Enhancement with CoT: Expanding vague prompts into detailed descriptions using Chain-of-Thought reasoning.
- Prompt Revision: Analyzing image-text discrepancies to rewrite the prompt for better alignment.
- Image Detail Refinement: Fixing local textures, lighting, or artifacts.
- Best-of-N Sampling: Generating multiple candidates and selecting the one with the highest alignment score.
The loop continues for up to five steps or until the agent invokes a STOP action upon reaching a satisfactory result.
Key Results and Visual Evolution
The researchers evaluated ImAgent across rigorous benchmarks including R2I-Bench, WISE, and RISEBench. The results demonstrate that "agentic" generation consistently outperforms naive methods. For instance, on the RISEBench editing task, ImAgent improved the performance of the Bagel backbone by 114.8%, surpassing several commercial closed-source models.
Key Insights:
- Test-Time Scaling: Image models improve significantly when allowed to "think" and iterate, scaling computation at inference time to achieve higher quality.
- Bridging the Understanding-Generation Gap: Multimodal models are often better at critiquing images than generating them perfectly on the first try. ImAgent exploits this "vision" to guide the "drawing" process.
- Unified Efficiency: By keeping reasoning, evaluation, and generation within a single model, ImAgent avoids the overhead of loading multiple heavy external models.
Conclusion
ImAgent demonstrates that treating image generation as a multi-step reasoning task significantly boosts semantic alignment and visual quality. While the iterative nature increases inference latency, the gains in robustness and the ability to outperform much larger commercial models make it a promising direction for the next generation of multimodal systems. Future work will explore more complex action spaces and multi-agent collaboration.
Summary updated