Single-file CMF build for local inference (Rust, GPU/CPU)

#1
by infosave - opened

We packaged both checkpoints as single CMF files that run with cortiq, a Rust inference engine with no Python: the whole encode or decode is one GPU submission on Vulkan/DX12 or Metal, or runs on the CPU.

Files: https://huggingface.co/infosave/primal_vae-cmf β€” primal_vae_2x2.cmf and primal_vae_2x1.cmf (161 MB each, 16-bit kernels; PSNR equal to the PyTorch float32 reference to 0.01 dB).

A 1024Γ—1024 encode / decode takes 0.40 / 0.29 s on an NVIDIA A40 and 1.27 / 1.23 s on an Apple M4.

cargo install cortiq-cli
cortiq vae --model primal_vae_2x2.cmf --mode encode --input photo.png --output latent.npy
cortiq vae --model primal_vae_2x2.cmf --mode decode --input latent.npy --output image.png

(cortiq 0.8.51)

Sign up or log in to comment