Skip to content

Commit

Permalink
Updated windows installation scripts removed micromamba
Browse files Browse the repository at this point in the history
  • Loading branch information
rupeshs committed Oct 31, 2023
1 parent fc1e798 commit 3e1efb4
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 9 deletions.
31 changes: 28 additions & 3 deletions install.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
rem Part of DiffusionMagic - Script to install DiffusionMagic
%~dp0tools\windows\micromamba.exe -r %~dp0env create -y -f %~dp0environment.yml
echo DiffusionMagic installation completed.

@echo off
setlocal
echo Starting DiffusionMagic env installation...

set "PYTHON_COMMAND=python"

call python --version > nul 2>&1
if %errorlevel% equ 0 (
echo Python command check :OK
) else (
echo "Error: Python command not found,please install Python(Recommended : Python 3.10 or Python 3.11) and try again."
pause
exit /b 1

)

:check_python_version
for /f "tokens=2" %%I in ('%PYTHON_COMMAND% --version 2^>^&1') do (
set "python_version=%%I"
)

echo Python version: %python_version%

%PYTHON_COMMAND% -m venv "%~dp0env"
call "%~dp0env\Scripts\activate.bat" && pip install torch==2.0.1 torchvision==0.15.2 --index-url https://download.pytorch.org/whl/cu117
call "%~dp0env\Scripts\activate.bat" && pip install -r "%~dp0requirements.txt"
echo DiffusionMagic env installation completed.
pause
2 changes: 1 addition & 1 deletion src/constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = "3.5.0"
VERSION = "3.6.0"
STABLE_DIFFUSION_MODELS_FILE = "stable_diffusion_models.txt"
APP_SETTINGS_FILE = "settings.yaml"
CONFIG_DIRECTORY = "configs"
Expand Down
26 changes: 21 additions & 5 deletions start.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
@echo off
rem Part of DiffusionMagic - Script to Start DiffusionMagic
echo Starting DiffusionMagic please wait...
cd %~dp0env\condabin\
call activate.bat
micromamba activate %~dp0env\envs\diffusionmagic-env && python %~dp0src\app.py
setlocal
echo Starting DiffusionMagic...

set "PYTHON_COMMAND=python"

call python --version > nul 2>&1
if %errorlevel% equ 0 (
echo Python command check :OK
) else (
echo "Error: Python command not found, please install Python (Recommended : Python 3.10 or Python 3.11) and try again"
pause
exit /b 1

)

:check_python_version
for /f "tokens=2" %%I in ('%PYTHON_COMMAND% --version 2^>^&1') do (
set "python_version=%%I"
)

echo Python version: %python_version%
call "%~dp0env\Scripts\activate.bat" && %PYTHON_COMMAND% "%~dp0\src\app.py"
Binary file removed tools/windows/micromamba.exe
Binary file not shown.

0 comments on commit 3e1efb4

Please sign in to comment.