FLUX.2 klein 4B with Paiton on Radeon
Generate photographs, product concepts and illustrations locally with a ready-to-run ComfyUI workflow. The qualified Paiton pipeline averages 1.054 seconds per 1024 脳 1024 image and uses just 12.9 GiB peak Torch allocation on one AMD Radeon AI PRO R9700.
Release: v1.0.1 路 GPU: R9700, gfx1201, 32 GB 路 Steps: 4 路 Batch: 1 路 Text-to-image
This repository contains compiled runtime artifacts, manifests, licenses and example media. Model weights download separately from the original checkpoint publisher and remain in your local cache. The containers already include these artifacts, so no separate .so download is needed to start. The private Paiton compiler is not included or required.
One-command ComfyUI
You need Linux x86-64, Docker Engine with the Compose plugin, and working AMD GPU device access through /dev/kfd and /dev/dri.
git clone --depth 1 --branch paiton-flux2-klein-gfx1201-v1.0.1 https://github.com/Eliovp-BV/paiton-vllm-plugin.git && cd paiton-vllm-plugin && ./models/FLUX.2-klein/launch.sh
Open ComfyUI on localhost. The first visit opens the included workflow. Enter a prompt, choose Paiton or Stock (Diffusers), and click Run. Preview and Save Image work normally. Images go to paiton-images/.
The prepared tensors use the paiton-flux2-cache volume; source weights and compiler caches use paiton-flux2-cache-runtime. Both persist across complete stop/start cycles.
The helper pulls three public containers, downloads the pinned 5.46 GB checkpoint and prepares about 12 GB of runtime tensors once. Source weights are preserved. Downloads, prepared tensors, compilation caches and UI settings persist. No Hugging Face token or paid service is required.
The first image loads and compiles the selected engine and can take several minutes. Later images reuse it. Switching engines unloads the previous model and incurs setup again. For comparisons, keep the prompt and seed fixed and choose fixed in the seed control.
From models/FLUX.2-klein, run ./launch.sh --stop to stop, ./launch.sh --logs for logs, or ./launch.sh --ui simple for a smaller prompt-and-image interface. Stopping preserves caches and outputs. The complete model guide covers terminal generation and using the node in an existing ComfyUI installation. This image package uses Diffusers; the same central repository also contains our vLLM text releases.
12.9 GiB peak Torch allocation
| Full-pipeline memory | Strongest qualified stock | Paiton |
|---|---|---|
| Peak Torch allocation, GiB | 19.3 | 12.9 |
| Peak Torch reservation, GiB | 22.1 | 14.1 |
| Maximum sampled driver VRAM, GiB | 23.0 | 14.6 |
Peak Torch allocation falls 33.4%, saving 6.5 GiB. Peaks include compilation, warmup and generation; driver samples also include loading. These overlapping measurements are not additive. 12.9 GiB is peak tensor allocation, not total GPU usage. The complete text encoder, transformer and VAE stay on the GPU without CPU offload.
The tested host has 16 GB RAM; 24 GB provides compilation headroom. Allow 60 GB free disk for containers, weights, prepared tensors, caches and outputs. Only the R9700 and the fixed 1024-square, four-step profile are qualified. This is not a support claim for smaller GPUs, other resolutions, image editing, adapters or general ComfyUI GPU workflows.
Performance and quality
On September 7, 2026, two warmups followed by two measured runs for each of three fixed prompts gave:
| Metric | Stock | Paiton |
|---|---|---|
| Mean seconds per image | 1.258 | 1.054 |
| Projected images per hour | 2,862 | 3,416 |
This is 16.2% lower latency and 19.4% higher projected throughput at the same checkpoint revision, quantization, prompts, seeds, resolution, four steps, scheduler, guidance 1.0, batch one and 512-token text sequence. Both use full GPU residency. The GPU remained in AUTO with COMPUTE; hardware limits were unchanged.
Timing runs from prompt through text encoding, all denoising steps, VAE decode and PIL image creation. It excludes startup, PNG encoding, file writing and interface overhead. Images/hour is a projection from mean latency. Separate ComfyUI workflow measurements averaged 1.406 seconds including transport, image handling and saving. Sub-second generation and a 20% latency reduction are not claimed.
Stock uses Diffusers, SDNQ attention and matrix kernels, prepared immutable weights, a channels-last VAE, whole-module compilation and graph capture. The same selected text-encoder outputs allow the standard compiler to remove unused work on both paths. See BENCHMARKS.md and raw results for the full protocol and numerical quality comparisons.
Retained stock/Paiton pairs preserve the main composition and subjects but differ in fine detail. RGB SSIM is 0.975 for the fox, 0.974 for the product scene and 0.859 for the bookshop. The bookshop shows larger changes in masonry, shelves and lettering. Numerical similarity is not a complete quality test, and three prompts do not establish broad quality equivalence. Identical seeds need not produce identical pixels across backends or separately compiled processes.
Stop the UI before reproducing the comparison, then run from the model directory:
./launch.sh --stop
./run.sh benchmark --backend stock --suite --output /outputs/stock
./run.sh benchmark --backend paiton --suite --output /outputs/paiton
Checkpoint and runtime
The upstream checkpoint is Disty0/FLUX.2-klein-4B-SDNQ-4bit-dynamic, pinned to 45e9cc76cb70f84473ce5c6c2e2282d0ef3c6ecd. It derives from Black Forest Labs' FLUX.2 klein 4B, released January 15, 2026. This Hub package is a compiled runtime release, not a new base model or new quantized checkpoint. The metadata's quantization relationship identifies the upstream quantized source.
The runtime uses prepared INT8 transformer weights with BF16 scales, a BF16 text encoder expanded from the same checkpoint, and a BF16 VAE. Both comparison paths use INT8 query/key attention, BF16 value multiplication and FP32 softmax in the transformer. Conversion requires no calibration data, full-precision download or remote GPU.
The pinned runtime includes Torch 2.12.0 with ROCm 7.14, Diffusers 0.40.0 and Transformers 5.15.1. SDNQ 0.2.6 is isolated in the conversion/stock tools image. ComfyUI 0.34.0 uses frontend 1.49.6. Exact container references and file provenance are in paiton-hub.json.
Download and inspect the compiled artifacts
The quick start already contains these exact files. For a separate, versioned copy:
hf download EliovpAI/FLUX.2-klein-4B-Paiton-RDNA4 --revision v1.0.1 --include 'artifacts/*' --local-dir ./paiton-flux2-hf
Keep all six files in artifacts/ together. They contain three shared libraries and their hash-checked compatibility manifests. They are loaded by the Paiton image runtime, not by DiffusionPipeline.from_pretrained as model weights.
After the launch helper has prepared the persistent cache, stop its services. To use your downloaded artifacts explicitly:
mkdir -p paiton-images
docker run --rm --device /dev/kfd --device /dev/dri \
--group-add "$(stat -c '%g' /dev/kfd)" --shm-size 2g \
-v paiton-flux2-cache:/models \
-v paiton-flux2-cache-runtime:/models/cache \
-v "$PWD/paiton-flux2-hf/artifacts:/opt/paiton/image/artifacts:ro" \
-v "$PWD/paiton-images:/outputs" \
ghcr.io/eliovp/paiton-vllm-plugin:flux2-klein-rdna4-v1.0.1 \
generate --prompt 'A fox in a woodland at sunrise, wildlife photograph' --seed 42
SHA256SUMS records the file hashes. This repository contains no checkpoint weights, calibration data or private compiler source.
Licenses and links
The Paiton runtime and compiled artifacts use Apache-2.0, with third-party notices and retained license texts. SDNQ and ComfyUI retain their GPL-3.0-only terms in separate containers, which include the corresponding source and notices.
The original FLUX.2 klein 4B weights are Apache 2.0. The community quantization declares Apache 2.0 but retains a contradictory non-commercial link and does not pin the exact pre-quantization source revision. These provenance limitations remain disclosed. Weights are downloaded from upstream and are not redistributed here or in the containers.
Our other free Radeon releases include Qwen3.8 and Ornith 1.5. Our work also covers CDNA accelerators for larger inference workloads. Learn more about Paiton.
Model tree for EliovpAI/FLUX.2-klein-4B-Paiton-RDNA4
Base model
black-forest-labs/FLUX.2-klein-4B



