my-sd/ldm_patched/modules/checkpoint_pickle.py
lllyasviel 3d039591fe Expand head info in files
Previously before this commit, credits are already in entry and licenses are already in root. This commit will make info clearer.
2024-02-11 19:55:18 -08:00

18 lines
418 B
Python

# Taken from https://github.com/comfyanonymous/ComfyUI
# This file is only for reference, and not used in the backend or runtime.
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)