RVC-Boss / GPT-SoVITS

1 min voice data can also be used to train a good TTS model! (few shot voice cloning)
MIT License
35.3k stars 4.03k forks source link

API推理报错RuntimeError: CUDA error: misaligned address #1608

Open cheng9436 opened 1 month ago

cheng9436 commented 1 month ago

INFO: 127.0.0.1:5314 - "POST / HTTP/1.1" 200 OK ERROR: Exception in ASGI application Traceback (most recent call last): File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 407, in run_asgi result = await app( # type: ignore[func-returns-value] File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 78, in call return await self.app(scope, receive, send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\fastapi\applications.py", line 1054, in call await super().call(scope, receive, send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\applications.py", line 123, in call await self.middleware_stack(scope, receive, send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\middleware\errors.py", line 186, in call raise exc File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\middleware\errors.py", line 164, in call await self.app(scope, receive, _send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\middleware\exceptions.py", line 65, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app raise exc File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\routing.py", line 754, in call await self.middleware_stack(scope, receive, send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\routing.py", line 774, in app await route.handle(scope, receive, send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\routing.py", line 295, in handle await self.app(scope, receive, send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\routing.py", line 77, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app raise exc File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\routing.py", line 75, in app await response(scope, receive, send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\responses.py", line 265, in call await wrap(partial(self.listen_for_disconnect, receive)) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\anyio_backends_asyncio.py", line 662, in aexit raise exceptions[0] File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\responses.py", line 261, in wrap await func() File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\responses.py", line 250, in stream_response async for chunk in self.body_iterator: File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\concurrency.py", line 65, in iterate_in_threadpool yield await anyio.to_thread.run_sync(_next, as_iterator) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\concurrency.py", line 54, in _next return next(iterator) File "E:\GPT-SoVITS-v2-240821\api.py", line 582, in get_tts_wav wav16k = wav16k.to(device) RuntimeError: CUDA error: misaligned address CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

INFO: 127.0.0.1:5315 - "POST / HTTP/1.1" 200 OK ERROR: Exception in ASGI application Traceback (most recent call last): File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 407, in run_asgi result = await app( # type: ignore[func-returns-value] File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 78, in call return await self.app(scope, receive, send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\fastapi\applications.py", line 1054, in call await super().call(scope, receive, send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\applications.py", line 123, in call await self.middleware_stack(scope, receive, send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\middleware\errors.py", line 186, in call raise exc File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\middleware\errors.py", line 164, in call await self.app(scope, receive, _send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\middleware\exceptions.py", line 65, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app raise exc File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\routing.py", line 754, in call await self.middleware_stack(scope, receive, send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\routing.py", line 774, in app await route.handle(scope, receive, send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\routing.py", line 295, in handle await self.app(scope, receive, send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\routing.py", line 77, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app raise exc File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\routing.py", line 75, in app await response(scope, receive, send) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\responses.py", line 265, in call await wrap(partial(self.listen_for_disconnect, receive)) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\anyio_backends_asyncio.py", line 662, in aexit raise exceptions[0] File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\responses.py", line 261, in wrap await func() File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\responses.py", line 250, in stream_response async for chunk in self.body_iterator: File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\concurrency.py", line 65, in iterate_in_threadpool yield await anyio.to_thread.run_sync(_next, as_iterator) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "E:\GPT-SoVITS-v2-240821\runtime\lib\site-packages\starlette\concurrency.py", line 54, in _next return next(iterator) File "E:\GPT-SoVITS-v2-240821\api.py", line 582, in get_tts_wav wav16k = wav16k.to(device) RuntimeError: CUDA error: misaligned address CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with TORCH_USE_CUDA_DSA to enable device-side assertions. 微信截图_20240912134638

使用api批量时刚开始运行可以正常推理,然后推理一会就会出现这个错误,如何解决

KamioRinn commented 1 month ago

显存爆了?

cheng9436 commented 1 month ago

显存爆了? 微信截图_20240912154119 跑的时候,任务管理器是这样 我看着显存一直占用是不满的,占用一直是 4.x/8G

cheng9436 commented 1 month ago

微信截图_20240912160511 又推理中途失败了,一直爆这个错误

KamioRinn commented 1 month ago

又推理中途失败了,一直爆这个错误

光看这个输出定位不了太具体的原因,启动API服务的时候关闭半精度试一下