Skip to content
BudgetAnyPublic

About

BudgetPix: compute-adaptive tokenization for pixel-space image diffusion (JiT, pMF, MiniT2I, PixelDiT)

Resources

Stars

6 stars

Watchers

0 watching

Forks

Repository files navigation

BudgetPix

🌐 Project page  |  📄 Paper  |  🤗 Models  |  🧩 BudgetAny: BudgetPix · Budget3D · BudgetLatent


In addition to BudgetPix, we now release its family, BudgetAny, extended to Budget3D and BudgetLatent (code: Budget3D, BudgetLatent; models).

BudgetPix makes pixel-space diffusion transformers compute-adaptive: one checkpoint runs at any token budget. An entropy-guided quadtree merges flat regions into coarser tokens, the backbone runs on the shorter sequence, and a small token-local refiner restores the detail inside every merged token. The budget is a number you pass at inference.

Unofficial, open-source implementation, taken from budgetpix/BudgetPix-public: a public reimplementation of BudgetPix: compute-adaptive tokenization for pixel-space image diffusion (JiT, MiniT2I, PixelDiT, pMF). This repository is part of BudgetAny and is based on the method of the BudgetPix paper (Kara et al., 2026). It is not an official release. Thanks to the BudgetPix authors for the method.

One MiniT2I checkpoint at decreasing token budgets, the token layout beside each image

One checkpoint, any budget: the same prompt and noise at decreasing token budgets.

🔥 News

  • Nov 2026: BudgetLatent is out: code and weights for FLUX.2 [klein] 4B Base, the step-distilled FLUX.2 [klein] 4B, FLUX 3 Image Klein Base and the step-distilled FLUX 3 Image Klein, each at any token budget, for text to image, editing and multi-reference generation, and with the FLUX 3 models' layout boxes (project page, models).
  • Nov 2026: BudgetPix joins BudgetAny, next to Budget3D and BudgetLatent.
  • Oct 2026: Code and checkpoints for JiT, pixel MeanFlow, MiniT2I and PixelDiT.

📦 Models

Model Base model Task Weights
BudgetPix-JiT JiT Class-conditional ImageNet 🤗 BudgetAny/BudgetPix-JiT
BudgetPix-pMF pixel MeanFlow One-step class-conditional ImageNet 🤗 BudgetAny/BudgetPix-pMF
BudgetPix-MiniT2I MiniT2I Text-to-image 🤗 BudgetAny/BudgetPix-MiniT2I
BudgetPix-PixelDiT PixelDiT Text-to-image (non-commercial) 🤗 BudgetAny/BudgetPix-PixelDiT

🚀 Usage

Installation

Python 3.10+ and a CUDA GPU.

git clone https://github.com/BudgetAny/BudgetPix && cd BudgetPix
pip install -r requirements.txt
pip install flash-attn --no-build-isolation      # optional: varlen attention kernels for JiT
# the pMF, MiniT2I and PixelDiT models are imported from their official code
git clone -b torch https://github.com/Lyy-iiis/pMF upstream/pMF && export PMF_ROOT=$PWD/upstream/pMF
git clone https://github.com/Hope7Happiness/minit2i-torch upstream/minit2i-torch && export MINIT2I_ROOT=$PWD/upstream/minit2i-torch
git clone https://github.com/NVlabs/PixelDiT upstream/PixelDiT && export PIXELDIT_ROOT=$PWD/upstream/PixelDiT

Download the weights

hf download BudgetAny/BudgetPix-MiniT2I --local-dir checkpoints    # one model family
python scripts/download_checkpoints.py --all                        # or all of them, checked against checkpoints/SHA256SUMS

Sample

--budget is the number of tokens per image (here half of the full grid); without it, the model runs on the full grid.

# JiT: class-conditional ImageNet, with the token layout
python -m budgetpix.jit.sample --ckpt checkpoints/budgetpix_jit_l32_512.pth --classes 207,88,417,933 --budget 128 --overlay --out samples_jit.png
# pixel MeanFlow: one-step ImageNet
python -m budgetpix.pmf.sample --ckpt checkpoints/budgetpix_pmf_l16_256.pt --classes 207,88,417,933 --budget 128 --overlay --out samples_pmf.png
# MiniT2I: text-to-image
python -m budgetpix.minit2i.sample --ckpt checkpoints/budgetpix_minit2i_l_512.pt --prompts "a corgi in a spacesuit" --budget 512 --cfg 6.0 --out samples_minit2i.png
# PixelDiT: text-to-image
python -m budgetpix.pixeldit.sample --ckpt checkpoints/budgetpix_pixeldit_1024.pt --prompts "a red fox in a snowy forest" --budget 2048 --out samples_pixeldit.png

📚 Citation

@article{kara2026budgetpix,
  title={BudgetPix: Compute-Adaptive Tokenization for Pixel-Space Image Diffusion},
  author={Ozgur Kara and Yujia Chen and Daniel Watson and David Forsyth and James Matthew Rehg and Wen-Sheng Chu and Du Tran},
  journal={arXiv preprint arXiv:2610.12307},
  year={2026}
}

📄 License

The code is released under the MIT License (LICENSE), like the vendored JiT modules and the imported pMF and MiniT2I code. The JiT, pMF and MiniT2I checkpoints derive from MIT-licensed weights. The PixelDiT checkpoint derives from NVIDIA's PixelDiT weights and is released under the same NVIDIA License (NSCLv1), which permits non-commercial use only.

🙏 Acknowledgements

This implementation builds on JiT, pixel MeanFlow, MiniT2I and PixelDiT, whose released models are its backbones. The entropy-based layout follows APT, and FID and IS are computed with the LTH14 fork of torch-fidelity.

About

BudgetPix: compute-adaptive tokenization for pixel-space image diffusion (JiT, pMF, MiniT2I, PixelDiT)

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages