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

Enabling use of GPU #1

Open
teebu opened this issue Jan 19, 2025 · 11 comments
Open

Enabling use of GPU #1

teebu opened this issue Jan 19, 2025 · 11 comments
Labels
question Further information is requested

Comments

@teebu
Copy link

teebu commented Jan 19, 2025

I assumed the recent update enabled gpu use, but the only way I was able to get it to start using the GPU is set an env var.

export ONNX_PROVIDER=CUDAExecutionProvider

Is it supposed to auto detect this or is this the proper way to enable use of gpu?

@nazdridoy
Copy link
Owner

does uninstalling "kokoro-onnx" and installing "kokoro-onnx[gpu]" fix your issue?

uv remove kokoro-onnx
uv add kokoro-onnx[gpu]'

or

pip uninstall kokoro-onnx
pip install kokoro-onnx[gpu]'
``

@nazdridoy nazdridoy added the question Further information is requested label Jan 19, 2025
@teebu
Copy link
Author

teebu commented Jan 19, 2025

Didn't make a difference for me.

@teebu
Copy link
Author

teebu commented Jan 19, 2025

running uv sync

i see it creates venv with

 + onnxruntime==1.20.1
 + onnxruntime-gpu==1.20.1

@nazdridoy
Copy link
Owner

its being addressed Upstream

so far i can't reproduce your issue, i'll look into it soon

@fastfading
Copy link

fastfading commented Jan 20, 2025

uv remove kokoro-onnx
uv add kokoro-onnx[gpu]'

does it support Mac M chips ?

I get errors
uv add kokoro-onnx[gpu]
zsh: no matches found: kokoro-onnx[gpu]

@fastfading
Copy link

@teebu how to use this on mac

I assumed the recent update enabled gpu use, but the only way I was able to get it to start using the GPU is set an env var.
export ONNX_PROVIDER=CUDAExecutionProvider

@MeanMan
Copy link

MeanMan commented Jan 20, 2025

There might be some issue with onnxruntime module. microsoft/onnxruntime#7748
If onnxruntime_gpu and onnxruntime are both loaded then CUDAExecutionProvider is not available. Installing module kokoro-onnx[gpu] seem to install both those libraries.

I have not been able to use GPU.

The versions might have an effect according to some note I found but Im not getting it to work.

@nazdridoy
Copy link
Owner

uv remove kokoro-onnx uv add kokoro-onnx[gpu]'
does it support Mac M chips ?

I get errors uv add kokoro-onnx[gpu] zsh: no matches found: kokoro-onnx[gpu]

uv add 'kokoro-onnx[gpu]'

@nazdridoy
Copy link
Owner

There might be some issue with onnxruntime module. microsoft/onnxruntime#7748 If onnxruntime_gpu and onnxruntime are both loaded then CUDAExecutionProvider is not available. Installing module kokoro-onnx[gpu] seem to install both those libraries.

I have not been able to use GPU.

The versions might have an effect according to some note I found but Im not getting it to work.

yes, upstream kokoro-onnx is addressing this issue, as kokoro-onnx[gpu] pulls onnxruntime_gpu as well as onnxruntime.

there is a work around, (i'm not a fan of it)

uv pip install kokoro-onnx[gpu]
uv pip uninstall onnxruntime
uv pip install onnxruntime_gpu

This was reported to be working.

@fastfading
Copy link

uv remove kokoro-onnx uv add kokoro-onnx[gpu]'
does it support Mac M chips ?
I get errors uv add kokoro-onnx[gpu] zsh: no matches found: kokoro-onnx[gpu]

uv add 'kokoro-onnx[gpu]'

can it support MAC
do I need to do some export like this
export ONNX_PROVIDER=CUDAExecutionProvider

can some one provide a guide for mac ?

@Dave1475
Copy link

uv remove kokoro-onnx uv add kokoro-onnx[gpu]'
does it support Mac M chips ?
I get errors uv add kokoro-onnx[gpu] zsh: no matches found: kokoro-onnx[gpu]

uv add 'kokoro-onnx[gpu]'

can it support MAC do I need to do some export like this export ONNX_PROVIDER=CUDAExecutionProvider

can some one provide a guide for mac ?

ChatGPT had this to say:

The error occurs because the zsh shell interprets the square brackets [] as special characters for glob patterns. To fix this issue, you can escape the brackets or quote the entire package name.

pip install kokoro-onnx[gpu]
or
pip install "kokoro-onnx[gpu]"

export ONNX_PROVIDER=CoreMLExecutionProvider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants