File size: 1,750 Bytes
ef39f02 1fef601 ef39f02 1fef601 3d04829 1fef601 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
---
license: apache-2.0
pipeline_tag: text-to-image
library_name: diffusers
---
# InstanceAssemble
> Official implementation of "InstanceAssemble: Layout-Aware Image Generation via Instance Assembling Attention" (NeurIPS 2025).
<p align="center">
<img src="https://github.com/FireRedTeam/InstanceAssemble/raw/main/fig/teaser.jpg" alt="Teaser of InstanceAssemble" width="800">
</p>
This repository contains the model used in [InstanceAssemble: Layout-Aware Image Generation via Instance Assembling Attention](https://arxiv.org/abs/2509.16691).
## Introduction
InstanceAssemble is a lightweight framework for Layout-to-Image generation that enables precise spatial control. We also introduce DenseLayout and Layout Grounding Score (LGS) for rigorous evaluation, where InstanceAssemble achieves state-of-the-art performance on both sparse and dense layouts.
For the official code and more details, please refer to the GitHub repository: [https://github.com/FireRedTeam/InstanceAssemble](https://github.com/FireRedTeam/InstanceAssemble).
## Usage
### Inference
```bash
# sd3 based
python inference.py --model_type sd3 --input_json ./demo/bigchair.json
# flux based
python inference.py --model_type fluxdev --input_json ./demo/bigchair.json
python inference.py --model_type fluxschnell --input_json ./demo/bigchair.json
```
### Streamlit demo
```bash
streamlit run demo.py
```
## Citation
```
@article{xiang2025instanceassemble,
title={InstanceAssemble: Layout-Aware Image Generation via Instance Assembling Attention},
author={Qiang Xiang and Shuang Sun and Binglei Li and Dejia Song and Huaxia Li and Nemo Chen and Xu Tang and Yao Hu and Junping Zhang},
journal={arXiv preprint arXiv:2509.16691},
year={2025},
}
``` |