- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.9k
Open
Description
Describe the bug
我使用官方安装脚本,安装之后,运行代码:
python webui.py --port 8033 --model_dir pretrained_models/CosyVoice2-0.5B
报错信息:
Traceback (most recent call last):
  File "/home/octopus/data/rwq/CosyVoice/webui.py", line 188, in <module>
    cosyvoice = CosyVoice(args.model_dir)
  File "/home/octopus/data/rwq/CosyVoice/cosyvoice/cli/cosyvoice.py", line 37, in __init__
    raise ValueError('{} not found!'.format(hyper_yaml_path))
ValueError: /home/octopus/data/rwq/CosyVoice/pretrained_models/CosyVoice2-0.5B/cosyvoice.yaml not found!
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/powerop/work/conda/envs/test_cosyvoice_vllm/lib/python3.10/pydoc.py", line 439, in safeimport
    module = __import__(path)
  File "/home/octopus/data/rwq/CosyVoice/cosyvoice/flow/flow_matching.py", line 17, in <module>
    from matcha.models.components.flow_matching import BASECFM
  File "/home/octopus/data/rwq/CosyVoice/third_party/Matcha-TTS/matcha/models/components/flow_matching.py", line 7, in <module>
    from matcha.utils.pylogger import get_pylogger
  File "/home/octopus/data/rwq/CosyVoice/third_party/Matcha-TTS/matcha/utils/__init__.py", line 1, in <module>
    from matcha.utils.instantiators import instantiate_callbacks, instantiate_loggers
  File "/home/octopus/data/rwq/CosyVoice/third_party/Matcha-TTS/matcha/utils/instantiators.py", line 4, in <module>
    from lightning import Callback
  File "/home/powerop/.local/lib/python3.10/site-packages/lightning/__init__.py", line 21, in <module>
    from lightning.pytorch.callbacks import Callback  # noqa: E402
  File "/home/powerop/.local/lib/python3.10/site-packages/lightning/pytorch/__init__.py", line 27, in <module>
    from lightning.pytorch.callbacks import Callback  # noqa: E402
  File "/home/powerop/.local/lib/python3.10/site-packages/lightning/pytorch/callbacks/__init__.py", line 14, in <module>
    from lightning.pytorch.callbacks.batch_size_finder import BatchSizeFinder
  File "/home/powerop/.local/lib/python3.10/site-packages/lightning/pytorch/callbacks/batch_size_finder.py", line 26, in <module>
    from lightning.pytorch.callbacks.callback import Callback
  File "/home/powerop/.local/lib/python3.10/site-packages/lightning/pytorch/callbacks/callback.py", line 22, in <module>
    from lightning.pytorch.utilities.types import STEP_OUTPUT
  File "/home/powerop/.local/lib/python3.10/site-packages/lightning/pytorch/utilities/types.py", line 41, in <module>
    from torchmetrics import Metric
  File "/home/powerop/.local/lib/python3.10/site-packages/torchmetrics/__init__.py", line 37, in <module>
    from torchmetrics import functional  # noqa: E402
  File "/home/powerop/.local/lib/python3.10/site-packages/torchmetrics/functional/__init__.py", line 56, in <module>
    from torchmetrics.functional.image._deprecated import (
  File "/home/powerop/.local/lib/python3.10/site-packages/torchmetrics/functional/image/__init__.py", line 14, in <module>
    from torchmetrics.functional.image.arniqa import arniqa
  File "/home/powerop/.local/lib/python3.10/site-packages/torchmetrics/functional/image/arniqa.py", line 31, in <module>
    from torchvision import transforms
  File "/home/powerop/.local/lib/python3.10/site-packages/torchvision/__init__.py", line 10, in <module>
    from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils  # usort:skip
  File "/home/powerop/.local/lib/python3.10/site-packages/torchvision/_meta_registrations.py", line 163, in <module>
    @torch.library.register_fake("torchvision::nms")
AttributeError: module 'torch.library' has no attribute 'register_fake'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/octopus/data/rwq/CosyVoice/webui.py", line 191, in <module>
    cosyvoice = CosyVoice2(args.model_dir)
  File "/home/octopus/data/rwq/CosyVoice/cosyvoice/cli/cosyvoice.py", line 155, in __init__
    configs = load_hyperpyyaml(f, overrides={'qwen_pretrain_path': os.path.join(model_dir, 'CosyVoice-BlankEN')})
  File "/home/powerop/.local/lib/python3.10/site-packages/hyperpyyaml/core.py", line 188, in load_hyperpyyaml
    hparams = yaml.load(yaml_stream, Loader=loader)
  File "/home/powerop/work/conda/envs/test_cosyvoice_vllm/lib/python3.10/site-packages/yaml/__init__.py", line 81, in load
    return loader.get_single_data()
  File "/home/powerop/.local/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 119, in get_single_data
    return self.construct_document(node)
  File "/home/powerop/.local/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 123, in construct_document
    data = self.construct_object(node)
  File "/home/powerop/.local/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 150, in construct_object
    data = self.construct_non_recursive_object(node)
  File "/home/powerop/.local/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 191, in construct_non_recursive_object
    for _dummy in generator:
  File "/home/powerop/.local/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 629, in construct_yaml_map
    value = self.construct_mapping(node)
  File "/home/powerop/.local/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 425, in construct_mapping
    return BaseConstructor.construct_mapping(self, node, deep=deep)
  File "/home/powerop/.local/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 247, in construct_mapping
    value = self.construct_object(value_node, deep=deep)
  File "/home/powerop/.local/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 150, in construct_object
    data = self.construct_non_recursive_object(node)
  File "/home/powerop/.local/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 186, in construct_non_recursive_object
    data = constructor(self, tag_suffix, node)
  File "/home/powerop/.local/lib/python3.10/site-packages/hyperpyyaml/core.py", line 480, in _construct_object
    args, kwargs = _load_node(loader, node)
  File "/home/powerop/.local/lib/python3.10/site-packages/hyperpyyaml/core.py", line 434, in _load_node
    kwargs = loader.construct_mapping(node, deep=True)
  File "/home/powerop/.local/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 425, in construct_mapping
    return BaseConstructor.construct_mapping(self, node, deep=deep)
  File "/home/powerop/.local/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 247, in construct_mapping
    value = self.construct_object(value_node, deep=deep)
  File "/home/powerop/.local/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 150, in construct_object
    data = self.construct_non_recursive_object(node)
  File "/home/powerop/.local/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 186, in construct_non_recursive_object
    data = constructor(self, tag_suffix, node)
  File "/home/powerop/.local/lib/python3.10/site-packages/hyperpyyaml/core.py", line 470, in _construct_object
    callable_ = pydoc.locate(callable_string)
  File "/home/powerop/work/conda/envs/test_cosyvoice_vllm/lib/python3.10/pydoc.py", line 1719, in locate
    nextmodule = safeimport('.'.join(parts[:n+1]), forceload)
  File "/home/powerop/work/conda/envs/test_cosyvoice_vllm/lib/python3.10/pydoc.py", line 454, in safeimport
    raise ErrorDuringImport(path, sys.exc_info())
pydoc.ErrorDuringImport: problem in cosyvoice.flow.flow_matching - AttributeError: module 'torch.library' has no attribute 'register_fake'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/octopus/data/rwq/CosyVoice/webui.py", line 193, in <module>
    raise TypeError('no valid model_type!')
TypeError: no valid model_type!
To Reproduce
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
No labels