Chatterbox-TTS-Server icon indicating copy to clipboard operation
Chatterbox-TTS-Server copied to clipboard

Cannot get GPU to work on 2070 super -what am I doing wrong?

Open Dominic-Shirazi opened this issue 1 year ago • 2 comments

When ever I run the server and try any transcriptions it 'TTS engine failed to synthesize audio for chunk 1.' when using cuda, but works fine on CPU (albeit SLOW as heck)

I'm fairly new to all of this, I only started tinkering with LLMs 4 months ago and python/vibe-coding the same time. I'm comfortable in a cmd terminal as I'm 40 and have used PCs my whole life LOL, but I'm not a dev by any means...

My machine: Windows 11 Pro - 24H2 - OS Build 26100.4652 Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz dual nVidia 2070 Supers NVIDIA-SMI 572.42 - Driver Version: 572.42 - CUDA Version: 12.8 <-Current (docker version req 12.8) NVIDIA-SMI 531.41 - Driver Version: 531.41 - CUDA Version: 12.1 <-Attempted this first Python 3.10.18 (running in a conda env) miniconda <-what I'm using now Power Shell <-Still have this, but i'm using Conda Power Shell now -Is there any other info you would need? -I only have two 2070's because for reasons I had two laying around -I tried taking one out to see if that would fix things, it didn't -plans to run Chatterbox on one cuda, and gemma3 on the other (why I'm trying to use both, gemma is NOT running during these tests though) -I don't think it's a vram issue, because as watching memory utilization in Task Manager's Performance tab shows ~60%-70% utilized when attempting... I have had it work on the GPU a couple time if my 'Text to synthesize' is less than 4 words... but not every time either... Even one word failed just now as I'm typing this. -I've tried clean installs of all, including nuking my gpu drivers with DDU and trying different combos of drivers/CUDA-tool-kits and fresh pip-installs and fresh github repo pulls all with cleared respective cache's...

I tried running the docker version too (but couldn't get to "http://localhost:8004/" as it only had: 'This site can’t be reached' page... Docker seemed to start fine and said everything was running, but... alas... Couldn't get there... No, I was not running Docker in a Conda env -(but this isn't about that unless you have a fix for that too?)

I had github co-pilot agent mode try and fix it for the past couple days - no luck.... had 9 forks created, and now it gracefully fails GPU and processes on CPU in my forked version...

Conda Power Shell terminal in my conda env in MAIN github verison:

(chatterbox_cuda) PS C:\Users\persi\documents\Chatterbox-TTS-Server> python server.py C:\Users\persi\miniconda3\envs\chatterbox_cuda\lib\site-packages\perth\perth_net_init_.py:1: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. from pkg_resources import resource_filename 2025-08-01 12:01:27 [INFO] main: Starting TTS Server directly on http://0.0.0.0:8004 2025-08-01 12:01:27 [INFO] main: API documentation will be available at http://0.0.0.0:8004/docs 2025-08-01 12:01:27 [INFO] main: Web UI will be available at http://0.0.0.0:8004/ INFO: Started server process [6880] INFO: Waiting for application startup. 2025-08-01 12:01:28 [INFO] server: TTS Server: Initializing application... 2025-08-01 12:01:28 [INFO] server: Configuration loaded. Log file at: C:\Users\persi\Documents\Chatterbox-TTS-Server\logs\tts_server.log 2025-08-01 12:01:28 [INFO] engine: CUDA requested and functional. Using CUDA. 2025-08-01 12:01:28 [INFO] engine: Final device selection: cuda 2025-08-01 12:01:28 [INFO] engine: Attempting to load model directly using from_pretrained (expected from Hugging Face repository: ResembleAI/chatterbox or library default). C:\Users\persi\miniconda3\envs\chatterbox_cuda\lib\site-packages\diffusers\models\lora.py:393: FutureWarning: LoRACompatibleLinear is deprecated and will be removed in version 1.0.0. Use of LoRACompatibleLinear is deprecated. Please switch to PEFT backend by installing PEFT: pip install peft. deprecate("LoRACompatibleLinear", "1.0.0", deprecation_message) 2025-08-01 12:01:36 [INFO] root: input frame rate=25 C:\Users\persi\miniconda3\envs\chatterbox_cuda\lib\site-packages\perth\perth_net\perth_net_implicit\checkpoint_manager.py:36: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. return torch.load(ckpts[-1], map_location="cpu") loaded PerthNet (Implicit) at step 250,000 2025-08-01 12:01:38 [INFO] engine: Successfully loaded TTS model using from_pretrained on cuda (expected from 'ResembleAI/chatterbox' or library default). 2025-08-01 12:01:38 [INFO] engine: TTS Model loaded successfully on cuda. Engine sample rate: 24000 Hz. 2025-08-01 12:01:38 [INFO] server: TTS Model loaded successfully via engine. 2025-08-01 12:01:38 [INFO] server: Application startup sequence complete. INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8004 (Press CTRL+C to quit) 2025-08-01 12:01:40 [INFO] server: Attempting to open web browser to: http://localhost:8004/ 2025-08-01 12:01:40 [INFO] server: Request received for main UI page ('/'). 2025-08-01 12:01:40 [INFO] server: Request received for /api/ui/initial-data. 2025-08-01 12:01:40 [INFO] utils: Found 28 predefined voices in C:\Users\persi\Documents\Chatterbox-TTS-Server\voices 2025-08-01 12:01:45 [INFO] server: Request received for /save_settings. 2025-08-01 12:01:45 [INFO] config: TTS processing device resolved to: cuda 2025-08-01 12:01:45 [INFO] config: Configuration successfully saved to config.yaml 2025-08-01 12:01:45 [INFO] config: Configuration updated, saved, and re-resolved successfully. 2025-08-01 12:01:48 [INFO] server: Request received for /save_settings. 2025-08-01 12:01:48 [INFO] config: TTS processing device resolved to: cuda 2025-08-01 12:01:48 [INFO] config: Configuration successfully saved to config.yaml 2025-08-01 12:01:48 [INFO] config: Configuration updated, saved, and re-resolved successfully. 2025-08-01 12:01:50 [INFO] server: Request received for /save_settings. 2025-08-01 12:01:50 [INFO] config: TTS processing device resolved to: cuda 2025-08-01 12:01:50 [INFO] config: Configuration successfully saved to config.yaml 2025-08-01 12:01:50 [INFO] config: Configuration updated, saved, and re-resolved successfully. 2025-08-01 12:01:52 [INFO] server: Received /tts request: mode='predefined', format='wav' 2025-08-01 12:01:52 [INFO] server: Using predefined voice: Gianna.wav 2025-08-01 12:01:52 [INFO] server: Processing text as a single chunk (splitting not enabled or text too short). 2025-08-01 12:01:52 [INFO] server: Synthesizing chunk 1/1... 2025-08-01 12:01:52 [INFO] engine: Applying user-provided seed for generation: 3000 2025-08-01 12:01:52 [INFO] engine: Global seed set to: 3000 C:\Users\persi\miniconda3\envs\chatterbox_cuda\lib\contextlib.py:103: FutureWarning: torch.backends.cuda.sdp_kernel() is deprecated. In the future, this context manager will be removed. Please see torch.nn.attention.sdpa_kernel() for the new context manager, with updated signature. self.gen = func(*args, **kwds) sdpa attention does not support output_attentions=True or head_mask. Please set your attention to eager if you want any of these features. Sampling: 0%| | 0/1000 [00:00<?, ?it/s]C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\cuda\TensorCompare.cu:110: block: [0,0,0], thread: [0,0,0] Assertion input[0] != 0 failed. Sampling: 0%| | 0/1000 [00:00<?, ?it/s] 2025-08-01 12:01:54 [ERROR] engine: Error during TTS synthesis: CUDA error: device-side assert triggered 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. Traceback (most recent call last): File "C:\Users\persi\documents\Chatterbox-TTS-Server\engine.py", line 256, in synthesize wav_tensor = chatterbox_model.generate( File "C:\Users\persi\miniconda3\envs\chatterbox_cuda\lib\site-packages\chatterbox\tts.py", line 243, in generate speech_tokens = self.t3.inference( File "C:\Users\persi\miniconda3\envs\chatterbox_cuda\lib\site-packages\torch\utils_contextlib.py", line 116, in decorate_context return func(*args, **kwargs) File "C:\Users\persi\miniconda3\envs\chatterbox_cuda\lib\site-packages\chatterbox\models\t3\t3.py", line 351, in inference next_token = torch.multinomial(probs, num_samples=1) # shape: (B, 1) RuntimeError: CUDA error: device-side assert triggered 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.

2025-08-01 12:01:54 [ERROR] server: TTS engine failed to synthesize audio for chunk 1. 2025-08-01 12:01:54 [INFO] server: Request received for /save_settings. 2025-08-01 12:01:54 [INFO] config: TTS processing device resolved to: cuda 2025-08-01 12:01:54 [INFO] config: Configuration successfully saved to config.yaml 2025-08-01 12:01:54 [INFO] config: Configuration updated, saved, and re-resolved successfully.

output in my FORKED version:

(chatterbox_cuda) PS C:\Users\persi\documents\Chatterbox-TTS-Server-doms\Chatterbox-TTS-Server-copilot-fix-9> python server.py C:\Users\persi\miniconda3\envs\chatterbox_cuda\lib\site-packages\perth\perth_net_init_.py:1: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. from pkg_resources import resource_filename 2025-08-01 12:12:36 [INFO] main: Starting TTS Server directly on http://0.0.0.0:8004 2025-08-01 12:12:36 [INFO] main: API documentation will be available at http://0.0.0.0:8004/docs 2025-08-01 12:12:36 [INFO] main: Web UI will be available at http://0.0.0.0:8004/ INFO: Started server process [4592] INFO: Waiting for application startup. 2025-08-01 12:12:36 [INFO] server: TTS Server: Initializing application... 2025-08-01 12:12:36 [INFO] server: Configuration loaded. Log file at: C:\Users\persi\Documents\Chatterbox-tts-server-Doms\Chatterbox-TTS-Server-copilot-fix-9\logs\tts_server.log 2025-08-01 12:12:36 [INFO] engine: CUDA_LAUNCH_BLOCKING enabled for better error tracking 2025-08-01 12:12:36 [INFO] engine: TORCH_USE_CUDA_DSA enabled for device-side assertion debugging 2025-08-01 12:12:36 [INFO] engine: Force CUDA debugging mode enabled - all CUDA debug options activated 2025-08-01 12:12:36 [INFO] engine: CUDA memory fraction set to 0.98 to prevent OOM errors 2025-08-01 12:12:36 [INFO] engine: CUDA requested and functional. Using CUDA. 2025-08-01 12:12:36 [INFO] engine: Final device selection: cuda 2025-08-01 12:12:36 [INFO] engine: Attempting to load model directly using from_pretrained (expected from Hugging Face repository: ResembleAI/chatterbox or library default). C:\Users\persi\miniconda3\envs\chatterbox_cuda\lib\site-packages\diffusers\models\lora.py:393: FutureWarning: LoRACompatibleLinear is deprecated and will be removed in version 1.0.0. Use of LoRACompatibleLinear is deprecated. Please switch to PEFT backend by installing PEFT: pip install peft. deprecate("LoRACompatibleLinear", "1.0.0", deprecation_message) 2025-08-01 12:12:44 [INFO] root: input frame rate=25 C:\Users\persi\miniconda3\envs\chatterbox_cuda\lib\site-packages\perth\perth_net\perth_net_implicit\checkpoint_manager.py:36: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. return torch.load(ckpts[-1], map_location="cpu") loaded PerthNet (Implicit) at step 250,000 2025-08-01 12:12:46 [INFO] engine: Successfully loaded TTS model using from_pretrained on cuda (expected from 'ResembleAI/chatterbox' or library default). 2025-08-01 12:12:46 [INFO] engine: TTS Model loaded successfully on cuda. Engine sample rate: 24000 Hz. 2025-08-01 12:12:46 [INFO] server: TTS Model loaded successfully via engine. 2025-08-01 12:12:46 [INFO] server: Application startup sequence complete. INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8004 (Press CTRL+C to quit) 2025-08-01 12:12:48 [INFO] server: Attempting to open web browser to: http://localhost:8004/ 2025-08-01 12:12:48 [INFO] server: Request received for main UI page ('/'). 2025-08-01 12:12:48 [INFO] server: Request received for /api/ui/initial-data. 2025-08-01 12:12:48 [INFO] utils: Found 28 predefined voices in C:\Users\persi\Documents\Chatterbox-tts-server-Doms\Chatterbox-TTS-Server-copilot-fix-9\voices 2025-08-01 12:12:53 [INFO] server: Request received for /save_settings. 2025-08-01 12:12:53 [INFO] config: TTS processing device resolved to: cuda 2025-08-01 12:12:53 [INFO] config: Configuration successfully saved to config.yaml 2025-08-01 12:12:53 [INFO] config: Configuration updated, saved, and re-resolved successfully. 2025-08-01 12:12:54 [INFO] server: Received /tts request: mode='predefined', format='wav' 2025-08-01 12:12:54 [INFO] server: Using predefined voice: Gianna.wav 2025-08-01 12:12:54 [INFO] server: Processing text as a single chunk (splitting not enabled or text too short). 2025-08-01 12:12:54 [INFO] server: Synthesizing chunk 1/1... 2025-08-01 12:12:54 [INFO] engine: Applying user-provided seed for generation: 3 2025-08-01 12:12:54 [INFO] engine: Global seed set to: 3 C:\Users\persi\miniconda3\envs\chatterbox_cuda\lib\contextlib.py:103: FutureWarning: torch.backends.cuda.sdp_kernel() is deprecated. In the future, this context manager will be removed. Please see torch.nn.attention.sdpa_kernel() for the new context manager, with updated signature. self.gen = func(*args, **kwds) sdpa attention does not support output_attentions=True or head_mask. Please set your attention to eager if you want any of these features. Sampling: 0%| | 0/1000 [00:00<?, ?it/s]C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\cuda\TensorCompare.cu:110: block: [0,0,0], thread: [0,0,0] Assertion input[0] != 0 failed. Sampling: 0%| | 0/1000 [00:00<?, ?it/s] 2025-08-01 12:12:56 [ERROR] engine: Error during TTS synthesis (attempt 1/3): CUDA error: device-side assert triggered Compile with TORCH_USE_CUDA_DSA to enable device-side assertions. Traceback (most recent call last): File "C:\Users\persi\documents\Chatterbox-TTS-Server-doms\Chatterbox-TTS-Server-copilot-fix-9\engine.py", line 565, in synthesize wav_tensor = chatterbox_model.generate( File "C:\Users\persi\miniconda3\envs\chatterbox_cuda\lib\site-packages\chatterbox\tts.py", line 243, in generate speech_tokens = self.t3.inference( File "C:\Users\persi\miniconda3\envs\chatterbox_cuda\lib\site-packages\torch\utils_contextlib.py", line 116, in decorate_context return func(*args, **kwargs) File "C:\Users\persi\miniconda3\envs\chatterbox_cuda\lib\site-packages\chatterbox\models\t3\t3.py", line 351, in inference next_token = torch.multinomial(probs, num_samples=1) # shape: (B, 1) RuntimeError: CUDA error: device-side assert triggered Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

2025-08-01 12:12:56 [ERROR] engine: Device-side assertion error detected - CUDA device is in critical error state 2025-08-01 12:12:56 [WARNING] engine: Device-side assertion detected - attempting immediate CPU fallback 2025-08-01 12:12:56 [WARNING] engine: Cannot clear CUDA cache due to device-side assertion - CUDA device in error state 2025-08-01 12:12:56 [INFO] engine: CUDA_LAUNCH_BLOCKING enabled for better error tracking 2025-08-01 12:12:56 [INFO] engine: TORCH_USE_CUDA_DSA enabled for device-side assertion debugging 2025-08-01 12:12:56 [INFO] engine: Force CUDA debugging mode enabled - all CUDA debug options activated 2025-08-01 12:12:56 [WARNING] engine: Could not set CUDA memory fraction: CUDA error: device-side assert triggered Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

2025-08-01 12:12:56 [INFO] engine: CPU device explicitly requested in config. Using CPU. 2025-08-01 12:12:56 [INFO] engine: Final device selection: cpu 2025-08-01 12:12:56 [INFO] engine: Attempting to load model directly using from_pretrained (expected from Hugging Face repository: ResembleAI/chatterbox or library default). C:\Users\persi\miniconda3\envs\chatterbox_cuda\lib\site-packages\diffusers\models\lora.py:393: FutureWarning: LoRACompatibleLinear is deprecated and will be removed in version 1.0.0. Use of LoRACompatibleLinear is deprecated. Please switch to PEFT backend by installing PEFT: pip install peft. deprecate("LoRACompatibleLinear", "1.0.0", deprecation_message) 2025-08-01 12:13:04 [INFO] root: input frame rate=25 C:\Users\persi\miniconda3\envs\chatterbox_cuda\lib\site-packages\perth\perth_net\perth_net_implicit\checkpoint_manager.py:36: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. return torch.load(ckpts[-1], map_location="cpu") loaded PerthNet (Implicit) at step 250,000 2025-08-01 12:13:05 [INFO] engine: Successfully loaded TTS model using from_pretrained on cpu (expected from 'ResembleAI/chatterbox' or library default). 2025-08-01 12:13:05 [INFO] engine: TTS Model loaded successfully on cpu. Engine sample rate: 24000 Hz. 2025-08-01 12:13:05 [INFO] engine: Successfully reloaded model on CPU after device-side assertion 2025-08-01 12:13:05 [INFO] engine: Applying user-provided seed for generation: 3 2025-08-01 12:13:05 [ERROR] engine: Failed to set global seed: CUDA error: device-side assert triggered Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

Sampling: 3%|█████▌ | 30/1000 [00:05<02:58, 5.42it/s] 2025-08-01 12:13:22 [INFO] engine: Generation completed successfully in 17.21 seconds 2025-08-01 12:13:22 [INFO] engine: Synthesis successful - tensor shape: torch.Size([1, 28800]), device: cpu 2025-08-01 12:13:22 [INFO] utils: Encoded 57644 bytes to 'wav' at 24000Hz in 0.000 seconds. 2025-08-01 12:13:22 [INFO] server: Successfully generated audio: tts_output_20250801_121322.wav, 57644 bytes, type audio/wav. 2025-08-01 12:13:30 [INFO] server: Request received for /save_settings. 2025-08-01 12:13:31 [INFO] config: TTS processing device resolved to: cpu 2025-08-01 12:13:31 [INFO] config: Configuration successfully saved to config.yaml 2025-08-01 12:13:31 [INFO] config: Configuration updated, saved, and re-resolved successfully.

Dominic-Shirazi avatar Aug 01 '25 19:08 Dominic-Shirazi

I should mention that I ran tests on my GPU(s) (FurMark_2.9.0.0_win64) to make sure they weren't burnt (used to mine some crypto back in 2020 for a little while - limited to ensure they didn't burn out, or I hoped)

Furmark KNOT (GL) Time: 60 sec, Frames: 2992 (49FPS) NVIDIA GeForce RTX 2070 SUPER/PCIe/SSE2 OpenGL 3.2.0 Nvidia 572.42 Resolution: 1920x1061 (windowed) MSAA: Off Duration : 60015msec

Max Tmp 66C Max Usage 100% Max clock 1876MHz Min Clock 1606MHz

Image

Dominic-Shirazi avatar Aug 01 '25 19:08 Dominic-Shirazi

Nope, I swapped out one of my graphics cards with a different one and now it's working... Apparently a GPU can be functional enough for most processes and not others 😒

Dominic-Shirazi avatar Aug 04 '25 18:08 Dominic-Shirazi