TheLastBen commited on
Commit
bbd3864
1 Parent(s): bcb6f0f

Upload 4 files

Browse files
Scripts/mainpaperspaceA1111.py CHANGED
@@ -46,6 +46,7 @@ def Deps(force_reinstall):
46
  os.chdir('/notebooks')
47
  call("git clone --depth 1 -q --branch main https://github.com/TheLastBen/diffusers /diffusers", shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
48
  call('pip install --root-user-action=ignore --disable-pip-version-check -qq tomesd gradio==3.32 open-clip-torch==2.20.0', shell=True, stdout=open('/dev/null', 'w'))
 
49
  if not os.path.exists('/notebooks/diffusers'):
50
  call('ln -s /diffusers /notebooks', shell=True)
51
  call("rm -r /deps", shell=True)
@@ -287,6 +288,7 @@ def sdui(User, Password, model):
287
  call("sed -i 's@src\/generative-models@generative-models@g' /notebooks/sd/stable-diffusion-webui/modules/paths.py", shell=True)
288
 
289
  call("sed -i 's@-> Network | None@@g' /notebooks/sd/stable-diffusion-webui/extensions-builtin/Lora/network.py", shell=True)
 
290
 
291
  call("sed -i 's@\"quicksettings\": OptionInfo(.*@\"quicksettings\": OptionInfo(\"sd_model_checkpoint, sd_vae, CLIP_stop_at_last_layers, inpainting_mask_weight, initial_noise_multiplier\", \"Quicksettings list\"),@' /notebooks/sd/stable-diffusion-webui/modules/shared.py", shell=True)
292
  os.chdir('/notebooks/sd/stable-diffusion-webui')
 
46
  os.chdir('/notebooks')
47
  call("git clone --depth 1 -q --branch main https://github.com/TheLastBen/diffusers /diffusers", shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
48
  call('pip install --root-user-action=ignore --disable-pip-version-check -qq tomesd gradio==3.32 open-clip-torch==2.20.0', shell=True, stdout=open('/dev/null', 'w'))
49
+ os.environ['TORCH_HOME'] = '/notebooks/cache/torch'
50
  if not os.path.exists('/notebooks/diffusers'):
51
  call('ln -s /diffusers /notebooks', shell=True)
52
  call("rm -r /deps", shell=True)
 
288
  call("sed -i 's@src\/generative-models@generative-models@g' /notebooks/sd/stable-diffusion-webui/modules/paths.py", shell=True)
289
 
290
  call("sed -i 's@-> Network | None@@g' /notebooks/sd/stable-diffusion-webui/extensions-builtin/Lora/network.py", shell=True)
291
+ call("sed -i 's@from scipy.ndimage.filters@from scipy.ndimage@g' /usr/local/lib/python3.9/dist-packages/basicsr/metrics/niqe.py", shell=True)
292
 
293
  call("sed -i 's@\"quicksettings\": OptionInfo(.*@\"quicksettings\": OptionInfo(\"sd_model_checkpoint, sd_vae, CLIP_stop_at_last_layers, inpainting_mask_weight, initial_noise_multiplier\", \"Quicksettings list\"),@' /notebooks/sd/stable-diffusion-webui/modules/shared.py", shell=True)
294
  os.chdir('/notebooks/sd/stable-diffusion-webui')
Scripts/mainpaperspacev1.py CHANGED
@@ -58,6 +58,7 @@ def Deps(force_reinstall):
58
  os.chdir('/notebooks')
59
  call("git clone --depth 1 -q --branch main https://github.com/TheLastBen/diffusers /diffusers", shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
60
  call('pip install --root-user-action=ignore --disable-pip-version-check -qq tomesd gradio==3.32 open-clip-torch==2.20.0', shell=True, stdout=open('/dev/null', 'w'))
 
61
  if not os.path.exists('/notebooks/diffusers'):
62
  call('ln -s /diffusers /notebooks', shell=True)
63
  call("rm -r /deps", shell=True)
@@ -815,6 +816,7 @@ def testui(Custom_Path, Previous_Session_Name, Session_Name, User, Password):
815
  call("sed -i 's@src\/generative-models@generative-models@g' /notebooks/sd/stable-diffusion-webui/modules/paths.py", shell=True)
816
 
817
  call("sed -i 's@-> Network | None@@g' /notebooks/sd/stable-diffusion-webui/extensions-builtin/Lora/network.py", shell=True)
 
818
 
819
  call("sed -i 's@\"quicksettings\": OptionInfo(.*@\"quicksettings\": OptionInfo(\"sd_model_checkpoint, sd_vae, CLIP_stop_at_last_layers, inpainting_mask_weight, initial_noise_multiplier\", \"Quicksettings list\"),@' /notebooks/sd/stable-diffusion-webui/modules/shared.py", shell=True)
820
  os.chdir('/notebooks/sd/stable-diffusion-webui')
 
58
  os.chdir('/notebooks')
59
  call("git clone --depth 1 -q --branch main https://github.com/TheLastBen/diffusers /diffusers", shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
60
  call('pip install --root-user-action=ignore --disable-pip-version-check -qq tomesd gradio==3.32 open-clip-torch==2.20.0', shell=True, stdout=open('/dev/null', 'w'))
61
+ os.environ['TORCH_HOME'] = '/notebooks/cache/torch'
62
  if not os.path.exists('/notebooks/diffusers'):
63
  call('ln -s /diffusers /notebooks', shell=True)
64
  call("rm -r /deps", shell=True)
 
816
  call("sed -i 's@src\/generative-models@generative-models@g' /notebooks/sd/stable-diffusion-webui/modules/paths.py", shell=True)
817
 
818
  call("sed -i 's@-> Network | None@@g' /notebooks/sd/stable-diffusion-webui/extensions-builtin/Lora/network.py", shell=True)
819
+ call("sed -i 's@from scipy.ndimage.filters@from scipy.ndimage@g' /usr/local/lib/python3.9/dist-packages/basicsr/metrics/niqe.py", shell=True)
820
 
821
  call("sed -i 's@\"quicksettings\": OptionInfo(.*@\"quicksettings\": OptionInfo(\"sd_model_checkpoint, sd_vae, CLIP_stop_at_last_layers, inpainting_mask_weight, initial_noise_multiplier\", \"Quicksettings list\"),@' /notebooks/sd/stable-diffusion-webui/modules/shared.py", shell=True)
822
  os.chdir('/notebooks/sd/stable-diffusion-webui')
Scripts/mainpaperspacev2.py CHANGED
@@ -59,6 +59,7 @@ def Deps(force_reinstall):
59
  os.chdir('/notebooks')
60
  call("git clone --depth 1 -q --branch main https://github.com/TheLastBen/diffusers /diffusers", shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
61
  call('pip install --root-user-action=ignore --disable-pip-version-check -qq tomesd gradio==3.32 open-clip-torch==2.20.0', shell=True, stdout=open('/dev/null', 'w'))
 
62
  if not os.path.exists('/notebooks/diffusers'):
63
  call('ln -s /diffusers /notebooks', shell=True)
64
  call("rm -r /deps", shell=True)
@@ -863,6 +864,7 @@ def testui(Custom_Path, Previous_Session_Name, Session_Name, User, Password):
863
  call("sed -i 's@src\/generative-models@generative-models@g' /notebooks/sd/stable-diffusion-webui/modules/paths.py", shell=True)
864
 
865
  call("sed -i 's@-> Network | None@@g' /notebooks/sd/stable-diffusion-webui/extensions-builtin/Lora/network.py", shell=True)
 
866
 
867
  call("sed -i 's@\"quicksettings\": OptionInfo(.*@\"quicksettings\": OptionInfo(\"sd_model_checkpoint, sd_vae, CLIP_stop_at_last_layers, inpainting_mask_weight, initial_noise_multiplier\", \"Quicksettings list\"),@' /notebooks/sd/stable-diffusion-webui/modules/shared.py", shell=True)
868
  os.chdir('/notebooks/sd/stable-diffusion-webui')
 
59
  os.chdir('/notebooks')
60
  call("git clone --depth 1 -q --branch main https://github.com/TheLastBen/diffusers /diffusers", shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
61
  call('pip install --root-user-action=ignore --disable-pip-version-check -qq tomesd gradio==3.32 open-clip-torch==2.20.0', shell=True, stdout=open('/dev/null', 'w'))
62
+ os.environ['TORCH_HOME'] = '/notebooks/cache/torch'
63
  if not os.path.exists('/notebooks/diffusers'):
64
  call('ln -s /diffusers /notebooks', shell=True)
65
  call("rm -r /deps", shell=True)
 
864
  call("sed -i 's@src\/generative-models@generative-models@g' /notebooks/sd/stable-diffusion-webui/modules/paths.py", shell=True)
865
 
866
  call("sed -i 's@-> Network | None@@g' /notebooks/sd/stable-diffusion-webui/extensions-builtin/Lora/network.py", shell=True)
867
+ call("sed -i 's@from scipy.ndimage.filters@from scipy.ndimage@g' /usr/local/lib/python3.9/dist-packages/basicsr/metrics/niqe.py", shell=True)
868
 
869
  call("sed -i 's@\"quicksettings\": OptionInfo(.*@\"quicksettings\": OptionInfo(\"sd_model_checkpoint, sd_vae, CLIP_stop_at_last_layers, inpainting_mask_weight, initial_noise_multiplier\", \"Quicksettings list\"),@' /notebooks/sd/stable-diffusion-webui/modules/shared.py", shell=True)
870
  os.chdir('/notebooks/sd/stable-diffusion-webui')
Scripts/sdxllorapps.py CHANGED
@@ -64,6 +64,7 @@ def Deps(force_reinstall):
64
  call('pip install --root-user-action=ignore --disable-pip-version-check -qq diffusers -U', shell=True, stdout=open('/dev/null', 'w'))
65
  call("git clone --depth 1 -q --branch main https://github.com/TheLastBen/diffusers /diffusers", shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
66
  call('pip install --root-user-action=ignore --disable-pip-version-check -qq tomesd gradio==3.32 open-clip-torch==2.20.0', shell=True, stdout=open('/dev/null', 'w'))
 
67
  if not os.path.exists('/notebooks/diffusers'):
68
  call('ln -s /diffusers /notebooks', shell=True)
69
  call("rm -r /deps", shell=True)
 
64
  call('pip install --root-user-action=ignore --disable-pip-version-check -qq diffusers -U', shell=True, stdout=open('/dev/null', 'w'))
65
  call("git clone --depth 1 -q --branch main https://github.com/TheLastBen/diffusers /diffusers", shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
66
  call('pip install --root-user-action=ignore --disable-pip-version-check -qq tomesd gradio==3.32 open-clip-torch==2.20.0', shell=True, stdout=open('/dev/null', 'w'))
67
+ os.environ['TORCH_HOME'] = '/notebooks/cache/torch'
68
  if not os.path.exists('/notebooks/diffusers'):
69
  call('ln -s /diffusers /notebooks', shell=True)
70
  call("rm -r /deps", shell=True)