Speedup model loading by 4-5x in Diffusers ⚡ by a-r-r-o-w · Pull Request #3674 · huggingface/accelerate
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.
|
|
||
|
|
||
| >>> @find_executable_batch_size(starting_batch_size=128) | ||
| ... def train(batch_size, model, optimizer): |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change is unrelated. Seems to come from ruff, and I'm not sure why. I'm using the ruff version from the setup.py
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this ! A minor suggestion
Comment on lines 225 to 226
| non_blocking: bool = False, | ||
| _empty_cache: bool = True, |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you update the docstring also ? Also, maybe empty_cache or clear_cache ?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SunMarc Thanks, updated! Could you take a look again?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice !
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