ICCV · 2025

X-Prompt: Towards Universal In-Context Image Generation in Auto-Regressive Vision Language Foundation Models

Zeyi Sun, Ziyang Chu, Pan Zhang, Tong Wu, Xiaoyi Dong, Yuhang Zang, Yuanjun Xiong, Dahua Lin, Jiaqi Wang

Key takeaway

X-Prompt extends autoregressive vision-language modeling to in-context image generation, allowing example prompts to specify both familiar and previously unseen generation tasks. arXiv abstract · v2

Abstract

In-context generation is a key component of large language models' (LLMs) open-task generalization capability. By leveraging a few examples as context, LLMs can perform both in-domain and out-of-domain tasks. Recent advancements in auto-regressive vision-language models (VLMs) built upon LLMs have showcased impressive performance in text-to-image generation. However, the potential of in-context learning for general image generation tasks remains largely unexplored. To address this, we introduce X-Prompt, a purely auto-regressive large-vision language model designed to deliver competitive performance across a wide range of both seen and unseen image generation tasks, all within a unified in-context learning framework. X-Prompt incorporates a specialized design that efficiently compresses valuable features from in-context examples, supporting longer in-context token sequences and improving its ability to generalize to unseen tasks. A unified training task for both text and image prediction enables X-Prompt to handle general image generation with enhanced task awareness from in-context examples. Extensive experiments validate the model's performance across diverse seen image generation tasks and its capacity to generalize to previously unseen tasks.

Author abstract · arXiv abstract · v2

Publication

IEEE International Conference on Computer Vision (ICCV), 2025

Paper and resources

Research topics

X-Prompt · In-context image generation · Autoregressive vision-language models · Visual prompting · Task generalization · Context compression · Text-image prediction · Few-shot generation

Research problem and approach

Strong text-to-image generation does not by itself provide general in-context visual learning. X-Prompt uses example context to infer generation tasks within a unified autoregressive framework. arXiv abstract · v2

Main contributions

Method comparison

ApproachKey difference
Text-to-image generation aloneProvides generation capability without necessarily learning new visual tasks from contextual examples.
X-PromptJointly predicts text and images while compressing useful example context for in-context task inference.

arXiv abstract · v2

Selected results

  • In novel-task in-context evaluation, adding X-Prompt tokens improves NYU-v2 depth RMSE from 0.390 to 0.352 and Rain100H deraining PSNR from 18.10 to 18.91 dB, compared with in-context prompting without those tokens. Table 4 · tasks held out from training · arXiv v2
  • Adding text prediction to the image-generation training objective raises GenEval overall performance from 0.49 to 0.57. Position and color scores rise from 0.14 to 0.26 and from 0.71 to 0.85, respectively. Table 1 · joint text-prediction ablation · arXiv v2

Cite this paper

Zeyi Sun, Ziyang Chu, Pan Zhang, Tong Wu, Yuhang Zang, Xiaoyi Dong, Yuanjun Xiong, Dahua Lin, Jiaqi Wang. X-Prompt: Generalizable Auto-Regressive Visual Learning with In-Context Prompting. Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2025, pp. 17268–17280.

This citation uses the author list of the published version.

@inproceedings{arxiv241201824,
  title     = {{X-Prompt: Generalizable Auto-Regressive Visual Learning with In-Context Prompting}},
  author    = {Zeyi Sun and Ziyang Chu and Pan Zhang and Tong Wu and Yuhang Zang and Xiaoyi Dong and Yuanjun Xiong and Dahua Lin and Jiaqi Wang},
  booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
  month     = {October},
  year      = {2025},
  pages     = {17268--17280},
  url       = {https://openaccess.thecvf.com/content/ICCV2025/html/Sun_X-Prompt_Generalizable_Auto-Regressive_Visual_Learning_with_In-Context_Prompting_ICCV_2025_paper.html}
}