TheLastBen
commited on
Commit
•
4056e27
1
Parent(s):
b97560a
Upload 4 files
Browse files- Scripts/mainpaperspaceA1111.py +1 -2
- Scripts/mainpaperspacev1.py +1 -0
- Scripts/mainpaperspacev2.py +1 -0
- Scripts/sdxllorapps.py +1 -0
Scripts/mainpaperspaceA1111.py
CHANGED
@@ -6,7 +6,6 @@ import sys
|
|
6 |
import fileinput
|
7 |
import ipywidgets as widgets
|
8 |
from torch.hub import download_url_to_file
|
9 |
-
from urllib.parse import urlparse
|
10 |
from urllib.parse import urlparse, parse_qs, unquote
|
11 |
import re
|
12 |
import requests
|
@@ -51,6 +50,7 @@ def Deps(force_reinstall):
|
|
51 |
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'))
|
52 |
os.environ['TORCH_HOME'] = '/notebooks/cache/torch'
|
53 |
os.environ['PYTHONWARNINGS'] = 'ignore'
|
|
|
54 |
if not os.path.exists('/notebooks/diffusers'):
|
55 |
call('ln -s /diffusers /notebooks', shell=True)
|
56 |
call("rm -r /deps", shell=True)
|
@@ -242,7 +242,6 @@ def mdls(Original_Model_Version, Path_to_MODEL, MODEL_LINK, Temporary_Storage):
|
|
242 |
filenm = re.search(r"filename\*=UTF-8''(.*)", content_disposition).groups()[0].replace(os.path.sep, "_")
|
243 |
return filenm
|
244 |
|
245 |
-
|
246 |
call('ln -s /datasets/stable-diffusion-classic/SDv1.5.ckpt /notebooks/sd/stable-diffusion-webui/models/Stable-diffusion', shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
|
247 |
call('ln -s /datasets/stable-diffusion-v2-1-base-diffusers/stable-diffusion-2-1-base/v2-1_512-nonema-pruned.safetensors /notebooks/sd/stable-diffusion-webui/models/Stable-diffusion', shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
|
248 |
call('ln -s /datasets/stable-diffusion-v2-1/stable-diffusion-2-1/v2-1_768-nonema-pruned.safetensors /notebooks/sd/stable-diffusion-webui/models/Stable-diffusion', shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
|
|
|
6 |
import fileinput
|
7 |
import ipywidgets as widgets
|
8 |
from torch.hub import download_url_to_file
|
|
|
9 |
from urllib.parse import urlparse, parse_qs, unquote
|
10 |
import re
|
11 |
import requests
|
|
|
50 |
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'))
|
51 |
os.environ['TORCH_HOME'] = '/notebooks/cache/torch'
|
52 |
os.environ['PYTHONWARNINGS'] = 'ignore'
|
53 |
+
call("sed -i 's@text = _formatwarnmsg(msg)@text =\"\"@g' /usr/lib/python3.9/warnings.py", shell=True)
|
54 |
if not os.path.exists('/notebooks/diffusers'):
|
55 |
call('ln -s /diffusers /notebooks', shell=True)
|
56 |
call("rm -r /deps", shell=True)
|
|
|
242 |
filenm = re.search(r"filename\*=UTF-8''(.*)", content_disposition).groups()[0].replace(os.path.sep, "_")
|
243 |
return filenm
|
244 |
|
|
|
245 |
call('ln -s /datasets/stable-diffusion-classic/SDv1.5.ckpt /notebooks/sd/stable-diffusion-webui/models/Stable-diffusion', shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
|
246 |
call('ln -s /datasets/stable-diffusion-v2-1-base-diffusers/stable-diffusion-2-1-base/v2-1_512-nonema-pruned.safetensors /notebooks/sd/stable-diffusion-webui/models/Stable-diffusion', shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
|
247 |
call('ln -s /datasets/stable-diffusion-v2-1/stable-diffusion-2-1/v2-1_768-nonema-pruned.safetensors /notebooks/sd/stable-diffusion-webui/models/Stable-diffusion', shell=True, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'))
|
Scripts/mainpaperspacev1.py
CHANGED
@@ -63,6 +63,7 @@ def Deps(force_reinstall):
|
|
63 |
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'))
|
64 |
os.environ['TORCH_HOME'] = '/notebooks/cache/torch'
|
65 |
os.environ['PYTHONWARNINGS'] = 'ignore'
|
|
|
66 |
if not os.path.exists('/notebooks/diffusers'):
|
67 |
call('ln -s /diffusers /notebooks', shell=True)
|
68 |
call("rm -r /deps", shell=True)
|
|
|
63 |
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'))
|
64 |
os.environ['TORCH_HOME'] = '/notebooks/cache/torch'
|
65 |
os.environ['PYTHONWARNINGS'] = 'ignore'
|
66 |
+
call("sed -i 's@text = _formatwarnmsg(msg)@text =\"\"@g' /usr/lib/python3.9/warnings.py", shell=True)
|
67 |
if not os.path.exists('/notebooks/diffusers'):
|
68 |
call('ln -s /diffusers /notebooks', shell=True)
|
69 |
call("rm -r /deps", shell=True)
|
Scripts/mainpaperspacev2.py
CHANGED
@@ -64,6 +64,7 @@ def Deps(force_reinstall):
|
|
64 |
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'))
|
65 |
os.environ['TORCH_HOME'] = '/notebooks/cache/torch'
|
66 |
os.environ['PYTHONWARNINGS'] = 'ignore'
|
|
|
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("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'))
|
65 |
os.environ['TORCH_HOME'] = '/notebooks/cache/torch'
|
66 |
os.environ['PYTHONWARNINGS'] = 'ignore'
|
67 |
+
call("sed -i 's@text = _formatwarnmsg(msg)@text =\"\"@g' /usr/lib/python3.9/warnings.py", shell=True)
|
68 |
if not os.path.exists('/notebooks/diffusers'):
|
69 |
call('ln -s /diffusers /notebooks', shell=True)
|
70 |
call("rm -r /deps", shell=True)
|
Scripts/sdxllorapps.py
CHANGED
@@ -66,6 +66,7 @@ def Deps(force_reinstall):
|
|
66 |
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'))
|
67 |
os.environ['TORCH_HOME'] = '/notebooks/cache/torch'
|
68 |
os.environ['PYTHONWARNINGS'] = 'ignore'
|
|
|
69 |
if not os.path.exists('/notebooks/diffusers'):
|
70 |
call('ln -s /diffusers /notebooks', shell=True)
|
71 |
call("rm -r /deps", shell=True)
|
|
|
66 |
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'))
|
67 |
os.environ['TORCH_HOME'] = '/notebooks/cache/torch'
|
68 |
os.environ['PYTHONWARNINGS'] = 'ignore'
|
69 |
+
call("sed -i 's@text = _formatwarnmsg(msg)@text =\"\"@g' /usr/lib/python3.9/warnings.py", shell=True)
|
70 |
if not os.path.exists('/notebooks/diffusers'):
|
71 |
call('ln -s /diffusers /notebooks', shell=True)
|
72 |
call("rm -r /deps", shell=True)
|