zyddnys / manga-image-translator

Translate manga/image 一键翻译各类图片内文字 https://cotrans.touhou.ai/
https://cotrans.touhou.ai/
GNU General Public License v3.0
5.42k stars 557 forks source link

Cuda translation bug found and fixed #189

Closed singersbalm closed 1 year ago

singersbalm commented 1 year ago

When i try to translate with cuda it fails because as a device its only set to cuda, but torch needs the id of the gpu. I fixed it by changing the device from "cuda" to "cuda:0". The problem is at line 89 in nllb.py. The device variable is set in :translations/init.py at line 85. Thats where i changed it and it works fine

thatDudo commented 1 year ago

If you want you can open a pull request, otherwise i will just do it manually