CHATS is a next-generation framework that unifies human preference alignment with classifier-free guidance by modeling both preferred and dispreferred distributions and using a proxy-prompt-based sampling strategy for superior text–image alignment, fidelity, and aesthetic consistency. See the images generated below for examples.
Generation examples using CHATS (cf. Fig.1 in our paper).
🚀 Key Features
Human-Aligned Fine-Tuning with CFG Integration
We integrate human preference alignment with classifier-free guidance sampling into a unified framework.
Proxy-Prompt Sampling
Leverage useful signals from both preferred and dispreferred distributions at test time.
Data Efficiency
State-of-the-art results across benchmarks with minimal fine-tuning effort on a small, high-quality dataset.
Plug-and-Play
Compatible with any diffusion backbone and existing guidance methods.
📦 Installation
git clone https://github.com/AIDC-AI/CHATS.git
cd CHATS
pip install -r requirements.txt
📂 Model Checkpoints
We provide pretrained CHATS checkpoints on SDXL for easy download and evaluation:
Model Repository
:
🛠️ Quick Start
import torch
from pipeline import ChatsSDXLPipeline
# Load CHATS-SDXL pipeline
pipe = ChatsSDXLPipeline.from_pretrained(
"AIDC-AI/CHATS",
torch_dtype=torch.bfloat16
)
pipe.to("cuda")
# Generate images
images = pipe(
prompt=["A serene mountain lake at sunset"],
num_inference_steps=50,
guidance_scale=5,
seed=0
)
# Save outputsfor i, img inenumerate(images):
img.save(f"output_{i}.png")
🏋️ Training
To train CHATS from scratch or fine-tune on your own data, run:
config_file: This DeepSpeed parameter allows you to specify the configuration file. If you wish to adjust the number of GPUs used for training, simply change the value of
num_processes
in the ac_ds_xgpu_zero0.yaml file to reflect the desired GPU count.
pretrained_model_name_or_path: name or patch of unet model to load
pretrained_vae_model_name_or_path: name or patch of vae model to load
max_train_steps: max steps to train
output: output dir
dataset_name: the huggingface sufix of the selected dataset (e.g. OIP)
📚 Citation
If you use CHATS, please cite our ICML 2025 paper:
@inproceedings{fu2025chats,
title={CHATS: Combining Human-Aligned Optimization and Test-Time Sampling for Text-to-Image Generation},
author={Fu, Minghao and Wang, Guo-Hua and Cao, Liangfu and Chen, Qing-Guo and Xu, Zhao and Luo, Weihua and Zhang, Kaifu},
booktitle={International Conference on Machine Learning (ICML)},
year={2025}
}
We used compliance checking algorithms during the training process, to ensure the compliance of the trained model to the best of our ability. Due to complex data and the diversity of language model usage scenarios, we cannot guarantee that the model is completely free of copyright issues or improper content. If you believe anything infringes on your rights or generates improper content, please contact us, and we will promptly address the matter.
CHATS huggingface.co is an AI model on huggingface.co that provides CHATS's model effect (), which can be used instantly with this AIDC-AI CHATS model. huggingface.co supports a free trial of the CHATS model, and also provides paid use of the CHATS. Support call CHATS model through api, including Node.js, Python, http.
CHATS huggingface.co is an online trial and call api platform, which integrates CHATS's modeling effects, including api services, and provides a free online trial of CHATS, you can try CHATS online for free by clicking the link below.
CHATS is an open source model from GitHub that offers a free installation service, and any user can find CHATS on GitHub to install. At the same time, huggingface.co provides the effect of CHATS install, users can directly use CHATS installed effect in huggingface.co for debugging and trial. It also supports api for free installation.