stlaurentjr commited on
Commit
3892aeb
1 Parent(s): 43cd4ab

Update scripts/mainrunpodA1111.py

Browse files
Files changed (1) hide show
  1. scripts/mainrunpodA1111.py +3 -1
scripts/mainrunpodA1111.py CHANGED
@@ -331,6 +331,8 @@ def CNet(ControlNet_Model, ControlNet_XL_Model):
331
  os.chdir('/workspace')
332
 
333
  mdldir="/workspace/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/models"
 
 
334
  for filename in os.listdir(mdldir):
335
  if "_sd14v1" in filename:
336
  renamed = re.sub("_sd14v1", "-fp16", filename)
@@ -419,7 +421,7 @@ def sd(User, Password, model):
419
 
420
  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)
421
 
422
- #call("sed -i 's/\"CLIP_stop_at_last_layers\": 1/\"CLIP_stop_at_last_layers\": 2/g' /workspace/sd/stable-diffusion-webui/config.json", shell=True)
423
 
424
  call("sed -i 's@print(\"No module.*@@' /workspace/sd/stablediffusion/ldm/modules/diffusionmodules/model.py", shell=True)
425
 
 
331
  os.chdir('/workspace')
332
 
333
  mdldir="/workspace/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/models"
334
+ call('ln -s /workspace/auto-controlnet-models/* /workspace/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/models', shell=True)
335
+
336
  for filename in os.listdir(mdldir):
337
  if "_sd14v1" in filename:
338
  renamed = re.sub("_sd14v1", "-fp16", filename)
 
421
 
422
  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)
423
 
424
+ call("sed -i 's/\"CLIP_stop_at_last_layers\": 1/\"CLIP_stop_at_last_layers\": 2/g' /workspace/sd/stable-diffusion-webui/config.json", shell=True)
425
 
426
  call("sed -i 's@print(\"No module.*@@' /workspace/sd/stablediffusion/ldm/modules/diffusionmodules/model.py", shell=True)
427