[Sana bug] bug fix for 2K model config#10340
Merged
DN6 merged 5 commits intohuggingface:mainfrom Dec 23, 2024
Merged
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
Adding comment to get notification when it's merged. |
yiyixuxu
approved these changes
Dec 22, 2024
yiyixuxu
reviewed
Dec 23, 2024
| base_output = model(**inputs_dict) | ||
|
|
||
| model_size = compute_module_sizes(model)[""] | ||
| model_size = compute_module_persistent_sizes(model)[""] |
Collaborator
There was a problem hiding this comment.
we estimate the checkpoint size here, so should not include non-persistent buffers; technically we could pass remove_non_persistent to the named_module_tensors here but it will require a PR to accelerate so adding a function here for now
https://github.com/huggingface/accelerate/blob/200c9eb7833cfa505907f6f224ebf5a275aa6d92/src/accelerate/utils/modeling.py#L724
Contributor
Author
There was a problem hiding this comment.
Is there anything I need to do here? I'm not familiar with what you said above. 🤔
DN6
approved these changes
Dec 23, 2024
sayakpaul
pushed a commit
that referenced
this pull request
Dec 23, 2024
* fix the Positinoal Embedding bug in 2K model; * Change the default model to the BF16 one for more stable training and output * make style * substract buffer size * add compute_module_persistent_sizes --------- Co-authored-by: yiyixuxu <yixu310@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR fix the Positional Embedding missing bug. We re-introduce PE into > 2K resolution models. So we need to add PE back in
SanaTransformer2DModelCc: @yiyixuxu @sayakpaul @a-r-r-o-w , thanks in advance for merging this PR to fix the bug.
Before the PR:

After the PR:
