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

ValueError: You have to specify the number of GPUs you would like to use, add num_processes=... to your call. #27

Open
CptJackieSparrow opened this issue Sep 16, 2022 · 1 comment

Comments

@CptJackieSparrow
Copy link

CptJackieSparrow commented Sep 16, 2022

Hey guys i'm trying to run the code on colab connected to my local runtime
Win 11, RTX 3080 Ti
I'm having this error;

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In [93], line 2
      1 import accelerate
----> 2 accelerate.notebook_launcher(training_function, args=(text_encoder, vae, unet))

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\accelerate\launchers.py:87, in notebook_launcher(function, args, num_processes, use_fp16, mixed_precision, use_port)
     85 else:
     86     if num_processes is None:
---> 87         raise ValueError(
     88             "You have to specify the number of GPUs you would like to use, add `num_processes=...` to your call."
     89         )
     91     if num_processes > 1:
     92         # Multi-GPU launch
     93         if is_torch_version("<", "1.5.0"):

ValueError: You have to specify the number of GPUs you would like to use, add `num_processes=...` to your call.

And when i call the number of processes with:
accelerate.notebook_launcher(training_function, args=(text_encoder, vae, unet), num_processes=1)
it uses CPU instead of GPU so training seems to go for 24 hours. Is there any solutions for that?

And when I use any number higher that 1,
ValueError: To launch a multi-GPU training from your notebook, the Acceleratorshould only be initialized inside your training function. Restart your notebook and make sure no cells initializes anAccelerator.

Guess conda or python not recognising my GPU? I don't get what is the issue is.

@nicolai256
Copy link
Owner

i don't recognize that, u can use --GPUS 0,1,2,3 etc to use multiple gpu'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

2 participants