FLUX.2 [klein] 4B β€” Core AI (macOS 27+)

black-forest-labs/FLUX.2-klein-4B converted to Apple Core AI (.aimodel) for on-device text-to-image and image editing on Apple silicon Macs. Int4 weights, fp16 compute, 1024Γ—1024, 4 steps.

Used by the Looking Glass app (0.9.5+) for on-device image generation, downloaded on request from its Settings. Converted by a third party with Apple's coreai-models recipe β€” this is not an official Black Forest Labs or Apple release.

Contents

File Size Role
Transformer.aimodel 2.18 GB DiT (3.88B), multi-function: text-to-image main (1024) / half (512) + 6 image-to-image reference-grid entrypoints, shared weights
TextEncoder.aimodel 1.75 GB Qwen3 text encoder (4.02B)
VAEDecoder.aimodel / VAEDecoder_half.aimodel 0.10 GB each latent β†’ 1024 / 512 px
VAEEncoder.aimodel / VAEEncoder_half.aimodel 0.07 GB each image β†’ latent (image-to-image)
tokenizer/, metadata.json, vae_bn_*.npy small pipeline resources

Total 4.28 GB (text-to-image only needs ~4.05 GB).

Requirements

  • macOS 27.0+ on Apple silicon (Core AI framework)
  • ~7 GB free unified memory at peak

Usage

With Apple's coreai-models Swift package:

import CoreAIDiffusionPipeline

let pipeline = try await Flux2Pipeline(from: bundleURL)   // folder containing metadata.json
let config = PipelineConfiguration(prompt: "a lighthouse at dawn", stepCount: 4,
                                   guidanceScale: 1.0, schedulerType: .discreteFlow)
let image = try await pipeline.generateImages(configuration: config).images.first!

Or its CLI: swift run -c release diffusion-runner --model <bundle> --prompt "…" --steps 4

The first load specializes the model for the device (~18 s on M1 Max) and caches it; macOS re-specializes after each OS update.

Measured (M1 Max 32 GB, macOS 27.0, 1024Γ—1024, 4 steps)

Warm generation 21.4 s/image (23.9 s median over 15 varied prompts)
Peak memory footprint 6.6–6.7 GB
Determinism same prompt + seed β†’ byte-identical PNG

On a 15-image prompt-adherence battery (VLM-graded, blind) it scored 94% overall, with correct text rendering on every design prompt.

Provenance

  • Source: black-forest-labs/FLUX.2-klein-4B @ e7b7dc27f91deacad38e78976d1f2b499d76a294
  • Converter: apple/coreai-models @ 49f5dcbd125c7dde1eab58822cb8c47ed56e32dc, uv run coreai.diffusion.export flux2-klein-4b --platform macOS
  • Toolchain: coreai-torch 0.4.2, coreai-opt 0.2.1, coreai-core 1.0.0b2, torch 2.9.0, diffusers 0.37.1
  • Compression: int4 weight-only, per-block (block size 32); compute precision float16

License

Apache License 2.0, same as the upstream model β€” see LICENSE.md. FLUX.2 [klein] 4B Β© Black Forest Labs. The bundled Qwen3 text encoder and tokenizer are distributed by Black Forest Labs as part of the upstream model under the same license.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for DeadDuck123/FLUX.2-klein-4B-CoreAI

Quantized
(68)
this model