language:
- en
pipeline_tag: text-to-image
library_name: onnx
base_model: - amd/FLUX.2-klein-4B-amdnpu
- ponpoke/flux2-klein-4b-uncensored-text-encoder
tags: - flux
- flux2
- image-to-image
- RyzenAI
- ONNX
- quantization
- NPU
FLUX.2 [klein] 4B Abliterated on AMD AI PC NPU
This is a modified version of AMD's FLUX.2 [klein] 4B NPU model, with its Qwen3-4B text encoder replaced by the abliterated text encoder from ponpoke.
The replacement text encoder is exported to ONNX and quantized to 4-bit MatMulNBits (block size 128, asymmetric), retaining the original AMD text encoder's input/output interface. The AMD-optimized transformer and VAE decoder are unchanged.
Model Details
The directory layout follows the original AMD model:
scheduler/
text_encoder/
tokenizer/
transformer/
vae_decoder/
- Text encoder: Abliterated Qwen3-4B, INT4 ONNX, running through DirectML/CPU.
- Transformer and VAE decoder: Original AMD NPU-optimized models.
- Prompt embeddings: FP16,
[batch, 256, 7680]. - Inference: FLUX.2 [klein] 4B distilled, 4 steps.
Intended Use
Use with AMD GenAI-SD (sd-sandbox) and Ryzen AI 1.8.0:
python .\test\run.py --model_id "amd/FLUX.2-klein-4B-amdnpu" --model_path "PATH_TO_THIS_MODEL" --prompt "A photorealistic red apple on a wooden table" -n 4 -W 1024 -H 1024 --seed 42
Credits and License
- Black Forest Labs — FLUX.2 [klein] 4B
- AMD — FLUX.2 [klein] 4B AMD NPU
- ponpoke — Abliterated text encoder
See the respective upstream repositories for applicable licenses and redistribution terms, especially those of the modified text encoder. This is an unofficial derivative and is not endorsed by AMD or Black Forest Labs.