Skip to content

Commit

Permalink
fix: correctly calculate refiner switch when overwrite_switch is > 0 (l…
Browse files Browse the repository at this point in the history
…llyasviel#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
  • Loading branch information
mashb1t committed Feb 11, 2024
1 parent 074b655 commit f4a8bf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/async_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,11 @@ def handler(async_task):
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

Expand Down

0 comments on commit f4a8bf2

Please sign in to comment.