File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- rem Part of DiffusionMagic - Script to install DiffusionMagic
2- %~dp0 tools\windows\micromamba.exe -r %~dp0 env create -y -f %~dp0 environment.yml
3- echo DiffusionMagic installation completed.
1+
2+ @ echo off
3+ setlocal
4+ echo Starting DiffusionMagic env installation...
5+
6+ set " PYTHON_COMMAND = python"
7+
8+ call python --version > nul 2 >& 1
9+ if %errorlevel% equ 0 (
10+ echo Python command check :OK
11+ ) else (
12+ echo " Error: Python command not found,please install Python(Recommended : Python 3.10 or Python 3.11) and try again."
13+ pause
14+ exit /b 1
15+
16+ )
17+
18+ :check_python_version
19+ for /f " tokens=2" %%I in ('%PYTHON_COMMAND% --version 2^ > ^ &1') do (
20+ set " python_version = %%I "
21+ )
22+
23+ echo Python version: %python_version%
24+
25+ %PYTHON_COMMAND% -m venv " %~dp0 env"
26+ call " %~dp0 env\Scripts\activate.bat" && pip install torch== 2.0.1 torchvision== 0.15.2 --index-url https://download.pytorch.org/whl/cu117
27+ call " %~dp0 env\Scripts\activate.bat" && pip install -r " %~dp0 requirements.txt"
28+ echo DiffusionMagic env installation completed.
429pause
Original file line number Diff line number Diff line change 1- VERSION = "3.5 .0"
1+ VERSION = "3.6 .0"
22STABLE_DIFFUSION_MODELS_FILE = "stable_diffusion_models.txt"
33APP_SETTINGS_FILE = "settings.yaml"
44CONFIG_DIRECTORY = "configs"
Original file line number Diff line number Diff line change 11@ echo off
2- rem Part of DiffusionMagic - Script to Start DiffusionMagic
3- echo Starting DiffusionMagic please wait...
4- cd %~dp0 env\condabin\
5- call activate.bat
6- micromamba activate %~dp0 env\envs\diffusionmagic-env && python %~dp0 src\app.py
2+ setlocal
3+ echo Starting DiffusionMagic...
74
5+ set " PYTHON_COMMAND = python"
6+
7+ call python --version > nul 2 >& 1
8+ if %errorlevel% equ 0 (
9+ echo Python command check :OK
10+ ) else (
11+ echo " Error: Python command not found, please install Python (Recommended : Python 3.10 or Python 3.11) and try again"
12+ pause
13+ exit /b 1
14+
15+ )
16+
17+ :check_python_version
18+ for /f " tokens=2" %%I in ('%PYTHON_COMMAND% --version 2^ > ^ &1') do (
19+ set " python_version = %%I "
20+ )
21+
22+ echo Python version: %python_version%
23+ call " %~dp0 env\Scripts\activate.bat" && %PYTHON_COMMAND% " %~dp0 \src\app.py"
You can’t perform that action at this time.
0 commit comments