From 86894b8249cac7a0c0fd8eef2cb611f9be40319e Mon Sep 17 00:00:00 2001 From: Disty0 Date: Mon, 11 Dec 2023 19:29:55 +0300 Subject: [PATCH] Remove Intel ARC 1024x1024 workaround from OpenVINO --- modules/processing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/processing.py b/modules/processing.py index 7c62c446d..2eca014ce 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -145,7 +145,7 @@ class StableDiffusionProcessing: self.cfg_scale: float = cfg_scale self.image_cfg_scale = image_cfg_scale self.diffusers_guidance_rescale = diffusers_guidance_rescale - if (devices.backend == "ipex" or shared.cmd_opts.use_openvino) and width == 1024 and height == 1024: + if devices.backend == "ipex" and width == 1024 and height == 1024: width = 1080 height = 1080 self.width: int = width @@ -762,7 +762,7 @@ def validate_sample(tensor): elif isinstance(tensor, np.ndarray): sample = tensor else: - shared.log.warning(f'Unknown sample type: {type(tensor)}') + shared.log.warning(f'Unknown sample type: {type(tensor)}') sample = 255.0 * np.moveaxis(sample, 0, 2) if shared.backend == shared.Backend.ORIGINAL else 255.0 * sample with warnings.catch_warnings(record=True) as w: cast = sample.astype(np.uint8) @@ -1014,7 +1014,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" or shared.cmd_opts.use_openvino: + if devices.backend == "ipex": 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):