Whisper prints "FP16 is not supported on CPU; using FP32 instead"
FP16 is not supported on CPU; using FP32 insteadShort answer
This is a warning, not a failure. Whisper defaults to half precision, and when the model sits on the CPU it switches to full precision and tells you so. Pass fp16=False to transcribe() to request FP32 and silence it. If you expected a GPU, the model was loaded on the CPU, so check the device it was loaded with.
Fix it fast
1Find out which cause you have
Print the device the loaded model is on. cpu explains the warning; cuda means the warning has another origin, so check your own transcribe options.
import whisper model = whisper.load_model("base") print(model.device)2Match what you see, then jump to its fix
What does the error look like?
FP16 is not supported on CPU; using FP32 instead
Cause 1 of 2
The model runs on the CPU, where FP16 is not used
1Check
In the source, transcribe() starts with float16 unless fp16 is false, and on a CPU it switches to float32 and prints this line.
python -c "import whisper; print(whisper.load_model('base').device)"2Fix
Ask for full precision yourself. The CLI has the matching --fp16 flag, which defaults to True.
result = model.transcribe("audio.mp3", fp16=False)
print(result)
# command line
whisper audio.mp3 --model base --fp16 False3Verify
The warning is gone and the transcript prints.
python transcribe.pyConfirmed by raw.githubusercontent.com
Cause 2 of 2
You wanted the GPU but the model was loaded on the CPU
1Check
load_model picks cuda when torch.cuda.is_available() is true, otherwise cpu, unless you pass device yourself.
python -c "import torch; print(torch.cuda.is_available())"2Fix
Remove an explicit device="cpu" argument so Whisper can choose the GPU. If torch.cuda.is_available() prints False, PyTorch cannot see a GPU, and that has to be fixed in your PyTorch install first.
model = whisper.load_model("base") # no device argument3Verify
The device printed is cuda and the warning no longer appears.
python -c "import whisper; print(whisper.load_model('base').device)"Confirmed by raw.githubusercontent.com
How do I stop it coming back?
- On CPU-only servers, set fp16=False once in a shared wrapper so the log stays clean.
- Log model.device at startup so you always know where inference runs.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- stegnor.comMy company site: 804 pages from a Python and Jinja generator, with 15 free browser tools.
- MenuloA restaurant discovery platform in Germany, kept current by a Python ingestion pipeline.
- ShopGoAn e-commerce aggregator with a Python scraping engine behind its catalog, past 10K Google Play downloads.
Related fixes
AI
Azure OpenAI says the API deployment for this resource does not exist
The API deployment for this resource does not exist
Azure OpenAI does not take a model name in the model field.
2 causes, each with a fixAI
Azure OpenAI fails with an SSL certificate verification error
httpx.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED]
The client checks the endpoint's certificate against its CA bundle, which is certifi by default.
2 causes, each with a fixAI
The OpenAI client says the API key is missing
Missing credentials. Please pass an `api_key`
OpenAI() looks for an api_key argument first and then the OPENAI_API_KEY environment variable.
3 causes, each with a fixAI
OpenAI says the model is a chat model and not supported in the v1/completions endpoint
This is a chat model and not supported in the v1/completions endpoint
The v1/completions endpoint accepts completion models such as gpt-3.5-turbo-instruct.
3 causes, each with a fixAI
Old openai.ChatCompletion or openai.Embedding code breaks on a new SDK
APIRemovedInV1
The Python SDK was rewritten in version 1.0.
2 causes, each with a fixAI
TypeError when you index an OpenAI response like a dictionary
TypeError: 'ChatCompletion' object is not subscriptable
Since SDK 1.0 the OpenAI Python library returns Pydantic model objects instead of dictionaries, so response['choices'] fails.
2 causes, each with a fix