TheLastBen
commited on
Commit
·
8fb2db7
1
Parent(s):
b5b31bd
Update Scripts/mainpaperspacev2.py
Browse files
Scripts/mainpaperspacev2.py
CHANGED
@@ -106,21 +106,21 @@ def downloadmodel_hfv2(Path_to_HuggingFace):
|
|
106 |
print('[1;31mCheck the link you provided')
|
107 |
os.chdir('/notebooks')
|
108 |
time.sleep(5)
|
109 |
-
|
110 |
|
111 |
-
|
|
|
112 |
def downloadmodel_pthv2(CKPT_Path, Custom_Model_Version):
|
113 |
import wget
|
114 |
os.chdir('/models')
|
115 |
clear_output()
|
116 |
if os.path.exists(str(CKPT_Path)):
|
117 |
-
wget.download('https://raw.githubusercontent.com/TheLastBen/fast-stable-diffusion/main/Dreambooth/convertodiffv2.py')
|
118 |
if Custom_Model_Version=='512':
|
119 |
-
call('
|
|
|
120 |
elif Custom_Model_Version=='768':
|
121 |
-
call('
|
122 |
-
|
123 |
-
|
124 |
call('rm convertodiffv2.py', shell=True)
|
125 |
if os.path.exists('stable-diffusion-custom/unet/diffusion_pytorch_model.bin'):
|
126 |
os.chdir('/notebooks')
|
|
|
106 |
print('[1;31mCheck the link you provided')
|
107 |
os.chdir('/notebooks')
|
108 |
time.sleep(5)
|
|
|
109 |
|
110 |
+
|
111 |
+
|
112 |
def downloadmodel_pthv2(CKPT_Path, Custom_Model_Version):
|
113 |
import wget
|
114 |
os.chdir('/models')
|
115 |
clear_output()
|
116 |
if os.path.exists(str(CKPT_Path)):
|
|
|
117 |
if Custom_Model_Version=='512':
|
118 |
+
call('wget -q -O convertodiffv2.py https://github.com/TheLastBen/fast-stable-diffusion/raw/main/Dreambooth/convertodiffv2.py', shell=True)
|
119 |
+
call('python convertodiffv2.py model.ckpt stable-diffusion-custom --v2 --reference_model stabilityai/stable-diffusion-2-1-base', shell=True)
|
120 |
elif Custom_Model_Version=='768':
|
121 |
+
call('wget -q -O convertodiffv2.py https://github.com/TheLastBen/fast-stable-diffusion/raw/main/Dreambooth/convertodiffv2-768.py', shell=True)
|
122 |
+
call('python convertodiffv2.py model.ckpt stable-diffusion-custom --v2 --reference_model stabilityai/stable-diffusion-2-1', shell=True)
|
123 |
+
|
124 |
call('rm convertodiffv2.py', shell=True)
|
125 |
if os.path.exists('stable-diffusion-custom/unet/diffusion_pytorch_model.bin'):
|
126 |
os.chdir('/notebooks')
|