R1ckShi commited on
Commit
8bab248
1 Parent(s): 41b44b0

bug fix for huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -15,9 +15,10 @@ import os
15
  import importlib
16
  import sys
17
 
18
- dynamic_modules_file = '/usr/local/lib/python3.10/site-packages/diffusers/utils/dynamic_modules_utils.py'
 
19
 
20
- def modify_dynamic_modules_file():
21
  if os.path.exists(dynamic_modules_file):
22
  with open(dynamic_modules_file, 'r') as file:
23
  lines = file.readlines()
@@ -28,6 +29,9 @@ def modify_dynamic_modules_file():
28
  else:
29
  file.write(line)
30
 
 
 
 
31
  import os
32
  import sys
33
  import argparse
 
15
  import importlib
16
  import sys
17
 
18
+ dynamic_modules_file1 = '/home/user/.pyenv/versions/3.10.16/lib/python3.10/site-packages/diffusers/utils/dynamic_modules_utils.py'
19
+ dynamic_modules_file2 = '/usr/local/lib/python3.10/site-packages/diffusers/utils/dynamic_modules_utils.py'
20
 
21
+ def modify_dynamic_modules_file(dynamic_modules_file):
22
  if os.path.exists(dynamic_modules_file):
23
  with open(dynamic_modules_file, 'r') as file:
24
  lines = file.readlines()
 
29
  else:
30
  file.write(line)
31
 
32
+ modify_dynamic_modules_file(dynamic_modules_file1)
33
+ modify_dynamic_modules_file(dynamic_modules_file2)
34
+
35
  import os
36
  import sys
37
  import argparse