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

errors when loading the model weights #757

Open
6 tasks done
weizhenhuan opened this issue Dec 16, 2024 · 1 comment
Open
6 tasks done

errors when loading the model weights #757

weizhenhuan opened this issue Dec 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@weizhenhuan
Copy link

weizhenhuan commented Dec 16, 2024

Self Checks

  • This template is only for bug reports. For questions, please visit Discussions.
  • I have thoroughly reviewed the project documentation (installation, training, inference) but couldn't find information to solve my problem. English 中文 日本語 Portuguese (Brazil)
  • I have searched for existing issues, including closed ones. Search issues
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template and fill in all required fields.

Cloud or Self Hosted

Cloud

Environment Details

linux python=3.10 cuda=12.2 torch=2.5.1+cu121

Steps to Reproduce

run python tools/servers and then it gives the following error:
/data/workspace/fish-speech/tools/vqgan/inference.py:26: 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.
state_dict = torch.load(
Traceback (most recent call last):
File "/data/workspace/fish-speech/tools/server.py", line 356, in
decoder_model = load_decoder_model(
File "/data/workspace/fish-speech/tools/vqgan/inference.py", line 26, in load_model
state_dict = torch.load(
File "/root/miniconda3/envs/py310/lib/python3.10/site-packages/torch/serialization.py", line 1384, in load
return _legacy_load(
File "/root/miniconda3/envs/py310/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'.

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

@weizhenhuan weizhenhuan added the bug Something isn't working label Dec 16, 2024
@Stardust-minus
Copy link
Member

Try to check the vqgan ckpt if it was damaged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants