mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-25 20:31:33 +02:00
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 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%
|
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
|
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%
|
cd %suggested_dir%
|
||||||
)
|
)
|
@ -3,11 +3,12 @@ import json
|
|||||||
|
|
||||||
# config
|
# config
|
||||||
PROJECT_REPO_URL = 'https://github.com/cmdr2/stable-diffusion-ui.git'
|
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'
|
PROJECT_REPO_DIR_NAME = 'project_repo'
|
||||||
STABLE_DIFFUSION_REPO_DIR_NAME = 'stable-diffusion'
|
STABLE_DIFFUSION_REPO_DIR_NAME = 'stable-diffusion'
|
||||||
|
|
||||||
|
START_CMD_FILE_NAME = os.environ['START_CMD_FILENAME']
|
||||||
LOG_FILE_NAME = 'run.log'
|
LOG_FILE_NAME = 'run.log'
|
||||||
CONFIG_FILE_NAME = 'config.json'
|
CONFIG_FILE_NAME = 'config.json'
|
||||||
|
|
||||||
|
@ -1,17 +1,26 @@
|
|||||||
from os import path
|
from os import path
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
from installer import app, helpers
|
from installer import app
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
is_developer_mode = app.config.get('is_developer_mode', False)
|
is_developer_mode = app.config.get('is_developer_mode', False)
|
||||||
if not is_developer_mode:
|
if is_developer_mode:
|
||||||
# @xcopy sd-ui-files\ui ui /s /i /Y
|
return
|
||||||
# @copy sd-ui-files\scripts\on_sd_start.bat scripts\ /Y
|
|
||||||
# @copy "sd-ui-files\scripts\Start Stable Diffusion UI.cmd" . /Y
|
|
||||||
|
|
||||||
installer_src_path = path.join(app.project_repo_dir_path, 'installer')
|
installer_src_path = path.join(app.project_repo_dir_path, 'installer')
|
||||||
ui_src_path = path.join(app.project_repo_dir_path, 'ui')
|
ui_src_path = path.join(app.project_repo_dir_path, 'ui')
|
||||||
engine_src_path = path.join(app.project_repo_dir_path, 'engine')
|
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…
x
Reference in New Issue
Block a user