Spaces:
Running on Zero
Running on Zero
Download flashrefocus/_compat.py from ming0531/FlashReFocus: direct link, hf CLI and curl.
- Browser
- Download file 424 Bytes
-
https://huggingface.co/spaces/ming0531/FlashReFocus/resolve/main/flashrefocus/_compat.py
- Command line
-
hf download hf://spaces/ming0531/FlashReFocus/flashrefocus/_compat.py
-
curl -L -o _compat.py https://huggingface.co/spaces/ming0531/FlashReFocus/resolve/main/flashrefocus/_compat.py
424 Bytes
| """Compatibility with newer libraries than the ones the code was written for.""" | |
| import huggingface_hub | |
| def patch_huggingface_hub(): | |
| """diffusers 0.25 (required by PiSA-SR's model code) imports huggingface_hub.cached_download, removed in hub 0.26. | |
| Call before importing diffusers.""" | |
| if not hasattr(huggingface_hub, "cached_download"): | |
| huggingface_hub.cached_download = huggingface_hub.hf_hub_download | |