---
title: CTRL-X
sdk: gradio
short_description: Structure and Appearance Control
app_file: app_ctrlx.py
---
# Ctrl-X: Controlling Structure and Appearance for Text-To-Image Generation Without Guidance (NeurIPS 2024)
[![GitHub](https://img.shields.io/github/stars/genforce/ctrl-x?style=social)](https://github.com/genforce/ctrl-x)
[Kuan Heng Lin](https://kuanhenglin.github.io)1*, [Sicheng Mo](https://sichengmo.github.io/)1*, [Ben Klingher](https://bklingher.github.io)1, [Fangzhou Mu](https://pages.cs.wisc.edu/~fmu/)2, [Bolei Zhou](https://boleizhou.github.io/)1
1UCLA 2NVIDIA
*Equal contribution
![Ctrl-X teaser figure](docs/assets/teaser_github.jpg)
## Getting started
### Environment setup
Our code is built on top of [`diffusers v0.28.0`](https://github.com/huggingface/diffusers). To set up the environment, please run the following.
```
conda env create -f environment.yaml
conda activate ctrlx
```
### Gradio demo
We provide a user interface for testing our method. Running the following command starts the demo.
```
python3 app_ctrlx.py
```
Have fun playing around! :D
## Contact
For any questions, thoughts, discussions, and any other things you want to reach out for, please contact [Kuan Heng (Jordan) Lin](https://kuanhenglin.github.io) (kuanhenglin@ucla.edu).
## Reference
If you use our code in your research, please cite the following work.
```bibtex
@inproceedings{lin2024ctrlx,
author = {Lin, {Kuan Heng} and Mo, Sicheng and Klingher, Ben and Mu, Fangzhou and Zhou, Bolei},
booktitle = {Advances in Neural Information Processing Systems},
title = {Ctrl-X: Controlling Structure and Appearance for Text-To-Image Generation Without Guidance},
year = {2024}
}
```