TheLastBen commited on
Commit
3ef01f4
1 Parent(s): 7aeb09c

Update mainpaperspacev2.py

Browse files
Files changed (1) hide show
  1. mainpaperspacev2.py +3 -3
mainpaperspacev2.py CHANGED
@@ -140,19 +140,19 @@ def downloadmodel_lnkv2(CKPT_Link, Custom_Model_Version):
140
  call('python convertodiffv2.py model.ckpt stable-diffusion-custom --v2 --reference_model stabilityai/stable-diffusion-2-1-base', shell=True)
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 convertodiff.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('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('model.ckpt') < 1810671599:
156
  print('Wrong link, check that the link is valid')
157
  os.chdir('/notebooks')
158
  time.sleep(5)
 
140
  call('python convertodiffv2.py model.ckpt stable-diffusion-custom --v2 --reference_model stabilityai/stable-diffusion-2-1-base', shell=True)
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')
158
  time.sleep(5)