File size: 1,231 Bytes
6191755
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: mit
---

# Learning User Preferences for Image Generation Models


[`Website`](https://learn-user-pref.github.io/) | [`Paper`](https://arxiv.org/abs/2508.08220) | [`GitHub`](https://github.com/Mowenyii/learn-user-pref) | [`BibTeX`](#citation)  





## Installation
For install instructions, please see https://github.com/Mowenyii/learn-user-pref.


## Usage

This model can be loaded from Hugging Face Hub as follows:

```python
from transformers import AutoProcessor, BitsAndBytesConfig, AutoModelForVision2Seq
from peft import PeftModel
model = AutoModelForVision2Seq.from_pretrained("HuggingFaceM4/idefics2-8b")
model = PeftModel.from_pretrained(model, "wenyii/learn-user-pref")
prompt_pool=torch.load("wenyii/learn-user-pref/prompt_pool.pt") 
model.base_model.model.model.prompt_pool=prompt_pool
```

Please see https://github.com/Mowenyii/learn-user-pref for more detailed instructions.

## Citation

If you find this repository helpful, please consider citing our work:
```
@article{mo2025learning,
  title={Learning User Preferences for Image Generation Model},
  author={Mo, Wenyi and Ba, Ying and Zhang, Tianyu and Bai, Yalong and Li, Biye},
  journal={arXiv preprint arXiv:2508.08220},
  year={2025}
}
```