# install diffusers
pip install diffusers==0.29.2
# download the models
cd AIComposer
git lfs install
git clone https://huggingface.co/sherlhw/AIComposer
mv AIComposer mlp_modelSeveral input samples are available under ./examples directory. Each sample involves one background (background_image), one foreground (ref_image), one segmentation mask for the foreground (ref_mask), and one user mask that denotes the desired composition location (background_mask).
More samples are available in AIComposer Test Benchmark or you can customize them.
python demo.py # SDXL版本
Our work is standing on the shoulders of giants. We thank the following contributors that our code is based on: diffusers, IP-Adapter, TF-ICON and Magic Insert.
If you find AIComposer useful for your research and applications, please cite using this BibTeX:
@article{li2025aicomposerstylecontentimage,
title={AIComposer: Any Style and Content Image Composition via Feature Integration},
author={Haowen Li and Zhenfeng Fan and Zhang Wen and Zhengzhou Zhu and Yunjin Li},
booktitle={arXiv preprint arxiv:2507.20721},
year={2025}
}