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

[Feature Deprecation] UserWarning: TypedStorage is deprecated. It will be removed in the future. #45

Open
mariaWitch opened this issue Apr 7, 2023 · 1 comment
Labels
feature New feature or request

Comments

@mariaWitch
Copy link
Contributor

Currently running the script gives the following warning when merging on PyTorch 2.0.0. This should probably be dealt with eventually, even if it isn't a priority item. Although this would break compatibility with PyTorch < 2.0.0, so some kind of shim layer to switch between TypedStorage and UntypedStorage depending on the PyTorch version might be for the best. Warning to follow:

/home/maria/stable-diffusion-webui/venvLinux/lib/python3.10/site-packages/safetensors/torch.py:99: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly.  To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage()
  with safe_open(filename, framework="pt", device=device) as f:
/home/maria/stable-diffusion-webui/venvLinux/lib/python3.10/site-packages/torch/_utils.py:776: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly.  To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage()
  return self.fget.__get__(instance, owner)()
/home/maria/stable-diffusion-webui/venvLinux/lib/python3.10/site-packages/torch/storage.py:899: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly.  To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage()
  storage = cls(wrap_storage=untyped_storage)
@s1dlx s1dlx added the feature New feature or request label Apr 8, 2023
@s1dlx
Copy link
Owner

s1dlx commented Apr 8, 2023

ok, good to know
I haven't played with pytorch 2.0 yet, I imagine more deprecation warnings will arise

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

No branches or pull requests

2 participants