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

about the training speed #5

Open
winnechan opened this issue Jul 18, 2022 · 1 comment
Open

about the training speed #5

winnechan opened this issue Jul 18, 2022 · 1 comment

Comments

@winnechan
Copy link

Hi, thanks for your project.

The EMA model is updated on CPU by iterating over all the parameters of the online model, which makes the GPU utility is low. Does this mean that there is no way to speed up the training?

Thanks

@HiDolen
Copy link
Contributor

HiDolen commented Aug 5, 2024

I noticed that when instantiating KarrasEMA or EMA, you can pass the parameter allow_different_devices (which defaults to False). When allow_different_devices is set to True, the parameters of the EMA model will be moved to the same device as the parameters of the trained model; otherwise, they are kept on the CPU. Although it might be too late, I hope it helps.

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

No branches or pull requests

2 participants