mirror of
https://github.com/vladmandic/automatic
synced 2026-09-09 06:18:43 +02:00
Remove broken ipex auto detection
This commit is contained in:
+1
-1
@@ -261,7 +261,7 @@ def check_torch():
|
||||
os.environ.setdefault('PYTORCH_HIP_ALLOC_CONF', 'garbage_collection_threshold:0.9,max_split_size_mb:512')
|
||||
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.0.0 torchvision==0.15.1 --index-url https://download.pytorch.org/whl/rocm5.4.2')
|
||||
xformers_package = os.environ.get('XFORMERS_PACKAGE', 'none')
|
||||
elif allow_ipex and (shutil.which('sycl-ls') is not None or os.path.exists('/opt/intel/oneapi') or args.use_ipex):
|
||||
elif allow_ipex and args.use_ipex and shutil.which('sycl-ls') is not None:
|
||||
log.info('Intel OneAPI Toolkit detected')
|
||||
torch_command = os.environ.get('TORCH_COMMAND', 'torch==1.13.0a0 torchvision==0.14.1a0 intel_extension_for_pytorch==1.13.120+xpu -f https://developer.intel.com/ipex-whl-stable-xpu')
|
||||
xformers_package = os.environ.get('XFORMERS_PACKAGE', 'none')
|
||||
|
||||
@@ -81,10 +81,15 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$@" == *"--use-ipex"* ]]
|
||||
#Set OneAPI environmet if it's not set by the user
|
||||
if [[ "$@" == *"--use-ipex"* ]] && ! [ -x "$(command -v sycl-ls)" ]
|
||||
then
|
||||
echo "Setting OneAPI enviroment"
|
||||
source /opt/intel/oneapi/setvars.sh
|
||||
echo "Setting OneAPI environment"
|
||||
if [[ -z "$ONEAPI_ROOT" ]]
|
||||
then
|
||||
ONEAPI_ROOT=/opt/intel/oneapi
|
||||
fi
|
||||
source $ONEAPI_ROOT/setvars.sh
|
||||
fi
|
||||
|
||||
if [[ ! -z "${ACCELERATE}" ]] && [ ${ACCELERATE}="True" ] && [ -x "$(command -v accelerate)" ]
|
||||
|
||||
Reference in New Issue
Block a user