From 0b6005570275ff53db74d3add8946b93b7314a15 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 9 Nov 2023 16:26:20 -0500 Subject: [PATCH] add brackets --- modules/processing_diffusers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/processing_diffusers.py b/modules/processing_diffusers.py index f401a7b0a..a2d650ca7 100644 --- a/modules/processing_diffusers.py +++ b/modules/processing_diffusers.py @@ -384,22 +384,22 @@ def process_diffusers(p: StableDiffusionProcessing, seeds, prompts, negative_pro def calculate_base_steps(): steps = p.steps if use_refiner_start: - steps = p.steps // (1.0 - p.refiner_start) if shared.sd_model_type == 'sdxl' else p.steps + steps = (p.steps // (1.0 - p.refiner_start)) if shared.sd_model_type == 'sdxl' else p.steps if os.environ.get('SD_STEPS_DEBUG', None) is not None: shared.log.debug(f'Steps: type=base input={p.steps} output={steps} refiner={use_refiner_start}') return int(steps) def calculate_hires_steps(): - steps = p.hr_second_pass_steps * p.denoising_strength if p.hr_second_pass_steps > 0 else p.steps * p.denoising_strength + steps = (p.hr_second_pass_steps * p.denoising_strength) if p.hr_second_pass_steps > 0 else (p.steps * p.denoising_strength) if os.environ.get('SD_STEPS_DEBUG', None) is not None: shared.log.debug(f'Steps: type=hires input={p.hr_second_pass_steps} output={steps} denoise={p.denoising_strength}') return int(steps) def calculate_refiner_steps(): if p.refiner_start > 0 and p.refiner_start < 1: - steps = p.refiner_steps // p.refiner_start if p.refiner_steps > 0 else p.steps // p.refiner_start + steps = (p.refiner_steps // p.refiner_start) if p.refiner_steps > 0 else (p.steps // p.refiner_start) else: - steps = p.denoising_strength * p.refiner_steps if p.refiner_steps > 0 else p.denoising_strength * p.steps + steps = (p.denoising_strength * p.refiner_steps) if p.refiner_steps > 0 else (p.denoising_strength * p.steps) if os.environ.get('SD_STEPS_DEBUG', None) is not None: shared.log.debug(f'Steps: type=refiner input={p.refiner_steps} output={steps} start={p.refiner_start} denoise={p.denoising_strength}') return int(steps)