FunAudioLLM / CosyVoice

Multi-lingual large voice generation model, providing inference, training and deployment full-stack ability.
https://funaudiollm.github.io/
Apache License 2.0
4.46k stars 441 forks source link

webui 克隆音色报错 #154

Open Pandas886 opened 1 month ago

Pandas886 commented 1 month ago

image

windows平台在docker中运行webui.py

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/gradio/queueing.py", line 521, in process_events
    response = await route_utils.call_process_api(
  File "/usr/local/lib/python3.8/dist-packages/gradio/route_utils.py", line 276, in call_process_api
    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 1945, in process_api
    result = await self.call_function(
  File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 1513, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.8/dist-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 859, in run
    result = context.run(func, *args)
  File "/usr/local/lib/python3.8/dist-packages/gradio/utils.py", line 831, in wrapper
    response = f(*args, **kwargs)
  File "webui.py", line 125, in generate_audio
    output = cosyvoice.inference_zero_shot(tts_text, prompt_text, prompt_speech_16k)
  File "/opt/CosyVoice/CosyVoice/cosyvoice/cli/cosyvoice.py", line 60, in inference_zero_shot
    model_output = self.model.inference(**model_input)
  File "/opt/CosyVoice/CosyVoice/cosyvoice/cli/model.py", line 40, in inference
    tts_speech_token = self.llm.inference(text=text.to(self.device),
  File "/usr/local/lib/python3.8/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/opt/CosyVoice/CosyVoice/cosyvoice/llm/llm.py", line 196, in inference
    y_pred, att_cache, cnn_cache = self.llm.forward_chunk(lm_input, offset=0, required_cache_size=-1, att_cache=att_cache, cnn_cache=cnn_cache,
  File "/opt/CosyVoice/CosyVoice/cosyvoice/transformer/encoder.py", line 267, in forward_chunk
    r_att_cache = torch.cat(r_att_cache, dim=0)
RuntimeError: CUDA error: unknown error
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.
aluminumbox commented 1 month ago

try end prompt text with puncatation