Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug for crashing when positional embedding disabled SongUNet #507

Merged
merged 7 commits into from
May 30, 2024

Conversation

daviddpruitt
Copy link
Collaborator

@daviddpruitt daviddpruitt commented May 21, 2024

Modulus Pull Request

Description

SongUNetPosEmbed has the option to disable positional embeding by setting N_grid_channels to 0. This change keeps the forward pass from crashing by adding a check to make sure the positional embedding exists. It also elimates some code duplication between the positional embed and non-positional embed version.

Closes
#504

Closes
#529

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.
  • The CHANGELOG.md is up to date with these changes.
  • An issue is linked to this pull request.

Dependencies

@mnabian
Copy link
Collaborator

mnabian commented May 21, 2024

/blossom-ci

Copy link
Collaborator

@mnabian mnabian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mnabian
Copy link
Collaborator

mnabian commented May 21, 2024

@daviddpruitt
Copy link
Collaborator Author

/blossom-ci

@daviddpruitt daviddpruitt merged commit c07fa25 into NVIDIA:main May 30, 2024
1 check passed
@daviddpruitt daviddpruitt deleted the bug_fix_songunet_posembed branch May 30, 2024 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants