Carlos2312 commited on
Commit
e70c2a5
·
verified ·
1 Parent(s): 22d1d36

Update modelos.py

Browse files
Files changed (1) hide show
  1. modelos.py +13 -2
modelos.py CHANGED
@@ -103,10 +103,21 @@ def d_b_click(b):
103
 
104
  with garis3:
105
  display(HTML(gariz3))
106
-
 
 
 
 
 
 
 
 
 
 
 
107
  with dbo:
108
  say("【{red} Downloading{cyan} Models{magenta} Models{yellow} 】{red}")
109
- os.chdir("/home/studio-lab-user/forge/models/Stable-diffusion/tmp_models")
110
 
111
  for url in surl:
112
  download(url)
 
103
 
104
  with garis3:
105
  display(HTML(gariz3))
106
+
107
+ # Define the two directory paths
108
+ dir_path_1 = "/home/studio-lab-user/forge/models/Stable-diffusion/tmp_models"
109
+ dir_path_2 = "/home/studio-lab-user/asd/models/Stable-diffusion/tmp_models"
110
+
111
+ # Check if the directory exists at the first location
112
+ if os.path.exists(dir_path_1):
113
+ directory_path = dir_path_1
114
+ else:
115
+ directory_path = dir_path_2
116
+
117
+ # Change the current directory to the selected directory
118
  with dbo:
119
  say("【{red} Downloading{cyan} Models{magenta} Models{yellow} 】{red}")
120
+ os.chdir(directory_path)
121
 
122
  for url in surl:
123
  download(url)