stlaurentjr commited on
Commit
07f8044
1 Parent(s): 03210d3

Update scripts/mainrunpodA1111.py

Browse files
Files changed (1) hide show
  1. scripts/mainrunpodA1111.py +9 -0
scripts/mainrunpodA1111.py CHANGED
@@ -148,6 +148,12 @@ def mdl(Original_Model_Version, Path_to_MODEL, MODEL_LINK):
148
 
149
  src=getsrc(MODEL_LINK)
150
 
 
 
 
 
 
 
151
  if not os.path.exists('/workspace/sd/stable-diffusion-webui/models/Stable-diffusion/SDv1-5.ckpt'):
152
  call('ln -s /workspace/auto-models/* /workspace/sd/stable-diffusion-webui/models/Stable-diffusion', shell=True)
153
 
@@ -413,6 +419,9 @@ def sd(User, Password, model):
413
  call("sed -i 's@\[\"sd_model_checkpoint\"\]@\[\"sd_model_checkpoint\", \"sd_vae\", \"CLIP_stop_at_last_layers\", \"inpainting_mask_weight\", \"initial_noise_multiplier\"\]@g' /workspace/sd/stable-diffusion-webui/modules/shared.py", shell=True)
414
 
415
  call("sed -i 's@print(\"No module.*@@' /workspace/sd/stablediffusion/ldm/modules/diffusionmodules/model.py", shell=True)
 
 
 
416
  os.chdir('/workspace/sd/stable-diffusion-webui')
417
  clear_output()
418
 
 
148
 
149
  src=getsrc(MODEL_LINK)
150
 
151
+ if os.path.exists('/workspace/sd/stable-diffusion-webui/models/VAE'):
152
+ call('ln -s /workspace/auto-VAE/* /workspace/sd/stable-diffusion-webui/models/VAE', shell=True)
153
+ else:
154
+ call('mkdir -p /workspace/sd/stable-diffusion-webui/models/VAE', shell=True)
155
+ call('ln -s /workspace/auto-VAE/* /workspace/sd/stable-diffusion-webui/models/VAE', shell=True)
156
+
157
  if not os.path.exists('/workspace/sd/stable-diffusion-webui/models/Stable-diffusion/SDv1-5.ckpt'):
158
  call('ln -s /workspace/auto-models/* /workspace/sd/stable-diffusion-webui/models/Stable-diffusion', shell=True)
159
 
 
419
  call("sed -i 's@\[\"sd_model_checkpoint\"\]@\[\"sd_model_checkpoint\", \"sd_vae\", \"CLIP_stop_at_last_layers\", \"inpainting_mask_weight\", \"initial_noise_multiplier\"\]@g' /workspace/sd/stable-diffusion-webui/modules/shared.py", shell=True)
420
 
421
  call("sed -i 's@print(\"No module.*@@' /workspace/sd/stablediffusion/ldm/modules/diffusionmodules/model.py", shell=True)
422
+
423
+ call('wget -O /workspace/sd/stable-diffusion-webui/config.json https://huggingface.co/spaces/stlaurentjr/RNPD/raw/main/config/config.json', shell=True)
424
+
425
  os.chdir('/workspace/sd/stable-diffusion-webui')
426
  clear_output()
427