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

Enable multi-process DataLoader for dreambooth #950

Merged

Conversation

skirsten
Copy link
Contributor

@skirsten skirsten commented Oct 22, 2022

This simple change enables the DataLoader to prefetch the next data async. More info in the docs.

This resulted in a 35% speedup for me and utilizes the GPU power better (as the data loading is not blocking the GPU):

image
(green = new, blue = old)

The same can probably also be applied to all the other DataLoaders but I do not have the time to test them.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 22, 2022

The documentation is not available anymore as the PR was closed or merged.

@patrickvonplaten
Copy link
Contributor

This makes sense to me! @patil-suraj mind taking a look here?

Copy link
Contributor

@patil-suraj patil-suraj left a comment

Choose a reason for hiding this comment

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

Thanks a lot @skirsten , lgtm!

@patil-suraj patil-suraj merged commit 8332c1a into huggingface:main Oct 26, 2022
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.

4 participants