Skip to content

Added asserts and fixes for empty emb input in AdaLayerNorm#9693

Open
Godofnothing wants to merge 2 commits intohuggingface:mainfrom
Godofnothing:ada_layer_norm_fix
Open

Added asserts and fixes for empty emb input in AdaLayerNorm#9693
Godofnothing wants to merge 2 commits intohuggingface:mainfrom
Godofnothing:ada_layer_norm_fix

Conversation

@Godofnothing
Copy link
Copy Markdown

This PR raises asserts when conditioning is not provided to AdaLayerNorm.

Specifically:

  1. One has to provide either timestep or temb argument to AdaLayerNorm.
  2. Modulation embedding has to be provided either via CombinedTimestepLabelEmbeddings or emb argument in AdaLayerNormZero.
  3. AdaLayerNormZeroSingle handles the case when number of channels in emb is not equal to x.
  4. emb argument in AdaLayerNormZeroSingle becomes mandatory (currently, code would crash if emb is None).

@sayakpaul sayakpaul requested review from DN6 and yiyixuxu November 1, 2024 03:57
@github-actions
Copy link
Copy Markdown
Contributor

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions Bot added the stale Issues that haven't received updates label Nov 25, 2024
@yiyixuxu
Copy link
Copy Markdown
Collaborator

yiyixuxu commented Dec 3, 2024

hi:
is change this needed for a custom model you're making?

@github-actions github-actions Bot removed the stale Issues that haven't received updates label Dec 3, 2024
@github-actions
Copy link
Copy Markdown
Contributor

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions Bot added the stale Issues that haven't received updates label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Issues that haven't received updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants