From f4a8bf24cf33c8315101b67098298118eacbe572 Mon Sep 17 00:00:00 2001 From: Manuel Schmid Date: Sun, 11 Feb 2024 15:12:41 +0100 Subject: [PATCH] fix: correctly calculate refiner switch when overwrite_switch is > 0 (#2165) When using custom steps, the calculation of switching timing is wrong. Now it is modified to calculate "steps x timing" after custom steps are used. By @xhoxye --- modules/async_worker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/async_worker.py b/modules/async_worker.py index 67c2e707..40abb7fa 100644 --- a/modules/async_worker.py +++ b/modules/async_worker.py @@ -335,11 +335,11 @@ def worker(): ip_adapter.load_ip_adapter(clip_vision_path, ip_negative_path, ip_adapter_path) ip_adapter.load_ip_adapter(clip_vision_path, ip_negative_path, ip_adapter_face_path) - switch = int(round(steps * refiner_switch)) - if advanced_parameters.overwrite_step > 0: steps = advanced_parameters.overwrite_step + switch = int(round(steps * refiner_switch)) + if advanced_parameters.overwrite_switch > 0: switch = advanced_parameters.overwrite_switch