rakuri255 / UltraSinger

AI based tool to convert vocals lyrics and pitch from music to autogenerate Ultrastar Deluxe, Midi and notes. It automatic tapping, adding text, pitch vocals and creates karaoke files.
MIT License
290 stars 26 forks source link

Whisper compute_type float16 does not work on older GPUs #81

Closed rakuri255 closed 1 year ago

rakuri255 commented 1 year ago

Older GPUss like GTX1080 cant use float16, so it needs int8. How to check this in code? https://github.com/guillaumekln/faster-whisper/issues/42

BanCrash commented 1 year ago

Older GPUss like GTX1080 cant use float16, so it needs int8. How to check this in code? guillaumekln/faster-whisper#42

I'm not good with python but wouldn't be enough with a try - catch? Assuming that not having float16 would throw an error, which I don't know if that's the case.

try:
   compute_type = "float16"
   call_function(compute_type)
except:
   compute_type = "int8"
   call_function(compute_type)
rakuri255 commented 1 year ago

Thanks to @BWagener for PR #89. Now you can chance the compute_type for whisper. See Readme.

    --whisper_batch_size    Reduce if low on GPU mem >> ((default) is 16)
    --whisper_compute_type  Change to "int8" if low on GPU mem (may reduce accuracy) >> ((default) is "float16" for cuda devices, "int8" for cpu)