Fooocus / backend /headless /fcbh /checkpoint_pickle.py
dmndkut's picture
Upload folder using huggingface_hub
2a9e003
raw
history blame contribute delete
286 Bytes
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)