Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
romanr opened this issue Jan 13, 2025 · 1 comment

Comments

@romanr
Copy link

romanr commented Jan 13, 2025

/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/' }

@wattoo71
Copy link

Me too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants