TheLastBen commited on
Commit
8fda08a
1 Parent(s): 7a44af7

Update mainpaperspacev2.py

Browse files
Files changed (1) hide show
  1. mainpaperspacev2.py +7 -7
mainpaperspacev2.py CHANGED
@@ -141,17 +141,17 @@ def downloadmodel_lnkv2(CKPT_Link, Custom_Model_Version):
141
  elif Custom_Model_Version=='768':
142
  call('python convertodiffv2.py model.ckpt stable-diffusion-custom --v2 --reference_model stabilityai/stable-diffusion-2-1', shell=True)
143
  call('rm convertodiffv2.py', shell=True)
144
- call('rm model.ckpt', shell=True)
145
  if os.path.exists('stable-diffusion-custom/unet/diffusion_pytorch_model.bin'):
 
146
  os.chdir('/notebooks')
147
  clear_output()
148
  done()
149
-
150
- while not os.path.exists('/models/stable-diffusion-custom/unet/diffusion_pytorch_model.bin'):
151
- print('Conversion error')
152
- os.chdir('/notebooks')
153
- time.sleep(5)
154
-
155
  while os.path.getsize('/models/model.ckpt') < 1810671599:
156
  print('Wrong link, check that the link is valid')
157
  os.chdir('/notebooks')
 
141
  elif Custom_Model_Version=='768':
142
  call('python convertodiffv2.py model.ckpt stable-diffusion-custom --v2 --reference_model stabilityai/stable-diffusion-2-1', shell=True)
143
  call('rm convertodiffv2.py', shell=True)
 
144
  if os.path.exists('stable-diffusion-custom/unet/diffusion_pytorch_model.bin'):
145
+ call('rm model.ckpt', shell=True)
146
  os.chdir('/notebooks')
147
  clear_output()
148
  done()
149
+ else:
150
+ while not os.path.exists('/models/stable-diffusion-custom/unet/diffusion_pytorch_model.bin'):
151
+ print('Conversion error')
152
+ os.chdir('/notebooks')
153
+ time.sleep(5)
154
+ else:
155
  while os.path.getsize('/models/model.ckpt') < 1810671599:
156
  print('Wrong link, check that the link is valid')
157
  os.chdir('/notebooks')