flux2-klein-4b for the Ryzen AI NPU
FLUX.2-klein-4B, converted to run on the Ryzen AI NPU of AMD Strix Halo inside halogen-flash-server, beside the Flash model on the GPU and behind the same port. Questions go to the Discord. Bugs go to the server repository's issues.
These files run only inside the halogen-flash-server container, on the NPU. They will not load in diffusers or any other runtime.
What is here
devices/ 155 MB the NPU programs (20 image sizes, the text encoder), the image decoder, notices
flux2-klein-4b.hnpw 8.0 GB the image model and its text encoder, converted for the NPU
tokenizer/ 11 MB the tokenizer
LICENSE the source model's license
Use it
Start halogen-flash-server 0.18.0 or later with HALOGEN_DOWNLOAD on and
HALOGEN_NPU_MODELS=flux2-klein-4b. The server fetches these files into
/models/npu/flux2-klein-4b/ and checks each one's size and checksum before it starts.
It answers /v1/images/generations for requests that name flux2-klein-4b: 20 sizes from 256x256 to 1024x1024,
square or not, one to four images a request, PNG. The prompt is cut to 512 tokens. The model needs about 8 GB of the host's memory beside the Flash model.
Server versions 0.17.x use the earlier revision of these files, 256x256 and 512x512 only.
The files at the head of this repository need halogen-flash-server 0.18.12 or later; each server version downloads the revision it was released with, so an older server keeps working unchanged.
The host needs the NPU driver, XRT with its NPU plugin, and the GPU's fabric clock held while the NPU works beside the GPU. The setup and every request shape are in docs/NPU.md.
How it differs from the source
The image model and its text encoder run in the NPU's block floating point. Images come out close to the source pipeline's at the same seed, not identical. The image decoder is taef2, a small decoder for FLUX.2's latents, in place of FLUX.2's own VAE.
Source and license
Converted from black-forest-labs/FLUX.2-klein-4B at
revision e7b7dc27f91deacad38e78976d1f2b499d76a294. Apache-2.0, as the source; its LICENSE is beside these files.
The weights are changed in form only: converted to the NPU's number format and layout.
The image decoder's weights in devices/taef2.safetensors are
taef2 by Ollin Boer Bohan, unchanged, under the MIT license:
devices/TAEF2-LICENSE.md. devices/NOTICE.md lists the third-party notices the NPU programs carry.