Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
f1bdf2b1
Commit
f1bdf2b1
authored
Nov 19, 2022
by
Muhammad Rizqi Nur
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'a1111' into vae-misc
parents
c8f7b5cd
d9fd4525
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
119 additions
and
77 deletions
+119
-77
launch.py
launch.py
+15
-11
extensions.py
modules/extensions.py
+0
-21
script_loading.py
modules/script_loading.py
+34
-0
scripts.py
modules/scripts.py
+17
-29
sd_vae.py
modules/sd_vae.py
+16
-9
shared.py
modules/shared.py
+3
-3
ui_extensions.py
modules/ui_extensions.py
+3
-0
requirements.txt
requirements.txt
+1
-0
requirements_versions.txt
requirements_versions.txt
+1
-0
webui-user.bat
webui-user.bat
+1
-0
webui-user.sh
webui-user.sh
+3
-0
webui.bat
webui.bat
+12
-0
webui.py
webui.py
+1
-0
webui.sh
webui.sh
+12
-4
No files found.
launch.py
View file @
f1bdf2b1
...
@@ -105,24 +105,28 @@ def version_check(commit):
...
@@ -105,24 +105,28 @@ def version_check(commit):
print
(
"version check failed"
,
e
)
print
(
"version check failed"
,
e
)
def
run_extensions_installers
():
def
run_extension_installer
(
extension_dir
):
if
not
os
.
path
.
isdir
(
dir_extensions
):
path_installer
=
os
.
path
.
join
(
extension_dir
,
"install.py"
)
return
for
dirname_extension
in
os
.
listdir
(
dir_extensions
):
path_installer
=
os
.
path
.
join
(
dir_extensions
,
dirname_extension
,
"install.py"
)
if
not
os
.
path
.
isfile
(
path_installer
):
if
not
os
.
path
.
isfile
(
path_installer
):
continue
return
try
:
try
:
env
=
os
.
environ
.
copy
()
env
=
os
.
environ
.
copy
()
env
[
'PYTHONPATH'
]
=
os
.
path
.
abspath
(
"."
)
env
[
'PYTHONPATH'
]
=
os
.
path
.
abspath
(
"."
)
print
(
run
(
f
'"{python}" "{path_installer}"'
,
errdesc
=
f
"Error running install.py for extension {dirname_extension
}"
,
custom_env
=
env
))
print
(
run
(
f
'"{python}" "{path_installer}"'
,
errdesc
=
f
"Error running install.py for extension {extension_dir
}"
,
custom_env
=
env
))
except
Exception
as
e
:
except
Exception
as
e
:
print
(
e
,
file
=
sys
.
stderr
)
print
(
e
,
file
=
sys
.
stderr
)
def
run_extensions_installers
():
if
not
os
.
path
.
isdir
(
dir_extensions
):
return
for
dirname_extension
in
os
.
listdir
(
dir_extensions
):
run_extension_installer
(
os
.
path
.
join
(
dir_extensions
,
dirname_extension
))
def
prepare_enviroment
():
def
prepare_enviroment
():
torch_command
=
os
.
environ
.
get
(
'TORCH_COMMAND'
,
"pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113"
)
torch_command
=
os
.
environ
.
get
(
'TORCH_COMMAND'
,
"pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113"
)
requirements_file
=
os
.
environ
.
get
(
'REQS_FILE'
,
"requirements_versions.txt"
)
requirements_file
=
os
.
environ
.
get
(
'REQS_FILE'
,
"requirements_versions.txt"
)
...
...
modules/extensions.py
View file @
f1bdf2b1
import
os
import
os
import
sys
import
sys
import
traceback
import
traceback
from
importlib.machinery
import
SourceFileLoader
import
git
import
git
...
@@ -85,23 +84,3 @@ def list_extensions():
...
@@ -85,23 +84,3 @@ def list_extensions():
extension
=
Extension
(
name
=
dirname
,
path
=
path
,
enabled
=
dirname
not
in
shared
.
opts
.
disabled_extensions
)
extension
=
Extension
(
name
=
dirname
,
path
=
path
,
enabled
=
dirname
not
in
shared
.
opts
.
disabled_extensions
)
extensions
.
append
(
extension
)
extensions
.
append
(
extension
)
def
preload_extensions
(
parser
):
if
not
os
.
path
.
isdir
(
extensions_dir
):
return
for
dirname
in
sorted
(
os
.
listdir
(
extensions_dir
)):
path
=
os
.
path
.
join
(
extensions_dir
,
dirname
)
if
not
os
.
path
.
isdir
(
path
):
continue
for
file
in
os
.
listdir
(
path
):
if
"preload.py"
in
file
:
full_file
=
os
.
path
.
join
(
path
,
file
)
print
(
f
"Got preload file: {full_file}"
)
try
:
ext
=
SourceFileLoader
(
"preload"
,
full_file
)
.
load_module
()
parser
=
ext
.
preload
(
parser
)
except
Exception
as
e
:
print
(
f
"Exception preloading script: {e}"
)
return
parser
\ No newline at end of file
modules/script_loading.py
0 → 100644
View file @
f1bdf2b1
import
os
import
sys
import
traceback
from
types
import
ModuleType
def
load_module
(
path
):
with
open
(
path
,
"r"
,
encoding
=
"utf8"
)
as
file
:
text
=
file
.
read
()
compiled
=
compile
(
text
,
path
,
'exec'
)
module
=
ModuleType
(
os
.
path
.
basename
(
path
))
exec
(
compiled
,
module
.
__dict__
)
return
module
def
preload_extensions
(
extensions_dir
,
parser
):
if
not
os
.
path
.
isdir
(
extensions_dir
):
return
for
dirname
in
sorted
(
os
.
listdir
(
extensions_dir
)):
preload_script
=
os
.
path
.
join
(
extensions_dir
,
dirname
,
"preload.py"
)
if
not
os
.
path
.
isfile
(
preload_script
):
continue
try
:
module
=
load_module
(
preload_script
)
if
hasattr
(
module
,
'preload'
):
module
.
preload
(
parser
)
except
Exception
:
print
(
f
"Error running preload() for {preload_script}"
,
file
=
sys
.
stderr
)
print
(
traceback
.
format_exc
(),
file
=
sys
.
stderr
)
modules/scripts.py
View file @
f1bdf2b1
...
@@ -6,7 +6,7 @@ from collections import namedtuple
...
@@ -6,7 +6,7 @@ from collections import namedtuple
import
gradio
as
gr
import
gradio
as
gr
from
modules.processing
import
StableDiffusionProcessing
from
modules.processing
import
StableDiffusionProcessing
from
modules
import
shared
,
paths
,
script_callbacks
,
extensions
from
modules
import
shared
,
paths
,
script_callbacks
,
extensions
,
script_loading
AlwaysVisible
=
object
()
AlwaysVisible
=
object
()
...
@@ -161,13 +161,7 @@ def load_scripts():
...
@@ -161,13 +161,7 @@ def load_scripts():
sys
.
path
=
[
scriptfile
.
basedir
]
+
sys
.
path
sys
.
path
=
[
scriptfile
.
basedir
]
+
sys
.
path
current_basedir
=
scriptfile
.
basedir
current_basedir
=
scriptfile
.
basedir
with
open
(
scriptfile
.
path
,
"r"
,
encoding
=
"utf8"
)
as
file
:
module
=
script_loading
.
load_module
(
scriptfile
.
path
)
text
=
file
.
read
()
from
types
import
ModuleType
compiled
=
compile
(
text
,
scriptfile
.
path
,
'exec'
)
module
=
ModuleType
(
scriptfile
.
filename
)
exec
(
compiled
,
module
.
__dict__
)
for
key
,
script_class
in
module
.
__dict__
.
items
():
for
key
,
script_class
in
module
.
__dict__
.
items
():
if
type
(
script_class
)
==
type
and
issubclass
(
script_class
,
Script
):
if
type
(
script_class
)
==
type
and
issubclass
(
script_class
,
Script
):
...
@@ -328,19 +322,13 @@ class ScriptRunner:
...
@@ -328,19 +322,13 @@ class ScriptRunner:
def
reload_sources
(
self
,
cache
):
def
reload_sources
(
self
,
cache
):
for
si
,
script
in
list
(
enumerate
(
self
.
scripts
)):
for
si
,
script
in
list
(
enumerate
(
self
.
scripts
)):
with
open
(
script
.
filename
,
"r"
,
encoding
=
"utf8"
)
as
file
:
args_from
=
script
.
args_from
args_from
=
script
.
args_from
args_to
=
script
.
args_to
args_to
=
script
.
args_to
filename
=
script
.
filename
filename
=
script
.
filename
text
=
file
.
read
()
from
types
import
ModuleType
module
=
cache
.
get
(
filename
,
None
)
module
=
cache
.
get
(
filename
,
None
)
if
module
is
None
:
if
module
is
None
:
compiled
=
compile
(
text
,
filename
,
'exec'
)
module
=
script_loading
.
load_module
(
script
.
filename
)
module
=
ModuleType
(
script
.
filename
)
exec
(
compiled
,
module
.
__dict__
)
cache
[
filename
]
=
module
cache
[
filename
]
=
module
for
key
,
script_class
in
module
.
__dict__
.
items
():
for
key
,
script_class
in
module
.
__dict__
.
items
():
...
...
modules/sd_vae.py
View file @
f1bdf2b1
...
@@ -83,7 +83,19 @@ def refresh_vae_list(vae_path=vae_path, model_path=model_path):
...
@@ -83,7 +83,19 @@ def refresh_vae_list(vae_path=vae_path, model_path=model_path):
return
vae_list
return
vae_list
def
resolve_vae
(
checkpoint_file
,
vae_file
=
"auto"
):
def
get_vae_from_settings
(
vae_file
=
"auto"
):
# else, we load from settings, if not set to be default
if
vae_file
==
"auto"
and
shared
.
opts
.
sd_vae
is
not
None
:
# if saved VAE settings isn't recognized, fallback to auto
vae_file
=
vae_dict
.
get
(
shared
.
opts
.
sd_vae
,
"auto"
)
# if VAE selected but not found, fallback to auto
if
vae_file
not
in
default_vae_values
and
not
os
.
path
.
isfile
(
vae_file
):
vae_file
=
"auto"
print
(
f
"Selected VAE doesn't exist: {vae_file}"
)
return
vae_file
def
resolve_vae
(
checkpoint_file
=
None
,
vae_file
=
"auto"
):
global
first_load
,
vae_dict
,
vae_list
global
first_load
,
vae_dict
,
vae_list
# if vae_file argument is provided, it takes priority, but not saved
# if vae_file argument is provided, it takes priority, but not saved
...
@@ -98,14 +110,9 @@ def resolve_vae(checkpoint_file, vae_file="auto"):
...
@@ -98,14 +110,9 @@ def resolve_vae(checkpoint_file, vae_file="auto"):
shared
.
opts
.
data
[
'sd_vae'
]
=
get_filename
(
vae_file
)
shared
.
opts
.
data
[
'sd_vae'
]
=
get_filename
(
vae_file
)
else
:
else
:
print
(
f
"VAE provided as command line argument doesn't exist: {vae_file}"
)
print
(
f
"VAE provided as command line argument doesn't exist: {vae_file}"
)
# else, we load from settings
# fallback to selector in settings, if vae selector not set to act as default fallback
if
vae_file
==
"auto"
and
shared
.
opts
.
sd_vae
is
not
None
:
if
not
shared
.
opts
.
sd_vae_as_default
:
# if saved VAE settings isn't recognized, fallback to auto
vae_file
=
get_vae_from_settings
(
vae_file
)
vae_file
=
vae_dict
.
get
(
shared
.
opts
.
sd_vae
,
"auto"
)
# if VAE selected but not found, fallback to auto
if
vae_file
not
in
default_vae_values
and
not
os
.
path
.
isfile
(
vae_file
):
vae_file
=
"auto"
print
(
f
"Selected VAE doesn't exist: {vae_file}"
)
# vae-path cmd arg takes priority for auto
# vae-path cmd arg takes priority for auto
if
vae_file
==
"auto"
and
shared
.
cmd_opts
.
vae_path
is
not
None
:
if
vae_file
==
"auto"
and
shared
.
cmd_opts
.
vae_path
is
not
None
:
if
os
.
path
.
isfile
(
shared
.
cmd_opts
.
vae_path
):
if
os
.
path
.
isfile
(
shared
.
cmd_opts
.
vae_path
):
...
...
modules/shared.py
View file @
f1bdf2b1
...
@@ -3,7 +3,6 @@ import datetime
...
@@ -3,7 +3,6 @@ import datetime
import
json
import
json
import
os
import
os
import
sys
import
sys
from
collections
import
OrderedDict
import
time
import
time
import
gradio
as
gr
import
gradio
as
gr
...
@@ -15,7 +14,7 @@ import modules.memmon
...
@@ -15,7 +14,7 @@ import modules.memmon
import
modules.sd_models
import
modules.sd_models
import
modules.styles
import
modules.styles
import
modules.devices
as
devices
import
modules.devices
as
devices
from
modules
import
sd_samplers
,
sd_models
,
localization
,
sd_vae
,
extensions
from
modules
import
sd_samplers
,
sd_models
,
localization
,
sd_vae
,
extensions
,
script_loading
from
modules.hypernetworks
import
hypernetwork
from
modules.hypernetworks
import
hypernetwork
from
modules.paths
import
models_path
,
script_path
,
sd_path
from
modules.paths
import
models_path
,
script_path
,
sd_path
...
@@ -91,7 +90,7 @@ parser.add_argument("--tls-keyfile", type=str, help="Partially enables TLS, requ
...
@@ -91,7 +90,7 @@ parser.add_argument("--tls-keyfile", type=str, help="Partially enables TLS, requ
parser
.
add_argument
(
"--tls-certfile"
,
type
=
str
,
help
=
"Partially enables TLS, requires --tls-keyfile to fully function"
,
default
=
None
)
parser
.
add_argument
(
"--tls-certfile"
,
type
=
str
,
help
=
"Partially enables TLS, requires --tls-keyfile to fully function"
,
default
=
None
)
parser
.
add_argument
(
"--server-name"
,
type
=
str
,
help
=
"Sets hostname of server"
,
default
=
None
)
parser
.
add_argument
(
"--server-name"
,
type
=
str
,
help
=
"Sets hostname of server"
,
default
=
None
)
extensions
.
preload_extensions
(
parser
)
script_loading
.
preload_extensions
(
extensions
.
extensions_dir
,
parser
)
cmd_opts
=
parser
.
parse_args
()
cmd_opts
=
parser
.
parse_args
()
...
@@ -336,6 +335,7 @@ options_templates.update(options_section(('sd', "Stable Diffusion"), {
...
@@ -336,6 +335,7 @@ options_templates.update(options_section(('sd', "Stable Diffusion"), {
"sd_model_checkpoint"
:
OptionInfo
(
None
,
"Stable Diffusion checkpoint"
,
gr
.
Dropdown
,
lambda
:
{
"choices"
:
modules
.
sd_models
.
checkpoint_tiles
()},
refresh
=
sd_models
.
list_models
),
"sd_model_checkpoint"
:
OptionInfo
(
None
,
"Stable Diffusion checkpoint"
,
gr
.
Dropdown
,
lambda
:
{
"choices"
:
modules
.
sd_models
.
checkpoint_tiles
()},
refresh
=
sd_models
.
list_models
),
"sd_checkpoint_cache"
:
OptionInfo
(
0
,
"Checkpoints to cache in RAM"
,
gr
.
Slider
,
{
"minimum"
:
0
,
"maximum"
:
10
,
"step"
:
1
}),
"sd_checkpoint_cache"
:
OptionInfo
(
0
,
"Checkpoints to cache in RAM"
,
gr
.
Slider
,
{
"minimum"
:
0
,
"maximum"
:
10
,
"step"
:
1
}),
"sd_vae"
:
OptionInfo
(
"auto"
,
"SD VAE"
,
gr
.
Dropdown
,
lambda
:
{
"choices"
:
sd_vae
.
vae_list
},
refresh
=
sd_vae
.
refresh_vae_list
),
"sd_vae"
:
OptionInfo
(
"auto"
,
"SD VAE"
,
gr
.
Dropdown
,
lambda
:
{
"choices"
:
sd_vae
.
vae_list
},
refresh
=
sd_vae
.
refresh_vae_list
),
"sd_vae_as_default"
:
OptionInfo
(
False
,
"Ignore selected VAE for stable diffusion checkpoints that have their own .vae.pt next to them"
),
"sd_hypernetwork"
:
OptionInfo
(
"None"
,
"Hypernetwork"
,
gr
.
Dropdown
,
lambda
:
{
"choices"
:
[
"None"
]
+
[
x
for
x
in
hypernetworks
.
keys
()]},
refresh
=
reload_hypernetworks
),
"sd_hypernetwork"
:
OptionInfo
(
"None"
,
"Hypernetwork"
,
gr
.
Dropdown
,
lambda
:
{
"choices"
:
[
"None"
]
+
[
x
for
x
in
hypernetworks
.
keys
()]},
refresh
=
reload_hypernetworks
),
"sd_hypernetwork_strength"
:
OptionInfo
(
1.0
,
"Hypernetwork strength"
,
gr
.
Slider
,
{
"minimum"
:
0.0
,
"maximum"
:
1.0
,
"step"
:
0.001
}),
"sd_hypernetwork_strength"
:
OptionInfo
(
1.0
,
"Hypernetwork strength"
,
gr
.
Slider
,
{
"minimum"
:
0.0
,
"maximum"
:
1.0
,
"step"
:
0.001
}),
"inpainting_mask_weight"
:
OptionInfo
(
1.0
,
"Inpainting conditioning mask strength"
,
gr
.
Slider
,
{
"minimum"
:
0.0
,
"maximum"
:
1.0
,
"step"
:
0.01
}),
"inpainting_mask_weight"
:
OptionInfo
(
1.0
,
"Inpainting conditioning mask strength"
,
gr
.
Slider
,
{
"minimum"
:
0.0
,
"maximum"
:
1.0
,
"step"
:
0.01
}),
...
...
modules/ui_extensions.py
View file @
f1bdf2b1
...
@@ -134,6 +134,9 @@ def install_extension_from_url(dirname, url):
...
@@ -134,6 +134,9 @@ def install_extension_from_url(dirname, url):
os
.
rename
(
tmpdir
,
target_dir
)
os
.
rename
(
tmpdir
,
target_dir
)
import
launch
launch
.
run_extension_installer
(
target_dir
)
extensions
.
list_extensions
()
extensions
.
list_extensions
()
return
[
extension_table
(),
html
.
escape
(
f
"Installed into {target_dir}. Use Installed tab to restart."
)]
return
[
extension_table
(),
html
.
escape
(
f
"Installed into {target_dir}. Use Installed tab to restart."
)]
finally
:
finally
:
...
...
requirements.txt
View file @
f1bdf2b1
accelerate
basicsr
basicsr
diffusers
diffusers
fairscale
==0.4.4
fairscale
==0.4.4
...
...
requirements_versions.txt
View file @
f1bdf2b1
transformers==4.19.2
transformers==4.19.2
diffusers==0.3.0
diffusers==0.3.0
accelerate==0.12.0
basicsr==1.4.2
basicsr==1.4.2
gfpgan==1.3.8
gfpgan==1.3.8
gradio==3.9
gradio==3.9
...
...
webui-user.bat
View file @
f1bdf2b1
...
@@ -4,5 +4,6 @@ set PYTHON=
...
@@ -4,5 +4,6 @@ set PYTHON=
set GIT=
set GIT=
set VENV_DIR=
set VENV_DIR=
set COMMANDLINE_ARGS=
set COMMANDLINE_ARGS=
set ACCELERATE=
call webui.bat
call webui.bat
webui-user.sh
View file @
f1bdf2b1
...
@@ -40,4 +40,7 @@ export COMMANDLINE_ARGS=""
...
@@ -40,4 +40,7 @@ export COMMANDLINE_ARGS=""
#export CODEFORMER_COMMIT_HASH=""
#export CODEFORMER_COMMIT_HASH=""
#export BLIP_COMMIT_HASH=""
#export BLIP_COMMIT_HASH=""
# Uncomment to enable accelerated launch
#export ACCELERATE="True"
###########################################
###########################################
webui.bat
View file @
f1bdf2b1
...
@@ -28,15 +28,27 @@ goto :show_stdout_stderr
...
@@ -28,15 +28,27 @@ goto :show_stdout_stderr
:activate_venv
:activate_venv
set PYTHON="%~dp0%VENV_DIR%\Scripts\Python.exe"
set PYTHON="%~dp0%VENV_DIR%\Scripts\Python.exe"
echo venv %PYTHON%
echo venv %PYTHON%
if [%ACCELERATE%] == ["True"] goto :accelerate
goto :launch
goto :launch
:skip_venv
:skip_venv
:accelerate
echo "Checking for accelerate"
set ACCELERATE="%~dp0%VENV_DIR%\Scripts\accelerate.exe"
if EXIST %ACCELERATE% goto :accelerate_launch
:launch
:launch
%PYTHON% launch.py %*
%PYTHON% launch.py %*
pause
pause
exit /b
exit /b
:accelerate_launch
echo "Accelerating"
%ACCELERATE% launch --num_cpu_threads_per_process=6 launch.py
pause
exit /b
:show_stdout_stderr
:show_stdout_stderr
echo.
echo.
...
...
webui.py
View file @
f1bdf2b1
...
@@ -82,6 +82,7 @@ def initialize():
...
@@ -82,6 +82,7 @@ def initialize():
modules
.
sd_models
.
load_model
()
modules
.
sd_models
.
load_model
()
shared
.
opts
.
onchange
(
"sd_model_checkpoint"
,
wrap_queued_call
(
lambda
:
modules
.
sd_models
.
reload_model_weights
()))
shared
.
opts
.
onchange
(
"sd_model_checkpoint"
,
wrap_queued_call
(
lambda
:
modules
.
sd_models
.
reload_model_weights
()))
shared
.
opts
.
onchange
(
"sd_vae"
,
wrap_queued_call
(
lambda
:
modules
.
sd_vae
.
reload_vae_weights
()),
call
=
False
)
shared
.
opts
.
onchange
(
"sd_vae"
,
wrap_queued_call
(
lambda
:
modules
.
sd_vae
.
reload_vae_weights
()),
call
=
False
)
shared
.
opts
.
onchange
(
"sd_vae_as_default"
,
wrap_queued_call
(
lambda
:
modules
.
sd_vae
.
reload_vae_weights
()),
call
=
False
)
shared
.
opts
.
onchange
(
"sd_hypernetwork"
,
wrap_queued_call
(
lambda
:
modules
.
hypernetworks
.
hypernetwork
.
load_hypernetwork
(
shared
.
opts
.
sd_hypernetwork
)))
shared
.
opts
.
onchange
(
"sd_hypernetwork"
,
wrap_queued_call
(
lambda
:
modules
.
hypernetworks
.
hypernetwork
.
load_hypernetwork
(
shared
.
opts
.
sd_hypernetwork
)))
shared
.
opts
.
onchange
(
"sd_hypernetwork_strength"
,
modules
.
hypernetworks
.
hypernetwork
.
apply_strength
)
shared
.
opts
.
onchange
(
"sd_hypernetwork_strength"
,
modules
.
hypernetworks
.
hypernetwork
.
apply_strength
)
...
...
webui.sh
View file @
f1bdf2b1
...
@@ -134,7 +134,15 @@ else
...
@@ -134,7 +134,15 @@ else
exit
1
exit
1
fi
fi
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
if
[[
!
-z
"
${
ACCELERATE
}
"
]]
&&
[
${
ACCELERATE
}
=
"True"
]
&&
[
-x
"
$(
command
-v
accelerate
)
"
]
printf
"Launching launch.py..."
then
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
"
${
python_cmd
}
"
"
${
LAUNCH_SCRIPT
}
"
"
$@
"
printf
"Accelerating launch.py..."
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
accelerate launch
--num_cpu_threads_per_process
=
6
"
${
LAUNCH_SCRIPT
}
"
"
$@
"
else
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
printf
"Launching launch.py..."
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
"
${
python_cmd
}
"
"
${
LAUNCH_SCRIPT
}
"
"
$@
"
fi
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