FLUX.2-klein-4B — OpenVINO INT4
OpenVINO IR export of black-forest-labs/FLUX.2-klein-4B for local text-to-image generation and image editing in Fern. The source model uses one architecture for both tasks; this repository contains converted OpenVINO components, not the original Diffusers checkpoint.
Export details
- Export revision:
f53967e707ab0a1ab795c5d0704b8c4f0e2f22c3(use this revision for reproducible downloads). - Size: approximately 4.266 GiB across 27 files.
- Quantization: Optimum Intel weight-only quantization. The text encoder and transformer use INT4 weights (group size 128, configured ratio 0.8); the VAE encoder and decoder use INT8. Tokenizer and scheduler assets are included.
- Pipeline:
OVFlux2KleinPipelinefrom Optimum Intel. - Fern defaults: 4 inference steps and guidance scale 1.0. Fern supports 256–1920 pixel dimensions divisible by 16; actual speed and memory use depend on the selected device and resolution.
- Validation scope: this export is integrated in Fern’s generation and reference-image editing workflow. No cross-device performance or quality benchmark is claimed here.
Use
In Fern, install FLUX.2 Klein 4B from Preferences → Image models. Fern downloads the selected pinned export and uses the same OpenVINO IR on its supported OpenVINO devices. The first load compiles device-specific caches locally.
For direct use with Fern’s runtime dependencies:
from huggingface_hub import snapshot_download
from optimum.intel import OVFlux2KleinPipeline
model_dir = snapshot_download(
repo_id="xgirls/FLUX.2-klein-4B-ov-int4",
revision="f53967e707ab0a1ab795c5d0704b8c4f0e2f22c3",
)
pipe = OVFlux2KleinPipeline.from_pretrained(model_dir, device="GPU")
image = pipe(
prompt="A small glass greenhouse in a rain-soaked garden at dusk",
width=1024,
height=1024,
num_inference_steps=4,
guidance_scale=1.0,
).images[0]
image.save("output.png")
To edit an image, pass an image to the pipeline’s image= argument together with the prompt. For Fern’s NVIDIA adapter, the OpenVINO NVIDIA plugin must be installed and the device name is NVIDIA; Intel GPU uses GPU, and CPU fallback uses CPU.
License and source
Apache-2.0; see the upstream license.
The upstream 4B model is released under Apache-2.0. Follow the license terms for both the source model and this converted export.
This is a community conversion for Fern, not an official Black Forest Labs or Intel release. FLUX and Black Forest Labs are not affiliated with or endorsing this repository.