ming0531's picture
FlashReFocus video spotlight demo (SAM 3 + Depth Anything V2 + FlashReFocus renderer)
bd5ba20 verified
Raw History Blame Contribute Delete
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