axinc-ai / ailia-models

The collection of pre-trained, state-of-the-art AI models for ailia SDK
2.04k stars 325 forks source link

fix whisper.py with --dynamic_kv_cache option #1219

Closed kzmogi closed 1 year ago

kzmogi commented 1 year ago

master bc6972586b6c93b9b2ecaed4f3689a314d008c3d

d:\ailia\ailia-models\audio_processing\whisper>python whisper.py --dynamic_kv_cache -e 0
 INFO arg_utils.py (13) : Start!
 INFO arg_utils.py (163) : env_id: 0
 INFO arg_utils.py (166) : CPU
 INFO model_utils.py (84) : ONNX file and Prototxt file are prepared!
 INFO model_utils.py (84) : ONNX file and Prototxt file are prepared!
 INFO whisper.py (919) : This model uses a lot of memory. If an error occurs during execution, specify -e 0 and execute on the CPU.
 INFO whisper.py (820) : demo.wav
 INFO whisper.py (826) : Start inference...
 INFO whisper.py (690) : Detected language: English
 INFO whisper.py (724) : [00:00.000 --> 00:00.000]  He hoped there would be stew for dinner, he hoped there would be stew for dinner, he hoped there would be stew for dinner, he hoped there would be stew for dinner, he hoped there would be stew for dinner, he hoped there would be stew for dinner, he hoped there would be stew for dinner, he hoped there would be stew for dinner, he hoped there would be stew for dinner, he hoped there would be stew for dinner, he hoped there would be stew for dinner, he hoped there would be stew for dinner, he hoped there would be stew for dinner, he hoped there would be stew for dinner, he hoped there would be stew for dinner, he hoped
 INFO whisper.py (843) : Script finished successfully.

this PR a6a03e887dc59e9a969218a113e7c98905c623d6

d:\ailia\ailia-models\audio_processing\whisper>python whisper.py --dynamic_kv_cache -e 0
 INFO arg_utils.py (13) : Start!
 INFO arg_utils.py (163) : env_id: 0
 INFO arg_utils.py (166) : CPU
 INFO model_utils.py (84) : ONNX file and Prototxt file are prepared!
 INFO model_utils.py (84) : ONNX file and Prototxt file are prepared!
 INFO whisper.py (919) : This model uses a lot of memory. If an error occurs during execution, specify -e 0 and execute on the CPU.
 INFO whisper.py (820) : demo.wav
 INFO whisper.py (826) : Start inference...
 INFO whisper.py (690) : Detected language: English
 INFO whisper.py (724) : [00:00.000 --> 00:10.000]  He hoped there would be stew for dinner, turnips and carrots and bruised potatoes and fat mutton pieces to be ladled out in thick, peppered, flour-fattened sauce.
 INFO whisper.py (843) : Script finished successfully.