Instructions to use frankdu/FLUX.2-klein-4B-LiteRT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use frankdu/FLUX.2-klein-4B-LiteRT with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
FLUX.2-klein-4B-LiteRT
Public mirror of the LiteRT conversion by LiteRT Community, with source attribution and byte-for-byte copies of the selected model graph artifacts. The graph conversion was performed upstream, not by this repository publisher.
Source: litert-community/FLUX.2-klein-4B-LiteRT, revision 223f4c989d8e5275fa8e695ddebea8d7ac7bada6.
Output: 256 × 256, 4 sampling step(s).
Contents
256px int8 Qwen3 encoder, diffusion transformer and VAE shards. Includes the reconstructed host constants and CPU sampler used for the desktop smoke check. The runtime streams one neural graph at a time. Image-editing graphs are not included.
artifact_manifest.json records the exact source repository, immutable revision, file sizes and SHA-256 digests. Large source Diffusers checkpoints, download caches, credentials and compiler working files are not included.
Run on CPU
Use Python 3.12 in a virtual environment. Download the repository with hf download frankdu/FLUX.2-klein-4B-LiteRT --local-dir FLUX.2-klein-4B-LiteRT, then:
cd FLUX.2-klein-4B-LiteRT
python3.12 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
python generate.py --model-dir . --prompt "a red apple on a wooden table, studio lighting" --seed 42 --out output.png
These are diffusion graph pipelines, not language-model .litertlm checkpoints. A standalone graph call with random inputs does not generate a meaningful image; use the full pipeline. Android integrations must run off the main thread, release tensor buffers/models between stages and use a shared LiteRT Environment. Source/model graph layout is preserved for reuse by the Research Lab Android application.
Validation and limitations
The actual model graphs completed a full desktop LiteRT 2.3.0 CPU generation check on Linux x86_64. See validation.json. The sample was visually checked as a recognizable apple. This is a smoke check, not a comparative quality or speed benchmark. SD/SDXL source-parity checks use export-time PyTorch noise; normal inference uses the runner's documented seeded stream. Different runtimes can generate different samples with the same integer seed.
Android CPU/GPU execution, phone memory requirements and Google Tensor TPU execution have not been validated for this repository. Successful desktop execution does not establish phone performance. Graph loads, compilation and host tensor copies can be expensive. Use the upstream model cards for intended use, limitations and applicable restrictions.
Attribution and license
The original model and conversion authors retain their copyrights. This distribution retains the source license and notices; conversion/mirroring does not change model license terms. See the included LICENSE/NOTICE files and SOURCE_MODEL_CARD.md. Added helper code is identified separately where applicable.
- Downloads last month
- 47
Model tree for frankdu/FLUX.2-klein-4B-LiteRT
Base model
black-forest-labs/FLUX.2-klein-4B