multimodalart HF Staff commited on
Commit
b740793
·
verified ·
1 Parent(s): aca8023

[Admin maintenance] Support new ZeroGPU hardware

Browse files

Thank you so much for having shared this Space with the community on this demo. We have upgraded the ZeroGPU infra-structure to run on modern blackwell architecture.
For that, we need to upgrade your demo to support that. This PR fixes your demo to work with the new architecture. As this is something we broke on our end, we may merge this PR autonomously. If this breaks unexpectedly or brings unintended consequences, feel free to revert, modify or otherwise. Any issues you can email apolinario@huggingface.co

Files changed (3) hide show
  1. README.md +1 -1
  2. demo.py +7 -1
  3. requirements.txt +0 -1
README.md CHANGED
@@ -2,7 +2,7 @@
2
  title: Cinemo
3
  app_file: demo.py
4
  sdk: gradio
5
- sdk_version: 4.37.2
6
  tags:
7
  - Image-2-Video
8
  - LLM
 
2
  title: Cinemo
3
  app_file: demo.py
4
  sdk: gradio
5
+ sdk_version: 5.49.1
6
  tags:
7
  - Image-2-Video
8
  - LLM
demo.py CHANGED
@@ -12,11 +12,17 @@ if not hasattr(huggingface_hub, "HfFolder"):
12
  try: huggingface_hub.logout()
13
  except Exception: pass
14
  huggingface_hub.HfFolder = HfFolder
 
 
 
 
 
 
 
15
  import gradio as gr
16
  import os
17
  import torch
18
  import argparse
19
- import spaces
20
  import torchvision
21
 
22
 
 
12
  try: huggingface_hub.logout()
13
  except Exception: pass
14
  huggingface_hub.HfFolder = HfFolder
15
+ if not hasattr(huggingface_hub, "cached_download"):
16
+ huggingface_hub.cached_download = huggingface_hub.hf_hub_download
17
+ if not hasattr(huggingface_hub, "is_offline_mode"):
18
+ huggingface_hub.is_offline_mode = lambda: huggingface_hub.constants.HF_HUB_OFFLINE
19
+ # `spaces` must be imported before any torch/CUDA-touching import (avoids
20
+ # "CUDA has been initialized before importing spaces").
21
+ import spaces
22
  import gradio as gr
23
  import os
24
  import torch
25
  import argparse
 
26
  import torchvision
27
 
28
 
requirements.txt CHANGED
@@ -7,7 +7,6 @@ accelerate
7
  tensorboard
8
  einops
9
  transformers<5
10
- huggingface-hub==0.25.0
11
  av
12
  scikit-image
13
  decord
 
7
  tensorboard
8
  einops
9
  transformers<5
 
10
  av
11
  scikit-image
12
  decord