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

Wrong cuda device (device_id > 0) on VAD in whisperx.load_model() method #785

Open
grzegorz700 opened this issue Apr 19, 2024 · 0 comments

Comments

@grzegorz700
Copy link

When we use whisperx.load_model(..., device='cuda', device_id=1), we get a quick peek at the wrong (cuda:0) GPU device instead of the desired one. The problem occurs due to different setups for the model and VAD (in the model, we split to device and device_id, but in VAD we use only device name).

vad_model = load_vad_model(torch.device(device), use_auth_token=None, **default_vad_options)

Bug visually:

whisperX-wrong-gpu

Possible solution:

if device == 'cuda' and device_id  and device_id> 0:
    device_vad = f"cuda:{device_id}"
else:
    device_vad = device
vad_model = load_vad_model(torch.device(device_vad), use_auth_token=None, **default_vad_options)
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

1 participant