Skip to content

Commit

Permalink
Merge pull request #1662 from Disty0/dev2
Browse files Browse the repository at this point in the history
Add STARTUP_CMD env var and IPEXRUN support to gui.sh
  • Loading branch information
bmaltais authored Nov 11, 2023
2 parents 1fc8b54 + 4451948 commit 609e184
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,23 @@ then
fi
export NEOReadDebugKeys=1
export ClDeviceGlobalMemSizeAvailablePercent=100
if [[ -z "$STARTUP_CMD" ]] && [[ -z "$DISABLE_IPEXRUN" ]] && [ -x "$(command -v ipexrun)" ]
then
STARTUP_CMD=ipexrun
if [[ -z "$STARTUP_CMD_ARGS" ]]
then
STARTUP_CMD_ARGS="--multi-task-manager taskset --memory-allocator jemalloc"
fi
fi
fi

#Set STARTUP_CMD as normal python if not specified
if [[ -z "$STARTUP_CMD" ]]
then
STARTUP_CMD=python
fi

# Validate the requirements and run the script if successful
if python "$SCRIPT_DIR/setup/validate_requirements.py" -r "$REQUIREMENTS_FILE"; then
python "$SCRIPT_DIR/kohya_gui.py" "$@"
"${STARTUP_CMD}" $STARTUP_CMD_ARGS "$SCRIPT_DIR/kohya_gui.py" "$@"
fi

0 comments on commit 609e184

Please sign in to comment.