TheLastBen
commited on
Commit
•
512c315
1
Parent(s):
dd394ce
Upload 3 files
Browse files
Scripts/mainpaperspaceA1111.py
CHANGED
@@ -39,11 +39,11 @@ def Deps(force_reinstall):
|
|
39 |
os.chdir('/deps')
|
40 |
call('wget -q -i https://raw.githubusercontent.com/TheLastBen/fast-stable-diffusion/main/Dependencies/aptdeps.txt', shell=True)
|
41 |
call('dpkg -i *.deb', shell=True, stdout=open('/dev/null', 'w'))
|
42 |
-
depsinst("https://huggingface.co/TheLastBen/dependencies/resolve/main/ppsdeps.tar.zst", "/deps/ppsdeps.tar.zst"
|
43 |
call('tar -C / --zstd -xf ppsdeps.tar.zst', shell=True, stdout=open('/dev/null', 'w'))
|
44 |
call("sed -i 's@~/.cache@/notebooks/cache@' /usr/local/lib/python3.9/dist-packages/transformers/utils/hub.py", shell=True)
|
45 |
os.chdir('/notebooks')
|
46 |
-
call("git clone --depth 1 -q --branch main https://github.com/TheLastBen/diffusers /diffusers", shell=True, stdout=open('/dev/null', 'w'))
|
47 |
call("pip install --root-user-action=ignore -qq gradio==3.29.0", shell=True, stdout=open('/dev/null', 'w'))
|
48 |
if not os.path.exists('/notebooks/diffusers'):
|
49 |
call('ln -s /diffusers /notebooks', shell=True)
|
@@ -54,7 +54,8 @@ def Deps(force_reinstall):
|
|
54 |
done()
|
55 |
|
56 |
|
57 |
-
|
|
|
58 |
file_size = None
|
59 |
req = Request(url, headers={"User-Agent": "torch.hub"})
|
60 |
u = urlopen(req)
|
@@ -66,7 +67,7 @@ def depsinst(url, dst, hash_prefix=None, progress=True):
|
|
66 |
if content_length is not None and len(content_length) > 0:
|
67 |
file_size = int(content_length[0])
|
68 |
|
69 |
-
with tqdm(total=file_size, disable=
|
70 |
bar_format='Installing dependencies |{bar:20}| {percentage:3.0f}%') as pbar:
|
71 |
with open(dst, "wb") as f:
|
72 |
while True:
|
|
|
39 |
os.chdir('/deps')
|
40 |
call('wget -q -i https://raw.githubusercontent.com/TheLastBen/fast-stable-diffusion/main/Dependencies/aptdeps.txt', shell=True)
|
41 |
call('dpkg -i *.deb', shell=True, stdout=open('/dev/null', 'w'))
|
42 |
+
depsinst("https://huggingface.co/TheLastBen/dependencies/resolve/main/ppsdeps.tar.zst", "/deps/ppsdeps.tar.zst")
|
43 |
call('tar -C / --zstd -xf ppsdeps.tar.zst', shell=True, stdout=open('/dev/null', 'w'))
|
44 |
call("sed -i 's@~/.cache@/notebooks/cache@' /usr/local/lib/python3.9/dist-packages/transformers/utils/hub.py", shell=True)
|
45 |
os.chdir('/notebooks')
|
46 |
+
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'))
|
47 |
call("pip install --root-user-action=ignore -qq gradio==3.29.0", shell=True, stdout=open('/dev/null', 'w'))
|
48 |
if not os.path.exists('/notebooks/diffusers'):
|
49 |
call('ln -s /diffusers /notebooks', shell=True)
|
|
|
54 |
done()
|
55 |
|
56 |
|
57 |
+
|
58 |
+
def depsinst(url, dst):
|
59 |
file_size = None
|
60 |
req = Request(url, headers={"User-Agent": "torch.hub"})
|
61 |
u = urlopen(req)
|
|
|
67 |
if content_length is not None and len(content_length) > 0:
|
68 |
file_size = int(content_length[0])
|
69 |
|
70 |
+
with tqdm(total=file_size, disable=False, mininterval=0.5,
|
71 |
bar_format='Installing dependencies |{bar:20}| {percentage:3.0f}%') as pbar:
|
72 |
with open(dst, "wb") as f:
|
73 |
while True:
|
Scripts/mainpaperspacev1.py
CHANGED
@@ -51,11 +51,11 @@ def Deps(force_reinstall):
|
|
51 |
os.chdir('/deps')
|
52 |
call('wget -q -i https://raw.githubusercontent.com/TheLastBen/fast-stable-diffusion/main/Dependencies/aptdeps.txt', shell=True)
|
53 |
call('dpkg -i *.deb', shell=True, stdout=open('/dev/null', 'w'))
|
54 |
-
depsinst("https://huggingface.co/TheLastBen/dependencies/resolve/main/ppsdeps.tar.zst", "/deps/ppsdeps.tar.zst"
|
55 |
call('tar -C / --zstd -xf ppsdeps.tar.zst', shell=True, stdout=open('/dev/null', 'w'))
|
56 |
call("sed -i 's@~/.cache@/notebooks/cache@' /usr/local/lib/python3.9/dist-packages/transformers/utils/hub.py", shell=True)
|
57 |
os.chdir('/notebooks')
|
58 |
-
call("git clone --depth 1 -q --branch main https://github.com/TheLastBen/diffusers /diffusers", shell=True, stdout=open('/dev/null', 'w'))
|
59 |
call("pip install --root-user-action=ignore -qq gradio==3.29.0", shell=True, stdout=open('/dev/null', 'w'))
|
60 |
if not os.path.exists('/notebooks/diffusers'):
|
61 |
call('ln -s /diffusers /notebooks', shell=True)
|
@@ -67,7 +67,7 @@ def Deps(force_reinstall):
|
|
67 |
|
68 |
|
69 |
|
70 |
-
def depsinst(url, dst
|
71 |
file_size = None
|
72 |
req = Request(url, headers={"User-Agent": "torch.hub"})
|
73 |
u = urlopen(req)
|
@@ -79,7 +79,7 @@ def depsinst(url, dst, hash_prefix=None, progress=True):
|
|
79 |
if content_length is not None and len(content_length) > 0:
|
80 |
file_size = int(content_length[0])
|
81 |
|
82 |
-
with tqdm(total=file_size, disable=
|
83 |
bar_format='Installing dependencies |{bar:20}| {percentage:3.0f}%') as pbar:
|
84 |
with open(dst, "wb") as f:
|
85 |
while True:
|
|
|
51 |
os.chdir('/deps')
|
52 |
call('wget -q -i https://raw.githubusercontent.com/TheLastBen/fast-stable-diffusion/main/Dependencies/aptdeps.txt', shell=True)
|
53 |
call('dpkg -i *.deb', shell=True, stdout=open('/dev/null', 'w'))
|
54 |
+
depsinst("https://huggingface.co/TheLastBen/dependencies/resolve/main/ppsdeps.tar.zst", "/deps/ppsdeps.tar.zst")
|
55 |
call('tar -C / --zstd -xf ppsdeps.tar.zst', shell=True, stdout=open('/dev/null', 'w'))
|
56 |
call("sed -i 's@~/.cache@/notebooks/cache@' /usr/local/lib/python3.9/dist-packages/transformers/utils/hub.py", shell=True)
|
57 |
os.chdir('/notebooks')
|
58 |
+
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'))
|
59 |
call("pip install --root-user-action=ignore -qq gradio==3.29.0", shell=True, stdout=open('/dev/null', 'w'))
|
60 |
if not os.path.exists('/notebooks/diffusers'):
|
61 |
call('ln -s /diffusers /notebooks', shell=True)
|
|
|
67 |
|
68 |
|
69 |
|
70 |
+
def depsinst(url, dst):
|
71 |
file_size = None
|
72 |
req = Request(url, headers={"User-Agent": "torch.hub"})
|
73 |
u = urlopen(req)
|
|
|
79 |
if content_length is not None and len(content_length) > 0:
|
80 |
file_size = int(content_length[0])
|
81 |
|
82 |
+
with tqdm(total=file_size, disable=False, mininterval=0.5,
|
83 |
bar_format='Installing dependencies |{bar:20}| {percentage:3.0f}%') as pbar:
|
84 |
with open(dst, "wb") as f:
|
85 |
while True:
|
Scripts/mainpaperspacev2.py
CHANGED
@@ -52,11 +52,11 @@ def Deps(force_reinstall):
|
|
52 |
os.chdir('/deps')
|
53 |
call('wget -q -i https://raw.githubusercontent.com/TheLastBen/fast-stable-diffusion/main/Dependencies/aptdeps.txt', shell=True)
|
54 |
call('dpkg -i *.deb', shell=True, stdout=open('/dev/null', 'w'))
|
55 |
-
depsinst("https://huggingface.co/TheLastBen/dependencies/resolve/main/ppsdeps.tar.zst", "/deps/ppsdeps.tar.zst"
|
56 |
call('tar -C / --zstd -xf ppsdeps.tar.zst', shell=True, stdout=open('/dev/null', 'w'))
|
57 |
call("sed -i 's@~/.cache@/notebooks/cache@' /usr/local/lib/python3.9/dist-packages/transformers/utils/hub.py", shell=True)
|
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'))
|
60 |
call("pip install --root-user-action=ignore -qq gradio==3.29.0", shell=True, stdout=open('/dev/null', 'w'))
|
61 |
if not os.path.exists('/notebooks/diffusers'):
|
62 |
call('ln -s /diffusers /notebooks', shell=True)
|
@@ -67,7 +67,8 @@ def Deps(force_reinstall):
|
|
67 |
done()
|
68 |
|
69 |
|
70 |
-
|
|
|
71 |
file_size = None
|
72 |
req = Request(url, headers={"User-Agent": "torch.hub"})
|
73 |
u = urlopen(req)
|
@@ -79,7 +80,7 @@ def depsinst(url, dst, hash_prefix=None, progress=True):
|
|
79 |
if content_length is not None and len(content_length) > 0:
|
80 |
file_size = int(content_length[0])
|
81 |
|
82 |
-
with tqdm(total=file_size, disable=
|
83 |
bar_format='Installing dependencies |{bar:20}| {percentage:3.0f}%') as pbar:
|
84 |
with open(dst, "wb") as f:
|
85 |
while True:
|
|
|
52 |
os.chdir('/deps')
|
53 |
call('wget -q -i https://raw.githubusercontent.com/TheLastBen/fast-stable-diffusion/main/Dependencies/aptdeps.txt', shell=True)
|
54 |
call('dpkg -i *.deb', shell=True, stdout=open('/dev/null', 'w'))
|
55 |
+
depsinst("https://huggingface.co/TheLastBen/dependencies/resolve/main/ppsdeps.tar.zst", "/deps/ppsdeps.tar.zst")
|
56 |
call('tar -C / --zstd -xf ppsdeps.tar.zst', shell=True, stdout=open('/dev/null', 'w'))
|
57 |
call("sed -i 's@~/.cache@/notebooks/cache@' /usr/local/lib/python3.9/dist-packages/transformers/utils/hub.py", shell=True)
|
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 -qq gradio==3.29.0", shell=True, stdout=open('/dev/null', 'w'))
|
61 |
if not os.path.exists('/notebooks/diffusers'):
|
62 |
call('ln -s /diffusers /notebooks', shell=True)
|
|
|
67 |
done()
|
68 |
|
69 |
|
70 |
+
|
71 |
+
def depsinst(url, dst):
|
72 |
file_size = None
|
73 |
req = Request(url, headers={"User-Agent": "torch.hub"})
|
74 |
u = urlopen(req)
|
|
|
80 |
if content_length is not None and len(content_length) > 0:
|
81 |
file_size = int(content_length[0])
|
82 |
|
83 |
+
with tqdm(total=file_size, disable=False, mininterval=0.5,
|
84 |
bar_format='Installing dependencies |{bar:20}| {percentage:3.0f}%') as pbar:
|
85 |
with open(dst, "wb") as f:
|
86 |
while True:
|