Skip to content

Commit

Permalink
Merge pull request #61 from AUTOMATIC1111/master
Browse files Browse the repository at this point in the history
merge from upstream
  • Loading branch information
vladmandic committed Mar 26, 2023
2 parents 6c50798 + 64da5c4 commit 6a4bc9a
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions scripts/loopback.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,12 @@ def calculate_denoising_strength(loop):
return strength

progress = loop / (loops - 1)
match denoising_curve:
case "Aggressive":
strength = math.sin((progress) * math.pi * 0.5)

case "Lazy":
strength = 1 - math.cos((progress) * math.pi * 0.5)

case _:
strength = progress
if denoising_curve == "Aggressive":
strength = math.sin((progress) * math.pi * 0.5)
elif denoising_curve == "Lazy":
strength = 1 - math.cos((progress) * math.pi * 0.5)
else:
strength = progress

change = (final_denoising_strength - initial_denoising_strength) * strength
return initial_denoising_strength + change
Expand Down

0 comments on commit 6a4bc9a

Please sign in to comment.