提交 5ab7f213 编写于 作者: A AUTOMATIC

fix an error that prevents running webui on torch<2.0 without --disable-safe-unpickle

上级 72cd27a1
## 1.1.1
### Bug Fixes:
* fix an error that prevents running webui on torch<2.0 without --disable-safe-unpickle
## 1.1.0
### Features:
* switch to torch 2.0.0 (except for AMD GPUs)
......
......@@ -24,7 +24,11 @@ class RestrictedUnpickler(pickle.Unpickler):
def persistent_load(self, saved_id):
assert saved_id[0] == 'storage'
return TypedStorage(_internal=True)
try:
return TypedStorage(_internal=True)
except TypeError:
return TypedStorage() # PyTorch before 2.0 does not have the _internal argument
def find_class(self, module, name):
if self.extra_handler is not None:
......
  • 这个版本图库浏览器里,图生图的生成信息和文件名都没有啦,不显示了image

Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册