IPEX fixes

This commit is contained in:
Disty0
2023-12-19 22:34:43 +03:00
parent 1ec2b0e4c6
commit 1eacfc5129
4 changed files with 8 additions and 4 deletions
+2 -2
View File
@@ -148,7 +148,7 @@ class StableDiffusionProcessing:
self.scale_by: float = scale_by
self.image_cfg_scale = image_cfg_scale
self.diffusers_guidance_rescale = diffusers_guidance_rescale
if devices.backend == "ipex" and width == 1024 and height == 1024:
if devices.backend == "ipex" and width == 1024 and height == 1024 and os.environ.get('DISABLE_IPEX_1024_WA', None) is None:
width = 1080
height = 1080
self.width: int = width
@@ -1037,7 +1037,7 @@ 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":
if devices.backend == "ipex" 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):