pyannote-audio icon indicating copy to clipboard operation
pyannote-audio copied to clipboard

Pipeline inference with gpu?

Open kouohhashi opened this issue 2 years ago • 3 comments

Hi, I tried pipeline inference on Colab.

from pyannote.audio import Pipeline
pipeline = Pipeline.from_pretrained('pyannote/speaker-diarization')

It seems model was not on GPU.

!nvidia-smi

Fri Aug 19 01:27:06 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.32.03    Driver Version: 460.32.03    CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla T4            Off  | 00000000:00:04.0 Off |                    0 |
| N/A   68C    P0    28W /  70W |   1300MiB / 15109MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+

Is there any option to do inference with GPU?

Thanks for advance.

kouohhashi avatar Aug 19 '22 01:08 kouohhashi

It does run on GPU by default when GPUs are available.

hbredin avatar Aug 19 '22 08:08 hbredin

Thank you fore responding me. So even if !nvidia-smi show no process , it's going to use gpu? It's a Colab environment so gpu is supposed to be accessible.

kouohhashi avatar Aug 19 '22 09:08 kouohhashi

Yes.

hbredin avatar Aug 19 '22 11:08 hbredin

Can i control turn off or on gpu mode ??

GoldDRoge avatar Oct 02 '22 15:10 GoldDRoge

Sorry my bad. somehow newly created env did not detect gpu. I re-installed torch and gpu is detected now...

kouohhashi avatar Dec 01 '22 00:12 kouohhashi