Hugging Face has shipped version 0.5.1 of its diffusers library with support for Stable Diffusion in JAX and Flax, which means the popular text-to-image model can now run on Google TPUs instead of being chained to GPUs. That’s a bigger deal than it sounds. TPU pods in Colab, Kaggle, and Google Cloud come with 8 accelerators per server working in parallel, and the new Flax pipeline replicates prompts across all of them simultaneously. The result: 8 images generated in roughly the time it takes a single chip to produce one.
The setup process is straightforward if you’ve worked with Hugging Face before. You load the FlaxStableDiffusionPipeline from the CompVis/stable-diffusion-v1-4 repo using a bfloat16 revision of the weights, which TPUs handle natively. Flax being a functional framework means the pipeline and model parameters are stored separately, so from_pretrained returns both. There’s a license gate too — the CreativeML OpenRail-M license requires accepting terms that prohibit deliberately producing illegal or harmful content, and you’ll need a Hugging Face access token via notebook_login or the CLI tool before the weights will download.
The performance numbers are what make this noteworthy. A Colab notebook running on TPU v2 hardware generated 8 images from a single prompt in 8 seconds — that’s one second per image when the parallelism kicks in. Compare that to typical GPU inference where each image takes several seconds on consumer hardware. The prompt used for benchmarking was a cinematic still of Morgan Freeman as Jimi Hendrix, with lens specs and lighting details included, which suggests the quality ceiling hasn’t dropped just because the hardware changed.
What’s interesting here is how this mirrors the broader shift toward making diffusion models accessible beyond expensive GPU setups. Kaggle offers free TPU hours, Colab’s free tier includes TPU access, and now the entire Stable Diffusion pipeline runs on that infrastructure. The bfloat16 precision choice is smart — it’s faster and lighter than float32 while preserving enough quality for most use cases. The real question is whether this pushes more developers toward TPUs for inference-heavy workloads, or if the JAX learning curve keeps most people on PyTorch and CUDA. Either way, 8 seconds for 8 images is hard to ignore.