multimodalart HF Staff commited on
Commit
49d3f6d
·
verified ·
1 Parent(s): 1f1ea8c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -1,6 +1,16 @@
1
  import gradio as gr
2
  import spaces
3
  import torch
 
 
 
 
 
 
 
 
 
 
4
  from diffusers import StableDiffusionPipeline, DDIMScheduler
5
  from utils import video_to_frames, add_dict_to_yaml_file, save_video, seed_everything
6
  # from diffusers.utils import export_to_video
 
1
  import gradio as gr
2
  import spaces
3
  import torch
4
+
5
+ # --- MONKEY PATCH START ---
6
+ import huggingface_hub
7
+ import sys
8
+
9
+ if not hasattr(huggingface_hub, 'cached_download'):
10
+ huggingface_hub.cached_download = huggingface_hub.hf_hub_download
11
+ print("Monkey-patching `huggingface_hub.cached_download`.", file=sys.stderr)
12
+ # --- MONKEY PATCH END ---
13
+
14
  from diffusers import StableDiffusionPipeline, DDIMScheduler
15
  from utils import video_to_frames, add_dict_to_yaml_file, save_video, seed_everything
16
  # from diffusers.utils import export_to_video