Lumina-Image 2.0 β€” CMF (3.3 GB, one file, no Python)

Alpha-VLLM/Lumina-Image-2.0 packed into a single CMF file and run by a pure-Rust engine. No torch, no diffusers, no CUDA install, no C++ toolchain β€” one binary and one file.

a red fox sitting in snow at sunset

512Γ—512, 30 steps, seed 7, prompt: "a red fox sitting in snow at sunset, photorealistic, detailed fur".

Run it

cargo install cortiq-cli          # pure Rust; needs >= 0.5.54
hf download infosave/Lumina-Image-2.0cmf lumina-q4tp.cmf --local-dir .

cortiq imagine lumina-q4tp.cmf \
  --prompt "a red fox sitting in snow at sunset, photorealistic, detailed fur" \
  --height 512 --width 512 --steps 30 --seed 7 --out fox.ppm

The GPU is used when one is visible β€” Metal on macOS, Vulkan or DX12 elsewhere. CMF_GPU=0 forces the CPU. Check what the engine sees with cortiq gpu; if it names llvmpipe rather than your card, the Vulkan loader is finding a software driver and the run will be slow.

Output is P6 PPM (no image-library dependency in the engine). Convert with anything: sips -s format png fox.ppm --out fox.png on macOS, convert fox.ppm fox.png with ImageMagick, or ffmpeg -i fox.ppm fox.png.

Flags that matter: --steps (30 is the default and a good trade), --cfg (4.0 default; ≀ 1 disables classifier-free guidance and halves the work at some prompt-adherence cost), --seed, --height/--width (multiples of 16).

Speed

512 Γ— 512, 30 steps, CFG 4, seed 7 β€” end to end: model load, prompt encode, denoise, VAE decode, file written. Measured 2026-08-06 on cortiq 0.5.54, one run each after a warm-up.

512 Γ— 512 256 Γ— 256
RTX PRO 6000 Blackwell (Vulkan) 77 s β€”
MacBook Air M4, 24 GB (Metal) 219 s 67 s
EPYC 9B45, 48 threads, no GPU 483 s β€”

Needs cortiq β‰₯ 0.5.54 on Vulkan and DX12. Before it, 512 Γ— 512 died on the first step: one SwiGLU dispatch asks for 75060 workgroups and a wgpu dimension holds 65535. 256 Γ— 256 stayed under the cap, which is why this went unnoticed.

The whole-block DiT path is on by default for discrete cards, where it saves host round trips β€” 77 s against 94 s for the per-op path on the card above. Do not turn it off with CMF_DIT_FUSED=0 on Vulkan: the per-op path renders a visibly different image at 512 Γ— 512 (11.0 dB against the CPU reference, where the fused path is at 28.2 dB). At 256 Γ— 256 the two agree to 58.1 dB.

Which file

Two layouts of the same weights β€” same 4-bit grid, same images.

file size notes
lumina-q4tp.cmf 3.27 GB take this one. Needs cortiq β‰₯ 0.5.40
lumina-q4t.cmf 3.45 GB the older layout, for cortiq < 0.5.40

q4tp keeps the nibbles byte-identical and stores each tile's scale as a 5-bit rung on a per-row ladder instead of a standalone f16 β€” the scale field was 11% of a q4t file. Rendering speed is unchanged (interleaved at 256px/8 steps on an M4: 26 and 27 s against 27 and 26), and so is the image: 43.6 dB PSNR against the q4t render, 0.31% mean pixel difference.

Any existing .cmf converts in place, no checkpoint needed:

cortiq requant lumina-q4t.cmf --output lumina-q4tp.cmf --quant q4tp

What is in the file

The whole pipeline, not just the transformer: Gemma-2 text encoder + Next-DiT + FLUX VAE + the tokenizer, 888 tensors, 5.27B parameters across the three stages. The diffusers checkpoint this comes from is ~20 GB across four directories; this is 3.2 GB in one mmap-served file that checks its own integrity.

diffusers this file
Size ~20 GB 3.2 GB
Files 4 directories 1
Runtime deps torch + diffusers + transformers none

Projections are q4_tiled; modulation and embeddings stay q8, the VAE f16, norms f32.

Reproduce the packing

cortiq imagine-pack <diffusers-root> --quant q4t --out lumina-q4t.cmf

<diffusers-root> is the Lumina-Image-2.0 checkout with tokenizer/, text_encoder/, transformer/, vae/. Takes ~9 minutes and streams shard by shard.

Fidelity

The engine mirrors the diffusers Lumina2Pipeline: the system-prompt template, Gemma hidden_states[-2] as caption features, FlowMatchEulerDiscrete with static shift 6, the model called at t = 1 βˆ’ Οƒ, CFG with per-row norm rescaling and the sign flip before the Euler step.

CPU and GPU renders of the same seed are close but not identical β€” the CPU path quantizes activations to int8 where the device works in f32, and a flow-matching sampler grows that difference over its steps. On the card above, 4 steps at 512 Γ— 512: 28.2 dB between the two.

What quantization costs against the f32 reference has not been measured on a benchmark. The exact f32 path is cortiq imagine <diffusers-dir> if you need to compare.

License

Apache-2.0, inherited from the base model. Weights Β© Alpha-VLLM; this repackaging only changes the storage format.

The engine, converter and format spec: https://github.com/infosave2007/cmf

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 infosave/Lumina-Image-2.0cmf

Finetuned
(17)
this model