File size: 1,421 Bytes
0463d50 88695a8 1561245 88695a8 7c519cb 1561245 88695a8 1561245 88695a8 1561245 88695a8 f32f338 84f86b6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
from modules import launch_utils
import os
args = launch_utils.args
python = launch_utils.python
git = launch_utils.git
index_url = launch_utils.index_url
dir_repos = launch_utils.dir_repos
commit_hash = launch_utils.commit_hash
git_tag = launch_utils.git_tag
run = launch_utils.run
is_installed = launch_utils.is_installed
repo_dir = launch_utils.repo_dir
run_pip = launch_utils.run_pip
check_run_python = launch_utils.check_run_python
git_clone = launch_utils.git_clone
git_pull_recursive = launch_utils.git_pull_recursive
list_extensions = launch_utils.list_extensions
run_extension_installer = launch_utils.run_extension_installer
prepare_environment = launch_utils.prepare_environment
configure_for_tests = launch_utils.configure_for_tests
start = launch_utils.start
def main():
if not args.skip_prepare_environment:
prepare_environment()
# 这里我用了一个特殊的参数/dev/null,它会把所有的输出都丢弃掉,相当于不输出任何东西
os.system(f"sed -i -e 's/dict()))/dict())).cuda()/g' {util_py_path} > /dev/null")
os.system(f"sed -i -e 's/stable/dict()))/dict())).cuda()/g' /bushu/ui/repositories/diffusion-stability-stable/ldm/util.py > /dev/null")
if args.test_server:
configure_for_tests()
# 这里我也用了/dev/null,把start函数的输出都忽略掉了
start() > /dev/null
if __name__ == "__main__":
main()
|