File size: 2,301 Bytes
b51d77d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
de81247
 
 
 
 
b51d77d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
base_model: stabilityai/stable-diffusion-xl-base-1.0
library_name: diffusers
license: apache-2.0
pipeline_tag: text-to-image
tags:
- stable-diffusion-xl
- stable-diffusion
- diffusers
- inversion
- dpo
- fine-tuned
---

# Inversion-DPO

**Original** https://huggingface.co/ezlee258258/Inversion-DPO

I have only added vae, text enconders from Stability AI, consolidated the unet and converted to a single .safetensor file FP32 and BF16.

**StabilityAI SDXL1.0** https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0

**Paper**: [Inversion-DPO: Precise and Efficient Post-Training for Diffusion Models](https://huggingface.co/papers/2507.11554)

**Code Repository**: https://github.com/MIGHTYEZ/Inversion-DPO

## Model Description

This repository contains the fine-tuned UNet weights from the Inversion-DPO method, built upon Stable Diffusion XL. The model has been trained using Direct Preference Optimization (DPO) techniques combined with inversion methods to improve generation quality and alignment.

## Quick Start

```python
from diffusers import StableDiffusionXLPipeline, UNet2DConditionModel
import torch

# Load the fine-tuned UNet
unet = UNet2DConditionModel.from_pretrained(
    "ezlee258258/Inversion-DPO",
    subfolder="unet"
)

# Load the pipeline with the fine-tuned UNet
pipe = StableDiffusionXLPipeline.from_pretrained(
    "stabilityai/stable-diffusion-xl-base-1.0",
    unet=unet
)
pipe = pipe.to("cuda")

# Generate images
prompt = "A beautiful landscape with mountains and lakes"
image = pipe(prompt).images[0]
image.save("output.png")
```

## Citation

If you use this model in your research, please cite our work:

```bibtex
@misc{li2025inversiondpo,
    title={Inversion-DPO: Precise and Efficient Post-Training for Diffusion Models},
    author={Zejian Li and Yize Li and Chenye Meng and Zhongni Liu and Yang Ling and Shengyuan Zhang and Guang Yang and Changyuan Yang and Zhiyuan Yang and Lingyun Sun},
    year={2025},
    eprint={2507.11554},
    archivePrefix={arXiv},
    primaryClass={cs.CV}
}
```

## Acknowledgments

Built upon [Stable Diffusion XL](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0) by Stability AI.

## Contact

For questions and support, please visit our [GitHub repository](https://github.com/MIGHTYEZ/Inversion-DPO).