Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
918a092e
Commit
918a092e
authored
Sep 13, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
emergency fix for running in dir with spaces
parent
a5f34b46
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
launch.py
launch.py
+6
-6
No files found.
launch.py
View file @
918a092e
...
@@ -47,11 +47,11 @@ stderr: {result.stderr.decode(encoding="utf8", errors="ignore") if len(result.st
...
@@ -47,11 +47,11 @@ stderr: {result.stderr.decode(encoding="utf8", errors="ignore") if len(result.st
def
run_python
(
code
,
desc
=
None
,
errdesc
=
None
):
def
run_python
(
code
,
desc
=
None
,
errdesc
=
None
):
return
run
(
f
'
{python}
-c "{code}"'
,
desc
,
errdesc
)
return
run
(
f
'
"{python}"
-c "{code}"'
,
desc
,
errdesc
)
def
run_pip
(
args
,
desc
=
None
):
def
run_pip
(
args
,
desc
=
None
):
return
run
(
f
'
{python}
-m pip {args} --prefer-binary'
,
desc
=
f
"Installing {desc}"
,
errdesc
=
f
"Couldn't install {desc}"
)
return
run
(
f
'
"{python}"
-m pip {args} --prefer-binary'
,
desc
=
f
"Installing {desc}"
,
errdesc
=
f
"Couldn't install {desc}"
)
def
check_run
(
command
):
def
check_run
(
command
):
...
@@ -60,7 +60,7 @@ def check_run(command):
...
@@ -60,7 +60,7 @@ def check_run(command):
def
check_run_python
(
code
):
def
check_run_python
(
code
):
return
check_run
(
f
'
{python}
-c "{code}"'
)
return
check_run
(
f
'
"{python}"
-c "{code}"'
)
def
is_installed
(
package
):
def
is_installed
(
package
):
...
@@ -78,10 +78,10 @@ def git_clone(url, dir, name, commithash=None):
...
@@ -78,10 +78,10 @@ def git_clone(url, dir, name, commithash=None):
if
os
.
path
.
exists
(
dir
):
if
os
.
path
.
exists
(
dir
):
return
return
run
(
f
'
{git}
clone "{url}" "{dir}"'
,
f
"Cloning {name} into {dir}..."
,
f
"Couldn't clone {name}"
)
run
(
f
'
"{git}"
clone "{url}" "{dir}"'
,
f
"Cloning {name} into {dir}..."
,
f
"Couldn't clone {name}"
)
if
commithash
is
not
None
:
if
commithash
is
not
None
:
run
(
f
"{git} -C {dir} checkout {commithash}"
,
None
,
"Couldn't checkout {name}'s hash: {commithash}"
)
run
(
f
'"{git}" -C {dir} checkout {commithash}'
,
None
,
"Couldn't checkout {name}'s hash: {commithash}"
)
try
:
try
:
...
@@ -93,7 +93,7 @@ print(f"Python {sys.version}")
...
@@ -93,7 +93,7 @@ print(f"Python {sys.version}")
print
(
f
"Commit hash: {commit}"
)
print
(
f
"Commit hash: {commit}"
)
if
not
is_installed
(
"torch"
):
if
not
is_installed
(
"torch"
):
run
(
f
"{python} -m {torch_command}"
,
"Installing torch"
,
"Couldn't install torch"
)
run
(
f
'"{python}" -m {torch_command}'
,
"Installing torch"
,
"Couldn't install torch"
)
run_python
(
"import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU'"
)
run_python
(
"import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU'"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment