A1111 compatible model file?
#1
by
jetjodh
- opened
README.md
CHANGED
@@ -6,7 +6,7 @@ language:
|
|
6 |
- en
|
7 |
pipeline_tag: text-to-image
|
8 |
---
|
9 |
-
#
|
10 |
|
11 |
<a href="https://arxiv.org/abs/2406.04314"><img src="https://img.shields.io/badge/Paper-arXiv-red?style=for-the-badge" height=22.5></a>
|
12 |
<a href="https://github.com/RockeyCoss/SPO"><img src="https://img.shields.io/badge/Gihub-Code-succees?style=for-the-badge&logo=GitHub" height=22.5></a>
|
@@ -23,37 +23,21 @@ pipeline_tag: text-to-image
|
|
23 |
|
24 |
## Abstract
|
25 |
<p>
|
26 |
-
|
27 |
-
|
28 |
-
which has been applied to diffusion models to improve general image quality including prompt alignment and aesthetics.
|
29 |
-
Popular DPO methods propagate preference labels from clean image pairs to all the intermediate steps along the two generation trajectories.
|
30 |
-
However, preference labels provided in existing datasets are blended with layout and aesthetic opinions, which would disagree with aesthetic preference.
|
31 |
-
Even if aesthetic labels were provided (at substantial cost), it would be hard for the two-trajectory methods to capture nuanced visual differences at different steps.
|
32 |
</p>
|
|
|
|
|
|
|
|
|
33 |
<p>
|
34 |
-
|
35 |
-
(SPO) that discards the propagation strategy and allows fine-grained image details to be assessed. Specifically,
|
36 |
-
at each denoising step, we 1) sample a pool of candidates by denoising from a shared noise latent,
|
37 |
-
2) use a step-aware preference model to find a suitable win-lose pair to supervise the diffusion model, and
|
38 |
-
3) randomly select one from the pool to initialize the next denoising step.
|
39 |
-
This strategy ensures that diffusion models focus on the subtle, fine-grained visual differences
|
40 |
-
instead of layout aspect. We find that aesthetic can be significantly enhanced by accumulating these
|
41 |
-
improved minor differences.
|
42 |
-
</p>
|
43 |
-
<p>
|
44 |
-
When fine-tuning Stable Diffusion v1.5 and SDXL, SPO yields significant
|
45 |
-
improvements in aesthetics compared with existing DPO methods while not sacrificing image-text alignment
|
46 |
-
compared with vanilla models. Moreover, SPO converges much faster than DPO methods due to the step-by-step
|
47 |
-
alignment of fine-grained visual details.
|
48 |
</p>
|
49 |
|
50 |
## Model Description
|
51 |
|
52 |
This model is fine-tuned from [stable-diffusion-xl-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0). It has been trained on 4,000 prompts for 10 epochs.
|
53 |
|
54 |
-
This is a merged checkpoint that combines the LoRA checkpoint with the base model [stable-diffusion-xl-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0). If you want to access the LoRA checkpoint, please visit [SPO-SDXL_4k-p_10ep_LoRA](https://huggingface.co/SPO-Diffusion-Models/SPO-SDXL_4k-p_10ep_LoRA). We also provide a LoRA checkpoint compatible with [stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui), which can be accessed [here](https://civitai.com/models/510261?modelVersionId=567119).
|
55 |
-
|
56 |
-
|
57 |
## A quick example
|
58 |
```python
|
59 |
from diffusers import StableDiffusionXLPipeline, UNet2DConditionModel
|
@@ -85,10 +69,5 @@ image.save('moon.png')
|
|
85 |
## Citation
|
86 |
If you find our work or codebase useful, please consider giving us a star and citing our work.
|
87 |
```
|
88 |
-
|
89 |
-
title={Aesthetic Post-Training Diffusion Models from Generic Preferences with Step-by-step Preference Optimization},
|
90 |
-
author={Liang, Zhanhao and Yuan, Yuhui and Gu, Shuyang and Chen, Bohan and Hang, Tiankai and Cheng, Mingxi and Li, Ji and Zheng, Liang},
|
91 |
-
journal={arXiv preprint arXiv:2406.04314},
|
92 |
-
year={2024}
|
93 |
-
}
|
94 |
```
|
|
|
6 |
- en
|
7 |
pipeline_tag: text-to-image
|
8 |
---
|
9 |
+
# Step-aware Preference Optimization: Aligning Preference with Denoising Performance at Each Step
|
10 |
|
11 |
<a href="https://arxiv.org/abs/2406.04314"><img src="https://img.shields.io/badge/Paper-arXiv-red?style=for-the-badge" height=22.5></a>
|
12 |
<a href="https://github.com/RockeyCoss/SPO"><img src="https://img.shields.io/badge/Gihub-Code-succees?style=for-the-badge&logo=GitHub" height=22.5></a>
|
|
|
23 |
|
24 |
## Abstract
|
25 |
<p>
|
26 |
+
Recently, Direct Preference Optimization (DPO) has extended its success from aligning large language models (LLMs) to aligning text-to-image diffusion models with human preferences.
|
27 |
+
Unlike most existing DPO methods that assume all diffusion steps share a consistent preference order with the final generated images, we argue that this assumption neglects step-specific denoising performance and that preference labels should be tailored to each step's contribution.
|
|
|
|
|
|
|
|
|
28 |
</p>
|
29 |
+
<p>
|
30 |
+
To address this limitation, we propose Step-aware Preference Optimization (SPO), a novel post-training approach that independently evaluates and adjusts the denoising performance at each step, using a <em>step-aware preference model</em> and a <em>step-wise resampler</em> to ensure accurate step-aware supervision.
|
31 |
+
Specifically, at each denoising step, we sample a pool of images, find a suitable win-lose pair, and, most importantly, randomly select a single image from the pool to initialize the next denoising step. This step-wise resampler process ensures the next win-lose image pair comes from the same image, making the win-lose comparison independent of the previous step. To assess the preferences at each step, we train a separate step-aware preference model that can be applied to both noisy and clean images.
|
32 |
+
</p>
|
33 |
<p>
|
34 |
+
Our experiments with Stable Diffusion v1.5 and SDXL demonstrate that SPO significantly outperforms the latest Diffusion-DPO in aligning generated images with complex, detailed prompts and enhancing aesthetics, while also achieving more than 20× times faster in training efficiency. Code and model: <a ref="https://rockeycoss.github.io/spo.github.io/">https://rockeycoss.github.io/spo.github.io/</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
</p>
|
36 |
|
37 |
## Model Description
|
38 |
|
39 |
This model is fine-tuned from [stable-diffusion-xl-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0). It has been trained on 4,000 prompts for 10 epochs.
|
40 |
|
|
|
|
|
|
|
41 |
## A quick example
|
42 |
```python
|
43 |
from diffusers import StableDiffusionXLPipeline, UNet2DConditionModel
|
|
|
69 |
## Citation
|
70 |
If you find our work or codebase useful, please consider giving us a star and citing our work.
|
71 |
```
|
72 |
+
|
|
|
|
|
|
|
|
|
|
|
73 |
```
|