gabrielmittag / NISQA

NISQA - Non-Intrusive Speech Quality and TTS Naturalness Assessment
MIT License
663 stars 117 forks source link

CDUA device does not load the model #39

Closed IamHussain503 closed 10 months ago

IamHussain503 commented 10 months ago

Hi, It is an attempt to reach you about a a problem I face, the model does not load in to GPU while making inference. CPU is fast though , each file takes abour 1 second to complete, however this is not the behaviour what i want. I want it a little more faster. Can you please give me a hint. I have even used self.dev to cuda in NISQ_DIM, but model still goes to CPU. image

Thanks in advance!

IamHussain503 commented 10 months ago
    nisqa = nisqaModel(args)
    # Print the device of the model
    print(" The parameters Device of the NISQA MODEL:  ",next(nisqa.model.parameters()).device)
    # Execute the prediction directly
    nisqa.predict()

The code gives me "cuda:0" result of the print statement, but model inference goes to CPU. Thanks for your guidence.

gabrielmittag commented 10 months ago

it looks like it does go through the GPU, it's just that the model is relatively small so that the utilization is quite low. The CPU usage you are seeing is probably from the data preprocessing, such as computing Mel-specs