How to learn how to use the diffusers library correctly?

I am novice to the diffusers library. I am able to learn high level abstractions with the diffusion pipeline but whenever I want to go deeper and change stuff inside, for example change the blocks of the UNet or something, the program crashes and I don’t really know what to do.

How do I learn the basic functionality of each of the unet blocks, and how to bring them together to make a UNet ?

Thanks

EDIT: typo

Hi,

I’ve written a blog post that goes over all the building blocks of a U-Net, in PyTorch: The Annotated Diffusion Model.

The U-Net of Diffusers is defined here: diffusers/src/diffusers/models/unet_2d.py at 49a4b377c1fa5d1d5c6ebb3e480967db0b753297 · huggingface/diffusers · GitHub

1 Like

Thanks! I will check that out.