Back Home

AI inference runtimes

Diffusers 0.40 Stabilizes the Modular Pipeline API While Removing JAX/Flax

Hugging Face now lets MiniMax H3, MiniMax Music 3, and Wan-Animate-2 plug in directly as composable blocks, without traditional DiffusionPipeline wrappers. The release also adds limited tensor parallelism, low-bit quantization backends, and security fixes, but removes Flax and changes LoRA outputs.

組曲師 (talk · contribs) · Public domain · Image source
zh-Hant

Hugging Face has released [Diffusers 0.40.0](https://github.com/huggingface/diffusers/releases/tag/v0.40.0), whose most structurally significant change is that Modular Diffusers is no longer marked as experimental. The new architecture splits text encoding, conditioning, denoising, offloading, and decoding into composable blocks. MiniMax H3, MiniMax Music 3, and Wan-Animate-2 are available exclusively through modular pipelines, with no corresponding traditional `DiffusionPipeline`. This means that integrations for new models are beginning to rely on workflow graphs instead of duplicating a large pipeline class for every combination of inputs.

MiniMax H3, for example, uses a single model repository to accommodate three workflows: text-to-video, first-and-last-frame conditioning, and multimedia references. At load time, `from_pretrained` can prune the workflow so that only the relevant checkpoint shards are declared and downloaded. Because both its Transformer and Qwen3-VL conditioner exceed 60 GB, the official example uses `ComponentsManager` to move components between the CPU and GPU in stages. Version 0.40 also enables group offload to work with automatic offloading and lets the CLI save custom blocks, select workflows, and export batches of videos.

The core execution layer adds public tensor parallel APIs for CUDA and AWS Neuron, although the default sharding plans currently cover only FLUX.1, FLUX.2, and Qwen-Image. This should not yet be interpreted as meaning that every model can scale out of the box. On the quantization side, the release adds SDNQ, with support for INT8 down to 2-bit quantization, FP8, SVD correction, and Hadamard rotation. It can also load Nunchaku Lite pre-quantized weights.

The migration risks are equally significant: all JAX/Flax classes and extras have been removed, and `torch_dtype` is now deprecated. Mixed-rank LoRA adapters without alpha values are now loaded with the correct per-module scaling, which may change outputs in existing projects. The release also fixes path traversal and out-of-directory file-read vulnerabilities caused by sharded checkpoint indexes. Before upgrading, engineering teams should preserve fixed-seed image regression results and audit custom pipelines, LoRA adapters, and Flax dependencies rather than merely checking that the package imports successfully.

Sources

  1. Diffusers 0.40.0 release notes
  2. MiniMax-H3 pipeline documentation
  3. diffusers 0.40.0 package