Remove unsafe pickle loading code that was used on pytorch older than 2.4 (#12473)

ComfyUI hasn't started on pytorch 2.4 since last month.
This commit is contained in:
comfyanonymous
2026-02-14 19:53:52 -08:00
committed by GitHub
parent df1e5e8514
commit e1ede29d82
2 changed files with 11 additions and 27 deletions

View File

@@ -1,13 +0,0 @@
import pickle
load = pickle.load
class Empty:
pass
class Unpickler(pickle.Unpickler):
def find_class(self, module, name):
#TODO: safe unpickle
if module.startswith("pytorch_lightning"):
return Empty
return super().find_class(module, name)