From 4648f1b0193b1e40fd0ffc5a0dfdbccc2874341b Mon Sep 17 00:00:00 2001 From: Disty0 Date: Sat, 30 Mar 2024 13:14:51 +0300 Subject: [PATCH] IPEX remove 1024x1024 workaround --- CHANGELOG.md | 1 + modules/processing_class.py | 15 --------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa998f8a8..c1c73826c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ - **IPEX** - update to *IPEX 2.1.20* on Linux requires removing the venv folder to update properly + - remove 1024x1024 workaround - **Fixes**: - Prompt params parser - Fix image save without metadata diff --git a/modules/processing_class.py b/modules/processing_class.py index 8440debf4..2650c81c1 100644 --- a/modules/processing_class.py +++ b/modules/processing_class.py @@ -44,9 +44,6 @@ class StableDiffusionProcessing: self.diffusers_guidance_rescale = diffusers_guidance_rescale self.sag_scale = sag_scale self.cfg_end = cfg_end - if devices.backend == "ipex" and width == 1024 and height == 1024 and not torch.xpu.has_fp64_dtype() and os.environ.get('DISABLE_IPEX_1024_WA', None) is None: - width = 1080 - height = 1080 self.width: int = width self.height: int = height self.full_quality: bool = full_quality @@ -197,18 +194,6 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): def __init__(self, enable_hr: bool = False, denoising_strength: float = 0.75, firstphase_width: int = 0, firstphase_height: int = 0, hr_scale: float = 2.0, hr_force: bool = False, hr_upscaler: str = None, hr_second_pass_steps: int = 0, hr_resize_x: int = 0, hr_resize_y: int = 0, refiner_steps: int = 5, refiner_start: float = 0, refiner_prompt: str = '', refiner_negative: str = '', **kwargs): super().__init__(**kwargs) - if devices.backend == "ipex" and not torch.xpu.has_fp64_dtype() and os.environ.get('DISABLE_IPEX_1024_WA', None) is None: - width_curse = bool(hr_resize_x == 1024 and self.height * (hr_resize_x / self.width) == 1024) - height_curse = bool(hr_resize_y == 1024 and self.width * (hr_resize_y / self.height) == 1024) - if (width_curse != height_curse) or (height_curse and width_curse): - if width_curse: - hr_resize_x = 1080 - if height_curse: - hr_resize_y = 1080 - if self.width * hr_scale == 1024 and self.height * hr_scale == 1024: - hr_scale = 1080 / self.width - if firstphase_width * hr_scale == 1024 and firstphase_height * hr_scale == 1024: - hr_scale = 1080 / firstphase_width self.enable_hr = enable_hr self.denoising_strength = denoising_strength self.hr_scale = hr_scale