Skip to content

Error installing with M4: pickle.UnpicklingError: invalid load key, 'v'. #2

Open
@romanr

Description

@romanr
/Users/woodenman/pinokio/api/StyleTTS2_Studio.git/app/models.py:537: 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.
  params = torch.load(model_path, map_location='cpu')['model']
Traceback (most recent call last):
  File "/Users/woodenman/pinokio/api/StyleTTS2_Studio.git/app/app.py", line 23, in <module>
    from text2speech import tts_randomized, parse_speed, tts_with_style_vector
  File "/Users/woodenman/pinokio/api/StyleTTS2_Studio.git/app/text2speech.py", line 14, in <module>
    import inference
  File "/Users/woodenman/pinokio/api/StyleTTS2_Studio.git/app/inference.py", line 158, in <module>
    text_aligner = load_ASR_models(ASR_path, ASR_config)
  File "/Users/woodenman/pinokio/api/StyleTTS2_Studio.git/app/models.py", line 542, in load_ASR_models
    asr_model = _load_model(asr_model_config, ASR_MODEL_PATH)
  File "/Users/woodenman/pinokio/api/StyleTTS2_Studio.git/app/models.py", line 537, in _load_model
    params = torch.load(model_path, map_location='cpu')['model']
  File "/Users/woodenman/pinokio/api/StyleTTS2_Studio.git/app/env/lib/python3.10/site-packages/torch/serialization.py", line 1384, in load
    return _legacy_load(
  File "/Users/woodenman/pinokio/api/StyleTTS2_Studio.git/app/env/lib/python3.10/site-packages/torch/serialization.py", line 1628, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'v'.
�[?2004h(env) (base) <<PINOKIO_SHELL>>config {
  config: {
    url: 'https://portal.pinokio.computer/',
    frameName: '',
    features: '',
    disposition: 'foreground-tab',
    referrer: {
      url: 'http://localhost/',
      policy: 'strict-origin-when-cross-origin'
    },
    postBody: undefined
  },
  root_url: 'http://localhost',
  origin: 'https://portal.pinokio.computer'
}
{ features: '', url: 'https://portal.pinokio.computer/' }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions