Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
AI and LLM integration

Whisper prints "FP16 is not supported on CPU; using FP32 instead"

ErrorFP16 is not supported on CPU; using FP32 instead

Short 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.

  • Applies to openai-whisper, PyTorch 2.x, Python 3.12
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 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)
  2. 2Match what you see, then jump to its fix

    1. 1The warning appears on every transcribe() call and the transcript is still produced.The model runs on the CPU, where FP16 is not usedFix
    2. 2model.device prints cpu on a machine with an NVIDIA GPU, or the code passes device="cpu".You wanted the GPU but the model was loaded on the CPUFix

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 False

3Verify

The warning is gone and the transcript prints.

python transcribe.py

Confirmed by raw.githubusercontent.com

Did this fix it?

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 argument

3Verify

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

Did this fix it?

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:

Related fixes

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.