language:
- en
license: mit
pipeline_tag: text-to-image
InfinityCC: Spherical Leech Quantization for Visual Tokenization and Generation
This repository hosts InfinityCC, a working example showcasing the power of Non-Parametric Quantization (NPQ) for ImageNet-1k class-conditioned image generation.
The model is based on the paper: Spherical Leech Quantization for Visual Tokenization and Generation Yue Zhao, Hanwen Jiang, Zhenlin Xu, Chutong Yang, Ehsan Adeli, Philipp Krähenbühl.
Project Page: https://cs.stanford.edu/~yzz/npq/ Code: https://github.com/zhaoyue-zephyrus/InfinityCC
Introduction
In this work, we explore Spherical Leech Quantization ($\Lambda_{24}$-SQ), a non-parametric quantization method rooted in lattice coding. This approach simplifies the training recipe and improves the reconstruction-compression tradeoff, thanks to its high symmetry and even distribution on the hypersphere. It has demonstrated better reconstruction quality than prior art in image tokenization and compression tasks, with improvements extending to state-of-the-art auto-regressive image generation frameworks. InfinityCC serves as a practical demonstration of this powerful quantization technique for visual generation.
Installation
We use uv to manage all dependencies.
uv sync
source .venv/bin/activate
To evaluate ImageNet using the ADM evaluator, run the following command lines:
mkdir third_party/ && cd third_party/
git clone https://${GIT_TOKEN}@github.com/openai/guided-diffusion.git
cd guided-diffusion/evaluations
wget https://openaipublic.blob.core.windows.net/diffusion/jul-2021/ref_batches/imagenet/256/VIRTUAL_imagenet256_labeled.npz
Results
InfinityCC Performance
| model | Resolution | #layers | Tokenizer (HF weights🤗) | VAR Model (HF weights🤗) | FID |
|---|---|---|---|---|---|
| InfinityCC | 256 | 12 | bitvae_l24_xl | infinitycc_12layer_weights | 6.66 |
| InfinityCC | 256 | 24 | bitvae_l24_xl_vf | infinitycc_24layer_weights | 2.21 |
| InfinityCC-2B | 256 | 32 | TBD | TBD | 1.80 |
Citation
If our work assists your research, feel free to give us a star ⭐ or cite us using:
@article{zhao2025spherical,
title={Spherical Leech Quantization for Visual Tokenization and Generation},
author={Zhao, Yue and Jiang, Hanwen and Xu, Zhenlin and Yang, Chutong and Adeli, Ehsan and Krähenbühl, Philipp},
journal={arXiv preprint arXiv:2512.14697},
year={2025}
}
License
This project is licensed under the MIT License - see the LICENSE file for details.