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

How to use multiple GPUs to finetune the model? #7

Open
cchangyou opened this issue Jun 9, 2022 · 6 comments
Open

How to use multiple GPUs to finetune the model? #7

cchangyou opened this issue Jun 9, 2022 · 6 comments

Comments

@cchangyou
Copy link

Hi, if I follow the instruction to run image_train_latent.py, it seems only one GPU is used. Can you advise on how to use multiple GPUs? Thanks.

@limiteinductive
Copy link
Contributor

You can use the mpiexec -n N python command as detailed in this repo: https://github.com/openai/guided-diffusion

@cchangyou
Copy link
Author

Got it. Thank you.

@alishan2040
Copy link

@cchangyou Did mpiexec -n N python work in your case? because I tried to use it with multiple gpus but still facing memory error as it is only using GPU 0.
image
I used: mpiexec -n 4 python

Thanks.

@limiteinductive
Copy link
Contributor

@alishan2040 The load is not shared among GPUs, you'll need multiple GPUs with enough VRAM each

@alishan2040
Copy link

@limiteinductive How much VRAM should be considered enough for a single GPU? Now I've 4 gpus with 16 GB VRAM each. Previously I had single GPU with 24 GBs VRAM. In both the cases, I faced memory errors.

@limiteinductive
Copy link
Contributor

@alishan2040 I tried only using A100's

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

3 participants