ChatGen: Automatic Text-to-Image Generation From FreeStyle Chatting

Chengyou Jia, Changliang Xia, Zhuohang Dang, Weijia Wu, Hangwei Qian, Minnan Luo

Abstract

Text-to-image (T2I) generation has seen significant advancements, yet remains inaccessible to many due to the complexities of prompt engineering, model selection, and parameter tuning. We present ChatGen, a framework designed to automate the entire T2I pipeline. By employing a multi-stage evolution strategy called ChatGen-Evo, our system transforms casual user descriptions into high-quality images by automatically selecting optimal models and technical configurations. Our results demonstrate that a 2B parameter model using this strategy can outperform much larger baselines, significantly reducing the manual effort required for high-fidelity content creation.

1. Introduction: The "Mice in a Maze" Problem

Despite the power of models like Stable Diffusion and DALL-E, the user experience often resembles a "mice in a maze" scenario. Non-expert users typically struggle with three primary hurdles:

  1. Prompt Engineering: The need to translate simple ideas into dense, tag-heavy descriptors.
  2. Model Selection: Navigating thousands of specialized, fine-tuned models (e.g., from platforms like Civitai) to find the one matching a specific aesthetic.
  3. Technical Configuration: Manually adjusting parameters such as CFG scale, sampling steps, and specific samplers, which vary in effectiveness across different models.

Existing automation tools often address only one of these steps. ChatGen aims for a fully Automatic T2I experience, where users provide "freestyle" input—including text, images, or conversation history—and the system handles the technical execution.

Figure 1: A specific character style rendered using Stable Diffusion 1.5, illustrating the specialized output ChatGen aims to automate.

2. The ChatGen-Evo Framework

Rather than relying on simple end-to-end fine-tuning, which often fails to capture the nuances of model selection and parameter logic, ChatGen-Evo utilizes a multi-stage evolution strategy.

2.1 Stage 1: Prompt Writing via SFT

The model undergoes Supervised Fine-Tuning (SFT) to learn how to rewrite casual user input into descriptive, high-quality prompts. To maintain the model's original capabilities and prevent "catastrophic forgetting," a specific prompt prefix is utilized during training.

2.2 Stage 2: Model Selection via ModelTokens

To manage the vast library of available T2I models, we introduce ModelTokens. Each specialized model is represented as a unique token within the Multimodal Large Language Model's (MLLM) vocabulary. This allows the system to "predict" the most suitable model for a given prompt as part of its natural language generation process, leveraging the LLM's internal probability space for efficient selection.

2.3 Stage 3: Argument Configuration via In-Context Learning (ICL)

Technical parameters are configured using In-Context Learning. By providing the MLLM with a few successful demonstrations of how a specific model should be tuned, it generates the necessary JSON-formatted arguments (e.g., sampler type, step count) for the current task without requiring additional training.

3. ChatGenBench and Evaluation

To evaluate this framework, we introduced ChatGenBench, a benchmark derived from 44,881 high-quality human demonstrations across 6,807 unique models scraped from Civitai. This benchmark is unique in providing ground truth for every intermediate step—prompt, model choice, and arguments—enabling rigorous step-wise evaluation.

Figure 6: An alternative rendering using DALL-E 3, showcasing the diversity of model architectures the ChatGen system must navigate.

4. Key Results and Insights

Our experiments reveal that breaking T2I into a reasoning chain (Prompt -> Model -> Args) provides a significant advantage over direct mapping.

  • Quantitative Performance: ChatGen-Evo (2B) achieved a Unified Metric score of 65.9, significantly outperforming the baseline (37.3) and even a larger 8B parameter base model (60.7).
  • Efficiency: The "Evo" strategy allows smaller models to punch above their weight class, demonstrating that architectural strategy is as important as raw parameter count.
  • Human Preference: In blind user studies, ChatGen-Evo maintained a 47% to 71% win rate over standard baselines in terms of relevance and visual quality.

5. Conclusion and Future Work

ChatGen-Evo successfully automates the trial-and-error nature of modern T2I workflows. While the system excels at single-turn and multimodal queries, challenges remain in maintaining stylistic consistency across long "History-based" multi-turn conversations. Future research will explore deeper reasoning methods, such as Chain-of-Thought or tree-based search, to further refine the model's ability to handle complex and ambiguous user requests.

Summary updated

BibTeX
@inproceedings{jia2025chatgen,
  author = {Chengyou Jia and Changliang Xia and Zhuohang Dang and Weijia Wu and Hangwei Qian and Minnan Luo},
  title = {{ChatGen: Automatic Text-to-Image Generation From FreeStyle Chatting}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.01240},
}
Figure