Views
No views yet
flextok_ar package from the official repository:1git clone https://github.com/EPFL-VILAB/search-over-tokens.git
2cd search-over-tokens
3pip install -e ./flextok_ar1# Generate image from text prompt
2from flextok_ar.utils.helpers import load_model
3
4# Load model
5model, tokenizer, cfg = load_model(
6 model_id="ZhitongGao/FlexAR-3B-T2I",
7 device="cuda"
8)
9
10# Generate image
11images = model.generate(
12 data_dict={"text": ["A serene lake at sunset"]},
13 cfg_factor=3.0,
14 temperature=1.0,
15)
16
17# Save result
18images[0].save("output.png")1@article{gao2026ordered,
2 title={(1D) Ordered Tokens Enable Efficient Test-Time Search},
3 author={Zhitong Gao and Parham Rezaei and Ali Cy and Mingqiao Ye and Nata{\v{s}}a Jovanovi{\'{c}} and Jesse Allardice and Afshin Dehghan and Amir Zamir and Roman Bachmann and O{\u{g}}uzhan Fatih Kar},
4 journal={arXiv preprint arXiv:2604.15453},
5 year={2026}
6}
7
8@article{flextok,
9 title={{FlexTok}: Resampling Images into 1D Token Sequences of Flexible Length},
10 author={Roman Bachmann and Jesse Allardice and David Mizrahi and Enrico Fini and O{\u{g}}uzhan Fatih Kar and Elmira Amirloo and Alaaeldin El-Nouby and Amir Zamir and Afshin Dehghan},
11 journal={arXiv preprint arXiv:2502.01234},
12 year={2025}
13}