Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,44 @@
|
|
1 |
-
---
|
2 |
-
license: mit
|
3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
---
|
4 |
+
|
5 |
+
# Learning User Preferences for Image Generation Models
|
6 |
+
|
7 |
+
|
8 |
+
[`Website`](https://learn-user-pref.github.io/) | [`Paper`](https://arxiv.org/abs/2508.08220) | [`GitHub`](https://github.com/Mowenyii/learn-user-pref) | [`BibTeX`](#citation)
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
## Installation
|
15 |
+
For install instructions, please see https://github.com/Mowenyii/learn-user-pref.
|
16 |
+
|
17 |
+
|
18 |
+
## Usage
|
19 |
+
|
20 |
+
This model can be loaded from Hugging Face Hub as follows:
|
21 |
+
|
22 |
+
```python
|
23 |
+
from transformers import AutoProcessor, BitsAndBytesConfig, AutoModelForVision2Seq
|
24 |
+
from peft import PeftModel
|
25 |
+
model = AutoModelForVision2Seq.from_pretrained("HuggingFaceM4/idefics2-8b")
|
26 |
+
model = PeftModel.from_pretrained(model, "wenyii/learn-user-pref")
|
27 |
+
prompt_pool=torch.load("wenyii/learn-user-pref/prompt_pool.pt")
|
28 |
+
model.base_model.model.model.prompt_pool=prompt_pool
|
29 |
+
```
|
30 |
+
|
31 |
+
Please see https://github.com/Mowenyii/learn-user-pref for more detailed instructions.
|
32 |
+
|
33 |
+
## Citation
|
34 |
+
|
35 |
+
If you find this repository helpful, please consider citing our work:
|
36 |
+
```
|
37 |
+
@article{mo2025learning,
|
38 |
+
title={Learning User Preferences for Image Generation Model},
|
39 |
+
author={Mo, Wenyi and Ba, Ying and Zhang, Tianyu and Bai, Yalong and Li, Biye},
|
40 |
+
journal={arXiv preprint arXiv:2508.08220},
|
41 |
+
year={2025}
|
42 |
+
}
|
43 |
+
```
|
44 |
+
|