LilShake66 commited on
Commit
8e0ed35
·
verified ·
1 Parent(s): f15514d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +139 -3
README.md CHANGED
@@ -1,3 +1,139 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ pipeline_tag: text-to-image
4
+ tags:
5
+ - text-to-image
6
+ - image-generation
7
+ - autoregressive
8
+ - reinforcement-learning
9
+ - alignment
10
+ - llamagen
11
+ - janus
12
+ ---
13
+
14
+ # VA-π aligned checkpoints (VA-Pi)
15
+
16
+ This repo hosts **post-trained checkpoints** for the paper **“VA-π: Variational Policy Alignment for Pixel-Aware Autoregressive Generation”**.
17
+
18
+ - Paper / code: https://github.com/Lil-Shake/VA-Pi
19
+ - Project page: https://lil-shake.github.io/va-pi.github.io/
20
+ - arXiv: https://arxiv.org/abs/2512.19680
21
+
22
+ > These weights are provided as **PyTorch `.pth`** files. Only load weights you trust.
23
+
24
+ ---
25
+
26
+ ## Files
27
+
28
+ ### LlamaGen C2I (ImageNet class-to-image)
29
+ `c2i/`
30
+ - `c2i-vapi-xl-384.pth`
31
+ - `c2i-vapi-xxl-384.pth`
32
+ - `c2i-ste-xxl-384.pth` (STE finetuned checkpoints)
33
+ - `c2i-pt-xxl-384-decoder.pth` (Post-train tokenizer checkpoints)
34
+
35
+ ### T2I (two tracks)
36
+ `t2i/`
37
+ - `t2i-vapi-xl-256.pth` (**LlamaGen** T2I aligned checkpoint)
38
+ - `t2i-vapi-janus-256.pth` (**Janus-Pro-1B** aligned checkpoint)
39
+
40
+ ---
41
+
42
+ ## Quickstart
43
+
44
+ ### 1) Download a weight file from Hugging Face
45
+
46
+ ~~~python
47
+ from huggingface_hub import hf_hub_download
48
+
49
+ ckpt = hf_hub_download(
50
+ repo_id="LilShake66/VA-Pi",
51
+ filename="c2i/c2i-vapi-xxl-384.pth", # or another file above
52
+ )
53
+ print("downloaded:", ckpt)
54
+ ~~~
55
+
56
+ ---
57
+
58
+ ### 2) LlamaGen C2I sampling (recommended entry)
59
+
60
+ Use the official script from the VA-Pi codebase:
61
+
62
+ ~~~bash
63
+ git clone https://github.com/Lil-Shake/VA-Pi
64
+ cd VA-Pi/LlamaGen
65
+
66
+ # Install deps (note: folder name is "LlamaGen", not "llamaGen")
67
+ pip install -r requirements.txt
68
+
69
+ # You also need the VQ checkpoint from LlamaGen (see VA-Pi README)
70
+ bash scripts/autoregressive/sample_c2i.sh \
71
+ /path/to/vq_ds16_c2i.pt \
72
+ /path/to/c2i-vapi-xxl-384.pth \
73
+ /path/to/output_samples
74
+ ~~~
75
+
76
+ Notes:
77
+ - The script defaults to `FROM_FSDP=1`. If your checkpoint is not FSDP-style, set `FROM_FSDP=0` in env.
78
+
79
+ ---
80
+
81
+ ### 3) LlamaGen T2I (GenEval) sampling
82
+
83
+ ~~~bash
84
+ cd VA-Pi/LlamaGen
85
+
86
+ # You need: VQ checkpoint + cached T5 features + Geneval prompts jsonl
87
+ bash scripts/autoregressive/sample_t2i_geneval.sh \
88
+ /path/to/vq_ds16_t2i.pt \
89
+ /path/to/t2i-vapi-xl-256.pth \
90
+ /path/to/t5_cache_dir \
91
+ /path/to/geneval_prompts.jsonl \
92
+ /path/to/output_geneval_samples
93
+ ~~~
94
+
95
+ ---
96
+
97
+ ### 4) Janus-Pro GenEval inference
98
+
99
+ The Janus evaluation script supports either:
100
+ - a **full HF model repo** (processor+config), or
101
+ - a **checkpoint folder** containing `consolidated.pth`.
102
+
103
+ Since this Hub repo provides a single `.pth` file, the simplest way is:
104
+
105
+ ~~~bash
106
+ mkdir -p /tmp/janus-vapi
107
+ cp /path/to/t2i-vapi-janus-256.pth /tmp/janus-vapi/consolidated.pth
108
+
109
+ git clone https://github.com/Lil-Shake/VA-Pi
110
+ cd VA-Pi/Janus
111
+
112
+ pip install -r requirements.txt
113
+
114
+ # Back to repo root for the provided script path
115
+ cd ..
116
+
117
+ bash Janus/run_geneval_infer.sh \
118
+ --prompts-dir /path/to/evaluation_metadata_geneval.jsonl \
119
+ --base-model-path deepseek-ai/Janus-Pro-1B \
120
+ --model-path /tmp/janus-vapi \
121
+ --reason-prompt /path/to/reasoning_prompt.txt \
122
+ --save-root /path/to/output_geneval_samples
123
+ ~~~
124
+
125
+ ---
126
+
127
+ ## Citation
128
+
129
+ ~~~bibtex
130
+ @misc{vapi2025,
131
+ title={VA-$\pi$: Variational Policy Alignment for Pixel-Aware Autoregressive Generation},
132
+ author={Xinyao Liao and Qiyuan He and Kai Xu and Xiaoye Qu and Yicong Li and Wei Wei and Angela Yao},
133
+ year={2025},
134
+ eprint={2512.19680},
135
+ archivePrefix={arXiv},
136
+ primaryClass={cs.CV},
137
+ url={https://arxiv.org/abs/2512.19680}
138
+ }
139
+ ~~~