forked from extern/easydiffusion
Start cmd
This commit is contained in:
parent
d07279c266
commit
3a7e4390eb
@ -4,7 +4,7 @@ echo. & echo "Stable Diffusion UI - v2.5" & echo.
|
||||
|
||||
set PATH=C:\Windows\System32;%PATH%
|
||||
|
||||
set RUN_CMD_FILENAME="Start Stable Diffusion UI.cmd"
|
||||
set START_CMD_FILENAME="Start Stable Diffusion UI.cmd"
|
||||
|
||||
set SD_BASE_DIR=%cd%
|
||||
|
||||
|
@ -13,7 +13,7 @@ if /i "%answer:~,1%" NEQ "c" (
|
||||
)
|
||||
|
||||
xcopy "%SD_BASE_DIR%" "%suggested_dir%" /s /i /Y /Q
|
||||
echo Please run the %RUN_CMD_FILENAME% file inside %suggested_dir% . Do not use this folder anymore > "%SD_BASE_DIR%/READ_ME - DO_NOT_USE_THIS_FOLDER.txt"
|
||||
echo Please run the %START_CMD_FILENAME% file inside %suggested_dir% . Do not use this folder anymore > "%SD_BASE_DIR%/READ_ME - DO_NOT_USE_THIS_FOLDER.txt"
|
||||
|
||||
cd %suggested_dir%
|
||||
)
|
@ -3,11 +3,12 @@ import json
|
||||
|
||||
# config
|
||||
PROJECT_REPO_URL = 'https://github.com/cmdr2/stable-diffusion-ui.git'
|
||||
DEFAULT_UPDATE_BRANCH = 'main'
|
||||
DEFAULT_UPDATE_BRANCH = 'installer_new'
|
||||
|
||||
PROJECT_REPO_DIR_NAME = 'project_repo'
|
||||
STABLE_DIFFUSION_REPO_DIR_NAME = 'stable-diffusion'
|
||||
|
||||
START_CMD_FILE_NAME = os.environ['START_CMD_FILENAME']
|
||||
LOG_FILE_NAME = 'run.log'
|
||||
CONFIG_FILE_NAME = 'config.json'
|
||||
|
||||
|
@ -1,17 +1,26 @@
|
||||
from os import path
|
||||
import shutil
|
||||
|
||||
from installer import app, helpers
|
||||
from installer import app
|
||||
|
||||
def run():
|
||||
is_developer_mode = app.config.get('is_developer_mode', False)
|
||||
if not is_developer_mode:
|
||||
# @xcopy sd-ui-files\ui ui /s /i /Y
|
||||
# @copy sd-ui-files\scripts\on_sd_start.bat scripts\ /Y
|
||||
# @copy "sd-ui-files\scripts\Start Stable Diffusion UI.cmd" . /Y
|
||||
if is_developer_mode:
|
||||
return
|
||||
|
||||
installer_src_path = path.join(app.project_repo_dir_path, 'installer')
|
||||
ui_src_path = path.join(app.project_repo_dir_path, 'ui')
|
||||
engine_src_path = path.join(app.project_repo_dir_path, 'engine')
|
||||
installer_src_path = path.join(app.project_repo_dir_path, 'installer')
|
||||
ui_src_path = path.join(app.project_repo_dir_path, 'ui')
|
||||
engine_src_path = path.join(app.project_repo_dir_path, 'engine')
|
||||
|
||||
shutil.copytree(ui_src_path, app.ui_dir_path, dirs_exist_ok=True)
|
||||
start_cmd_src_path = path.join(app.project_repo_dir_path, app.START_CMD_FILE_NAME)
|
||||
start_cmd_dst_path = path.join(app.SD_BASE_DIR, app.START_CMD_FILE_NAME)
|
||||
|
||||
shutil.rmtree(app.installer_dir_path, ignore_errors=True)
|
||||
shutil.rmtree(app.ui_dir_path, ignore_errors=True)
|
||||
shutil.rmtree(app.engine_dir_path, ignore_errors=True)
|
||||
|
||||
shutil.copytree(installer_src_path, app.installer_dir_path, dirs_exist_ok=True)
|
||||
shutil.copytree(ui_src_path, app.ui_dir_path, dirs_exist_ok=True)
|
||||
shutil.copytree(engine_src_path, app.engine_dir_path, dirs_exist_ok=True)
|
||||
|
||||
shutil.copy(start_cmd_src_path, start_cmd_dst_path)
|
||||
|
Loading…
Reference in New Issue
Block a user