TheLastBen commited on
Commit
78328c4
1 Parent(s): 050f4ad

Update Scripts/mainpaperspaceA1111.py

Browse files
Files changed (1) hide show
  1. Scripts/mainpaperspaceA1111.py +7 -1
Scripts/mainpaperspaceA1111.py CHANGED
@@ -1,6 +1,6 @@
1
  import os
2
  from IPython.display import clear_output
3
- from subprocess import call, getoutput
4
  import time
5
  import sys
6
  import fileinput
@@ -170,6 +170,12 @@ def CN(ControlNet_Model, ControlNet_v2_Model):
170
  with open("CN_models_v2.txt", 'r') as d:
171
  mdllnk_v2 = d.read().splitlines()
172
  call('rm CN_models.txt CN_models_v2.txt', shell=True)
 
 
 
 
 
 
173
 
174
  if ControlNet_Model == "All" or ControlNet_Model == "all" :
175
  for lnk in mdllnk:
 
1
  import os
2
  from IPython.display import clear_output
3
+ from subprocess import call, getoutput, run
4
  import time
5
  import sys
6
  import fileinput
 
170
  with open("CN_models_v2.txt", 'r') as d:
171
  mdllnk_v2 = d.read().splitlines()
172
  call('rm CN_models.txt CN_models_v2.txt', shell=True)
173
+
174
+ cfgnames=[os.path.basename(url).split('.')[0]+'.yaml' for url in mdllnk_v2]
175
+ os.chdir('/notebooks/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/models')
176
+ for name in cfgnames:
177
+ run(['cp', 'cldm_v21.yaml', name])
178
+ os.chdir('/notebooks')
179
 
180
  if ControlNet_Model == "All" or ControlNet_Model == "all" :
181
  for lnk in mdllnk: