From af7e8e332a34d4db94e507d8fe709d6926b5dcb8 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Sat, 1 Mar 2025 00:59:22 +0300 Subject: [PATCH 1/3] IPEX disable FP64 emulation --- installer.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/installer.py b/installer.py index fd41827b6..baed6466c 100644 --- a/installer.py +++ b/installer.py @@ -715,21 +715,26 @@ def install_ipex(torch_command): if os.environ.get("NEOReadDebugKeys", None) is None: os.environ.setdefault('NEOReadDebugKeys', '1') + if os.environ.get("ClDeviceGlobalMemSizeAvailablePercent", None) is None: os.environ.setdefault('ClDeviceGlobalMemSizeAvailablePercent', '100') + if os.environ.get("SYCL_CACHE_PERSISTENT", None) is None: os.environ.setdefault('SYCL_CACHE_PERSISTENT', '1') # Jit cache if os.environ.get("PYTORCH_ENABLE_XPU_FALLBACK", None) is None: os.environ.setdefault('PYTORCH_ENABLE_XPU_FALLBACK', '1') # CPU fallback for unsupported ops - if os.environ.get("OverrideDefaultFP64Settings", None) is None: - os.environ.setdefault('OverrideDefaultFP64Settings', '1') - if os.environ.get("IGC_EnableDPEmulation", None) is None: - os.environ.setdefault('IGC_EnableDPEmulation', '1') # FP64 Emulation + if os.environ.get('IPEX_FORCE_ATTENTION_SLICE', None) is None: # XPU PyTorch doesn't support Flash Atten or Memory Atten yet so Battlemage goes OOM without this os.environ.setdefault('IPEX_FORCE_ATTENTION_SLICE', '1') + # FP64 emulation causes random UR Errors + #if os.environ.get("OverrideDefaultFP64Settings", None) is None: + # os.environ.setdefault('OverrideDefaultFP64Settings', '1') + #if os.environ.get("IGC_EnableDPEmulation", None) is None: + # os.environ.setdefault('IGC_EnableDPEmulation', '1') # FP64 Emulation + if args.use_nightly: torch_command = os.environ.get('TORCH_COMMAND', '--pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/xpu') else: From e3b6ae93c1e33508b2bc7635c9735407894dce58 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Sun, 2 Mar 2025 11:05:13 +0300 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f15baa864..15ea41513 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log for SD.Next -## Update for 2025-02-27 +## Update for 2025-02-28 Primarily a hotfix/service release plus few UI improvements and one exciting new feature: Remote-VAE! @@ -30,7 +30,8 @@ Primarily a hotfix/service release plus few UI improvements and one exciting new - infotext parser force delimiter before params - handle pipeline class switch errors - improve extensions options compatibility - - fix flux on ipex + - fix flux on ipex + - disable fp64 emulation on ipex ## Update for 2025-02-18 From c88dd0f12dd8674f5d800ee6bf1bf5dfe5161866 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Sun, 2 Mar 2025 11:09:19 +0300 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15ea41513..0387a0b55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,7 +30,7 @@ Primarily a hotfix/service release plus few UI improvements and one exciting new - infotext parser force delimiter before params - handle pipeline class switch errors - improve extensions options compatibility - - fix flux on ipex + - fix flux on ipex - disable fp64 emulation on ipex ## Update for 2025-02-18