Hugging Face has introduced Modular Diffusers, a way to build image-generation pipelines in its Diffusers library from reusable blocks, Hugging Face said on 5 March 2026.

Instead of writing a whole pipeline, developers can combine blocks for steps such as text encoding, image encoding, denoising and decoding, and inspect each one. The API for running a pipeline stays the same as with DiffusionPipeline.

Developers can also write custom blocks and compose them into their own workflows.

A custom block is a Python class that defines the models it needs, its inputs, outputs and computation. Blocks in a sequence pass data to each other automatically, and custom blocks can be published to the Hub so others can load them. Hugging Face has published a collection of ready-to-use custom blocks.

Modular Diffusers integrates with Mellon, a node-based visual interface for wiring blocks together.


Share this post
The link has been copied!