Skip to content

按照步骤安装出错 #90

@markmars

Description

@markmars

drake@DESKTOP-05BHGRQ:~$ flashtts serve --model_path Spark-TTS-0.5B --backend vllm --llm_device cuda --tokenizer_device cuda --detokenizer_device cuda --wav2vec_attn_implementation sdpa --llm_attn_implementation sdpa --torch_dtype "bfloat16" --max_length 32768 --llm_gpu_memory_utilization 0.6 --fix_voice --host 0.0.0.0 --port 8000
[FlashTTS] 2025-08-16 13:33:12 [INFO] [serve:227] >> Starting FlashTTS service...
[FlashTTS] 2025-08-16 13:33:12 [INFO] [serve:228] >> Serving args: Namespace(model_path='Spark-TTS-0.5B', backend='vllm', lang=None, llm_tensorrt_path=None, snac_path=None, llm_device='cuda', tokenizer_device='cuda', detokenizer_device='cuda', wav2vec_attn_implementation='sdpa', llm_attn_implementation='sdpa', max_length=32768, llm_gpu_memory_utilization=0.6, torch_dtype='bfloat16', cache_implementation=None, seed=0, batch_size=1, llm_batch_size=8, wait_timeout=0.01, model_name=None, role_dir=None, db_path='SPEAKERS.bin', api_key=None, fix_voice=True, host='0.0.0.0', port=8000, ssl_keyfile=None, ssl_certfile=None, func=<function serve_command_factory at 0x7b4cb39c11b0>)
INFO: Started server process [87907]
INFO: Waiting for application startup.
[FlashTTS] 2025-08-16 13:33:12 [INFO] [auto_engine:120] >> Initializing AutoEngine(engine=spark) with config: (model_path='Spark-TTS-0.5B', max_length=32768, llm_device='cuda', llm_tensorrt_path=None, backend='vllm', llm_attn_implementation='sdpa', torch_dtype='bfloat16', llm_gpu_memory_utilization=0.6, cache_implementation=None, batch_size=1, llm_batch_size=8, seed=0, tokenizer_device='cuda', detokenizer_device='cuda', wav2vec_attn_implementation='sdpa', wait_timeout=0.01)
/home/drake/.local/lib/python3.10/site-packages/torch/nn/utils/weight_norm.py:143: FutureWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.
WeightNorm.apply(module, name, dim)
INFO 08-16 13:33:14 [init.py:235] Automatically detected platform cuda.
ERROR: Traceback (most recent call last):
File "/home/drake/.local/lib/python3.10/site-packages/starlette/routing.py", line 694, in lifespan
async with self.lifespan_context(app) as maybe_state:
File "/usr/lib/python3.10/contextlib.py", line 199, in aenter
return await anext(self.gen)
File "/home/drake/.local/lib/python3.10/site-packages/fastapi/routing.py", line 134, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/lib/python3.10/contextlib.py", line 199, in aenter
return await anext(self.gen)
File "/home/drake/.local/lib/python3.10/site-packages/fastapi/routing.py", line 134, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "/usr/lib/python3.10/contextlib.py", line 199, in aenter
return await anext(self.gen)
File "/home/drake/.local/lib/python3.10/site-packages/flashtts/commands/serve.py", line 107, in lifespan
engine = AutoEngine(
File "/home/drake/.local/lib/python3.10/site-packages/flashtts/engine/auto_engine.py", line 122, in init
self._engine = engine_cls(**engine_kwargs)
File "/home/drake/.local/lib/python3.10/site-packages/flashtts/engine/spark_engine.py", line 285, in init
super().init(
File "/home/drake/.local/lib/python3.10/site-packages/flashtts/engine/base_engine.py", line 177, in init
self.generator = initialize_llm(
File "/home/drake/.local/lib/python3.10/site-packages/flashtts/llm/init_llm.py", line 39, in initialize_llm
return VllmGenerator(
File "/home/drake/.local/lib/python3.10/site-packages/flashtts/llm/vllm_generator.py", line 32, in init
async_args = AsyncEngineArgs(**engine_kwargs)
TypeError: AsyncEngineArgs.init() got an unexpected keyword argument 'device'

Exception ignored in: <function BaseEngine.del at 0x7b4b34f84ee0>
Traceback (most recent call last):
File "/home/drake/.local/lib/python3.10/site-packages/flashtts/engine/base_engine.py", line 249, in del
self.shutdown()
File "/home/drake/.local/lib/python3.10/site-packages/flashtts/engine/base_engine.py", line 246, in shutdown
self.generator.shutdown()
AttributeError: 'AsyncSparkEngine' object has no attribute 'generator'
Exception ignored in: <function AutoEngine.del at 0x7b4b34f856c0>
Traceback (most recent call last):
File "/home/drake/.local/lib/python3.10/site-packages/flashtts/engine/auto_engine.py", line 144, in del
self.shutdown()
File "/home/drake/.local/lib/python3.10/site-packages/flashtts/engine/auto_engine.py", line 141, in shutdown
self._engine.shutdown()
AttributeError: 'AutoEngine' object has no attribute '_engine'
ERROR: Application startup failed. Exiting.

用的wsl,重装了好多次好像都是这个问题。请大佬指点下怎么回事,感谢!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions