-
Notifications
You must be signed in to change notification settings - Fork 6.5k
[Sana bug] bug fix for 2K model config #10340
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
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. |
| base_output = model(**inputs_dict) | ||
|
|
||
| model_size = compute_module_sizes(model)[""] | ||
| model_size = compute_module_persistent_sizes(model)[""] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anything I need to do here? I'm not familiar with what you said above. 🤔
* 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 <[email protected]>
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:
