ContextGen / README.md
ruihangxu's picture
update README
b640821
---
license: mit
language:
- en
base_model:
- black-forest-labs/FLUX.1-Kontext-dev
pipeline_tag: text-to-image
library_name: diffusers
tags:
- art
---
<h1 align="center">
ContextGen: Contextual Layout Anchoring </br> for Identity-Consistent Multi-Instance Generation
</h1>
<p align="center">
<a href="https://scholar.google.com/citations?user=5ZDU6wwAAAAJ">Ruihang Xu</a>,
<a href="https://scholar.google.com/citations?user=4C_OwWMAAAAJ">Dewei Zhou</a>,
<a href="https://scholar.google.com/citations?user=FyglsaAAAAAJ">Fan Ma</a>,
<a href="https://scholar.google.com/citations?user=RMSuNFwAAAAJ">Yi Yang</a><sup>&#8224;</sup> <br>
<span>ReLER, CCAI, Zhejiang University</span>
</p>
<p align="center">
<a href="https://github.com/nenhang/ContextGen"><img src="https://img.shields.io/badge/GitHub-Code-black" alt="GitHub Code"></a>
<a href="https://nenhang.github.io/ContextGen"><img src="https://img.shields.io/badge/Project-Page-brightgreen" alt="Project Page"></a>
<a href="https://arxiv.org/abs/2510.11000"><img src="https://img.shields.io/badge/arXiv-Paper-b31b1b" alt="Paper"></a>
<a href="https://github.com/nenhang/IMIG-Source"><img src="https://img.shields.io/badge/Dataset-Code-blue" alt="Dataset Code"></a>
<a href="https://huggingface.co/datasets/ruihangxu/IMIG-100K"><img src="https://img.shields.io/static/v1?label=%F0%9F%A4%97%20Hugging%20Face&message=Dataset&color=red"></a>
</p>
<div align="center">
<img src="docs/teaser.webp" alt="Teaser Image" style="max-width: 80%;">
<p style="text-align: left;">
<b>ContextGen</b> is a novel framework that uses <b>user-provided reference images</b> to generate image with multiple instances, offering <b>layout control</b> over their positions while guaranteeing <b>identity preservation</b>.
</p>
</div>
## 🚀 Usage
Please refer to our [GitHub Repository](https://github.com/nenhang/ContextGen) for detailed instructions on how to use ContextGen.
## 📭 Citation
If you find ContextGen helpful to your research, please consider citing our paper:
```bibtex
@article{xu2025contextgencontextuallayoutanchoring,
title={ContextGen: Contextual Layout Anchoring for Identity-Consistent Multi-Instance Generation},
author={Ruihang Xu and Dewei Zhou and Fan Ma and Yi Yang},
year={2025},
eprint={2510.11000},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2510.11000},
}
```