Download comfy/checkpoint_pickle.py from fotographerai/Zen-Style-Shape: direct link, hf CLI and curl.
- Browser
- Download file 286 Bytes
-
https://huggingface.co/spaces/fotographerai/Zen-Style-Shape/resolve/a8e42f9c629cb3adc0232d23fc09d1e375af4f5b/comfy/checkpoint_pickle.py
- Command line
-
hf download hf://spaces/fotographerai/Zen-Style-Shape@a8e42f9c629cb3adc0232d23fc09d1e375af4f5b/comfy/checkpoint_pickle.py
-
curl -L -o checkpoint_pickle.py https://huggingface.co/spaces/fotographerai/Zen-Style-Shape/resolve/a8e42f9c629cb3adc0232d23fc09d1e375af4f5b/comfy/checkpoint_pickle.py
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) | |