TheLastBen commited on
Commit
f485796
1 Parent(s): a1ac558

Upload 3 files

Browse files
Scripts/mainpaperspaceA1111.py CHANGED
@@ -105,14 +105,13 @@ def repo():
105
 
106
  os.chdir('/notebooks/sd')
107
  if not os.path.exists('stable-diffusion-webui'):
108
- call('git clone -q --branch master https://github.com/AUTOMATIC1111/stable-diffusion-webui', shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
109
 
110
  os.chdir('/notebooks/sd/stable-diffusion-webui/')
111
  call('git reset --hard', shell=True, stdout=open('/dev/null', 'w'))
112
  print('')
113
- call('!git fetch --unshallow', shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
114
- call('git checkout 15adff3d6d5e8ba186b3df6eee8a8d774c8f3879', shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
115
- #call('git pull', shell=True, stdout=open('/dev/null', 'w'))
116
  os.chdir('/notebooks')
117
  clear_output()
118
  done()
@@ -287,6 +286,8 @@ def sdui(User, Password, model):
287
  call("sed -i 's@\.\.\/@src/@g' /notebooks/sd/stable-diffusion-webui/modules/paths.py", 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@\"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)
291
  os.chdir('/notebooks/sd/stable-diffusion-webui')
292
  clear_output()
@@ -301,7 +302,7 @@ def sdui(User, Password, model):
301
  mdlpth="--ckpt-dir "+model
302
 
303
 
304
- configf="--disable-console-progressbars --no-gradio-queue --no-half-vae --disable-safe-unpickle --api --no-download-sd-model --xformers --enable-insecure-extension-access --port 6006 --listen --skip-version-check "+auth+" "+mdlpth
305
 
306
  return configf
307
 
 
105
 
106
  os.chdir('/notebooks/sd')
107
  if not os.path.exists('stable-diffusion-webui'):
108
+ call('git clone -q --depth 1 --branch master https://github.com/AUTOMATIC1111/stable-diffusion-webui', shell=True)
109
 
110
  os.chdir('/notebooks/sd/stable-diffusion-webui/')
111
  call('git reset --hard', shell=True, stdout=open('/dev/null', 'w'))
112
  print('')
113
+ call('git checkout master', shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
114
+ call('git pull', shell=True, stdout=open('/dev/null', 'w'))
 
115
  os.chdir('/notebooks')
116
  clear_output()
117
  done()
 
286
  call("sed -i 's@\.\.\/@src/@g' /notebooks/sd/stable-diffusion-webui/modules/paths.py", shell=True)
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')
293
  clear_output()
 
302
  mdlpth="--ckpt-dir "+model
303
 
304
 
305
+ configf="--disable-console-progressbars --no-gradio-queue --upcast-sampling --no-half-vae --disable-safe-unpickle --api --no-download-sd-model --xformers --enable-insecure-extension-access --port 6006 --listen --skip-version-check "+auth+" "+mdlpth
306
 
307
  return configf
308
 
Scripts/mainpaperspacev1.py CHANGED
@@ -779,14 +779,13 @@ def testui(Custom_Path, Previous_Session_Name, Session_Name, User, Password):
779
 
780
  os.chdir('/notebooks/sd')
781
  if not os.path.exists('stable-diffusion-webui'):
782
- call('git clone -q --branch master https://github.com/AUTOMATIC1111/stable-diffusion-webui', shell=True)
783
 
784
  os.chdir('/notebooks/sd/stable-diffusion-webui/')
785
  call('git reset --hard', shell=True, stdout=open('/dev/null', 'w'))
786
  print('')
787
- call('!git fetch --unshallow', shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
788
- call('git checkout 15adff3d6d5e8ba186b3df6eee8a8d774c8f3879', shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
789
- #call('git pull', shell=True, stdout=open('/dev/null', 'w'))
790
  os.chdir('/notebooks')
791
  clear_output()
792
 
@@ -815,11 +814,13 @@ def testui(Custom_Path, Previous_Session_Name, Session_Name, User, Password):
815
  call("sed -i 's@\.\.\/@src/@g' /notebooks/sd/stable-diffusion-webui/modules/paths.py", 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@\"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)
819
  os.chdir('/notebooks/sd/stable-diffusion-webui')
820
  clear_output()
821
 
822
- configf="--disable-console-progressbars --no-gradio-queue --no-half-vae --disable-safe-unpickle --api --no-download-sd-model --xformers --enable-insecure-extension-access --port 6006 --listen --skip-version-check --ckpt "+path_to_trained_model+" "+auth
823
 
824
  return configf
825
 
 
779
 
780
  os.chdir('/notebooks/sd')
781
  if not os.path.exists('stable-diffusion-webui'):
782
+ call('git clone -q --depth 1 --branch master https://github.com/AUTOMATIC1111/stable-diffusion-webui', shell=True)
783
 
784
  os.chdir('/notebooks/sd/stable-diffusion-webui/')
785
  call('git reset --hard', shell=True, stdout=open('/dev/null', 'w'))
786
  print('')
787
+ call('git checkout master', shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
788
+ call('git pull', shell=True, stdout=open('/dev/null', 'w'))
 
789
  os.chdir('/notebooks')
790
  clear_output()
791
 
 
814
  call("sed -i 's@\.\.\/@src/@g' /notebooks/sd/stable-diffusion-webui/modules/paths.py", shell=True)
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')
821
  clear_output()
822
 
823
+ configf="--disable-console-progressbars --no-gradio-queue --upcast-sampling --no-half-vae --disable-safe-unpickle --api --no-download-sd-model --xformers --enable-insecure-extension-access --port 6006 --listen --skip-version-check --ckpt "+path_to_trained_model+" "+auth
824
 
825
  return configf
826
 
Scripts/mainpaperspacev2.py CHANGED
@@ -827,14 +827,13 @@ def testui(Custom_Path, Previous_Session_Name, Session_Name, User, Password):
827
 
828
  os.chdir('/notebooks/sd')
829
  if not os.path.exists('stable-diffusion-webui'):
830
- call('git clone -q --branch master https://github.com/AUTOMATIC1111/stable-diffusion-webui', shell=True)
831
 
832
  os.chdir('/notebooks/sd/stable-diffusion-webui/')
833
  call('git reset --hard', shell=True, stdout=open('/dev/null', 'w'))
834
  print('')
835
- call('!git fetch --unshallow', shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
836
- call('git checkout 15adff3d6d5e8ba186b3df6eee8a8d774c8f3879', shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
837
- #call('git pull', shell=True, stdout=open('/dev/null', 'w'))
838
  os.chdir('/notebooks')
839
  clear_output()
840
 
@@ -863,11 +862,13 @@ def testui(Custom_Path, Previous_Session_Name, Session_Name, User, Password):
863
  call("sed -i 's@\.\.\/@src/@g' /notebooks/sd/stable-diffusion-webui/modules/paths.py", 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@\"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)
867
  os.chdir('/notebooks/sd/stable-diffusion-webui')
868
  clear_output()
869
 
870
- configf="--disable-console-progressbars --no-gradio-queue --no-half-vae --disable-safe-unpickle --api --no-download-sd-model --xformers --enable-insecure-extension-access --port 6006 --listen --skip-version-check --ckpt "+path_to_trained_model+" "+auth
871
 
872
  return configf
873
 
 
827
 
828
  os.chdir('/notebooks/sd')
829
  if not os.path.exists('stable-diffusion-webui'):
830
+ call('git clone -q --depth 1 --branch master https://github.com/AUTOMATIC1111/stable-diffusion-webui', shell=True)
831
 
832
  os.chdir('/notebooks/sd/stable-diffusion-webui/')
833
  call('git reset --hard', shell=True, stdout=open('/dev/null', 'w'))
834
  print('')
835
+ call('git checkout master', shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
836
+ call('git pull', shell=True, stdout=open('/dev/null', 'w'))
 
837
  os.chdir('/notebooks')
838
  clear_output()
839
 
 
862
  call("sed -i 's@\.\.\/@src/@g' /notebooks/sd/stable-diffusion-webui/modules/paths.py", shell=True)
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')
869
  clear_output()
870
 
871
+ configf="--disable-console-progressbars --no-gradio-queue --upcast-sampling --no-half-vae --disable-safe-unpickle --api --no-download-sd-model --xformers --enable-insecure-extension-access --port 6006 --listen --skip-version-check --ckpt "+path_to_trained_model+" "+auth
872
 
873
  return configf
874