Skip to content

Commit

Permalink
Merge pull request #80 from houseofsecrets/develop
Browse files Browse the repository at this point in the history
Updated img2img start scripts with the --source argument
  • Loading branch information
Danamir authored Nov 11, 2023
2 parents 23e4926 + b05b2c1 commit 097b8da
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Start_img2img.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ REM Activate the virtual environment
call venv/Scripts/activate.bat

set "var=%~1"
if "!var!" == "" set "var=#"

REM Install required packages
pip install -r requirements.txt

REM Run the script

python SdPaint.py --img2img "!var!"
python SdPaint.py --img2img --source "!var!"

REM Deactivate the virtual environment
deactivate
13 changes: 11 additions & 2 deletions start-img2img.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@

[ -d venv ] || python -m venv venv

source ./venv/bin/activate
if [[ -d ./venv/Scripts/ ]]; then
source ./venv/Scripts/activate
else
source ./venv/bin/activate
fi

SOURCE="${@}"
if [[ -z "${SOURCE}" ]]; then
SOURCE="#"
fi

pip install -r requirements.txt

python SdPaint.py --img2img "$@"
python SdPaint.py --img2img --source "${SOURCE}"

deactivate

0 comments on commit 097b8da

Please sign in to comment.