Skip to content

Commit

Permalink
fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
Mortimerp9 committed Dec 11, 2024
1 parent 5fac3ba commit 2e9f21d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sonar/inference_pipelines/speech.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def __init__(
tokenizer = load_sonar_tokenizer(tokenizer, progress=False)

self.tokenizer = tokenizer
self.model = SonarEncoderDecoderModel(encoder, decoder).to(device).eval()
self.model = SonarEncoderDecoderModel(encoder, decoder).to(device).eval() # type: ignore

# Only quantize the model in CUDA to bypass the error "LayerNormKernelImpl" not implemented for 'Half'
# in some CUDAs and torch versions
Expand Down Expand Up @@ -407,7 +407,7 @@ def __init__(

if isinstance(encoder, str):
encoder = load_sonar_speech_model(encoder, device=device, progress=False)
self.model = encoder.to(device).eval()
self.model = encoder.to(device).eval() # type: ignore

# Only quantize the model in CUDA to bypass the error "LayerNormKernelImpl" not implemented for 'Half'
# in some CUDAs and torch versions
Expand Down

0 comments on commit 2e9f21d

Please sign in to comment.