FLUX.2-klein-4B Pure C Implementation

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

A dependency-free C implementation of FLUX.2-klein-4B shows AI coding agents like Claude Opus 4.5 can complete large coding projects when given a persistent implementation-notes file to survive context compaction.

Read this as

Black Forest Labs, the company behind Stable Diffusion, released FLUX.2-klein-4B on 15th January, a smaller 4-billion-parameter text-to-image model under the permissive Apache 2.0 license. Salvatore Sanfilippo, creator of Redis, then wrote a program to run it written entirely in the C language with no external dependencies. He built it with help from the AI coding tool Claude Code. The notable trick: he had the AI maintain a notes file recording discoveries, which kept it on track during the long build.

A released, Apache 2.0-licensed image model (FLUX.2-klein-4B, 4 billion parameters) can now be run from a single dependency-free C file, removing licensing cost and integration friction for teams shipping image generation. The broader lesson for decision-makers is process: Sanfilippo credits Claude Opus 4.5 with completing a large coding task only because the agent was required to maintain and re-read an IMPLEMENTATION_NOTES.md file after context compaction. Teams adopting coding agents may want to copy that workflow. Performance figures are not given.

Salvatore Sanfilippo (antirez) wrote flux2.c, a pure C, dependency-free inference implementation of Black Forest Labs' FLUX.2-klein-4B, the 4-billion-parameter Apache 2.0 text-to-image model released 15th January, using Claude Code with Opus 4.5. His key technique was forcing the agent to maintain IMPLEMENTATION_NOTES.md and reprocess it immediately after context compaction, keeping long-horizon coding tasks coherent. No benchmark, performance or hardware figures are provided.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

FLUX.2-klein-4B Black Forest Labs Salvatore Sanfilippo Claude Code Claude Opus 4.5 Hacker News IMPLEMENTATION_NOTES.md

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading

datasette-charts 0.4a0

Datasette now lets developers add custom chart types more easily, expanding visualisation options for data projects.