man08man commited on
Commit
c861875
Β·
verified Β·
1 Parent(s): 8f541bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -1,3 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  from diffusers import StableDiffusionPipeline
2
  import torch
3
  import random
 
1
+ # Add these imports FIRST
2
+ import sys
3
+ import warnings
4
+ warnings.filterwarnings("ignore", message=".*cached_download.*")
5
+
6
+ # Workaround for huggingface_hub compatibility
7
+ from huggingface_hub import cached_download as hf_hub_download
8
+ sys.modules['huggingface_hub'].cached_download = hf_hub_download
9
+
10
+ # Now import other libraries
11
+ from diffusers import StableDiffusionPipeline
12
+ import torch
13
+ import random
14
  from diffusers import StableDiffusionPipeline
15
  import torch
16
  import random