BudgetLatent-FLUX-3-Image-Klein-Base

🌐 Project page  |  💻 Code  |  📄 Tech report (coming soon) · BudgetPix paper  |  🧩 BudgetAny

One checkpoint, any token budget. A fine-tune of FLUX 3 Image Klein Base for text-to-image generation at 1024 × 1024 that runs at any number of its 4,096 latent tokens: a quadtree merges the flattest regions into coarser tokens (32 to 128 px instead of 16 px), the transformer runs on the shorter sequence, and small refiners restore the detail. Editing, multi-reference generation and layout boxes work at every budget too.

BudgetLatent models: FLUX.2 [klein] 4B Base · FLUX.2 [klein] 4B · FLUX 3 Image Klein.

Unofficial, open-source implementation. Part of BudgetAny and based on the method of BudgetPix: Compute-Adaptive Tokenization for Pixel-Space Image Diffusion (Kara et al., 2026), which covers pixel-space diffusion; latent diffusion is an extension made here, and the numbers are this project's measurements. Not an official release. Thanks to the BudgetPix authors for the method.

Files

file base model dense tokens (1024 × 1024) parameters size SHA-256
budgetlatent.safetensors FLUX 3 Image Klein Base 4,096 4.90 B 9.79 GB 0b516a0918202d04…

budgetlatent.safetensors holds the whole fine-tuned transformer (bf16). The Qwen3-VL text encoder and the VAE come from the base model; scripts/fetch_weights.py downloads them.

Usage

git clone https://github.com/BudgetAny/BudgetLatent && cd BudgetLatent
pip install -r requirements.txt
hf auth login        # after accepting the license on https://huggingface.co/black-forest-labs/flux-3-image-klein-base
python scripts/fetch_weights.py --family flux3   # FLUX 3 Image Klein Base: transformer, text encoder, VAE
BP_GRID=64 python scripts/inference/sample.py --ckpt BudgetAny/BudgetLatent-FLUX-3-Image-Klein-Base --fast \
    --prompts "a red fox in a snowy forest" --budget 1.0 0.5 0.25 --overlay
  • --budget: fractions of the 4,096 tokens, from 1.0 down to 10 %.
  • --fast: compiled, tuned inference (worth it for more than a few images).
  • --overlay: also saves each image with its token layout (green 16 px, yellow 32 px, blue 64 px, purple 128 px).
  • --ref image.png: editing; repeat it for up to 10 references. References keep all their tokens, so edits speed up less than text to image.
  • Layout boxes written into the prompt work at every budget too. Black Forest Labs recommend the captions of their prompt upsampler for this model, boxes included (see the code's README).

Speed and memory

End-to-end time per image (from the prompt to the decoded image: text encoding, sampling, final decode), one NVIDIA RTX PRO 6000 Blackwell Server Edition, batch 1, --fast, 50 Euler steps with classifier-free guidance 3.5.

budget image tokens end-to-end / image speed-up peak memory
100 % 4,096 12.81 s 1.00× 10.9 GiB
90 % 3,685 11.20 s 1.14× 10.7 GiB
80 % 3,277 10.02 s 1.28× 10.6 GiB
70 % 2,866 8.56 s 1.50× 10.5 GiB
60 % 2,458 7.40 s 1.73× 10.4 GiB
50 % 2,047 6.24 s 2.05× 10.2 GiB
40 % 1,639 4.88 s 2.63× 10.1 GiB
30 % 1,228 3.82 s 3.36× 10.0 GiB
20 % 820 2.93 s 4.37× 9.9 GiB
10 % 409 1.77 s 7.26× 9.9 GiB

Peak memory at batch 1 is mostly the weights (9.6 GiB); at batch 8 it falls with the budget: 19.9 GiB at 100 %, 14.9 GiB at 50 %, 11.5 GiB at 10 %.

Examples

The same prompt and seed at 100, 80, 60, 40 and 20 % of the tokens, with the token layouts under the images.

an oil painting of sunflowers in a blue vase, thick impasto brush strokes

sunflowers

a colorful parrot perched on a branch in a tropical rainforest

parrot

a medieval castle on a cliff above a stormy sea, dramatic clouds

castle

Citation

Tech report coming soon. Until then, please cite the BudgetPix paper:

@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}
}

Built on FLUX 3 Image Klein Base by Black Forest Labs.

We acknowledge the compute support of the Health Care Engineering Systems Center within the Coordinated Science Lab at UIUC.

License

FLUX Kommunity License v.1.0 (LICENSE.md): non-commercial use, plus commercial use of outputs by Qualifying Users, subject to its terms. This model is a Derivative of FLUX 3 Image Klein Base: its transformer was fine-tuned and modules were added for coarse tokens. See NOTICE.md for the attribution notice. It is an unofficial, community release: it is not an official product of Black Forest Labs Inc. and has not been endorsed, approved or validated by Black Forest Labs Inc. The rights to use it are granted directly by Black Forest Labs Inc. under the FLUX Kommunity License. Running the model also needs the base repository's text encoder and VAE, which scripts/fetch_weights.py downloads from it (the base repository is gated: accept its license on Hugging Face first).

Downloads last month
71
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for BudgetAny/BudgetLatent-FLUX-3-Image-Klein-Base

Finetuned
(4)
this model

Collection including BudgetAny/BudgetLatent-FLUX-3-Image-Klein-Base

Paper for BudgetAny/BudgetLatent-FLUX-3-Image-Klein-Base