diffusers
diffusers copied to clipboard
Added asserts and fixes for empty emb input in AdaLayerNorm
This PR raises asserts when conditioning is not provided to AdaLayerNorm.
Specifically:
- One has to provide either timestep or temb argument to
AdaLayerNorm. - Modulation embedding has to be provided either via CombinedTimestepLabelEmbeddings or emb argument in
AdaLayerNormZero. AdaLayerNormZeroSinglehandles the case when number of channels inembis not equal tox.embargument inAdaLayerNormZeroSinglebecomes mandatory (currently, code would crash ifembis None).