Commit 64da5c46 authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub

Merge pull request #8931 from LipeCarmel/patch-1

loopback.py Colab compatibility and bug fix
parents a0d07fb5 5c7ab90a
...@@ -54,15 +54,12 @@ class Script(scripts.Script): ...@@ -54,15 +54,12 @@ class Script(scripts.Script):
return strength return strength
progress = loop / (loops - 1) progress = loop / (loops - 1)
match denoising_curve: if denoising_curve == "Aggressive":
case "Aggressive": strength = math.sin((progress) * math.pi * 0.5)
strength = math.sin((progress) * math.pi * 0.5) elif denoising_curve == "Lazy":
strength = 1 - math.cos((progress) * math.pi * 0.5)
case "Lazy": else:
strength = 1 - math.cos((progress) * math.pi * 0.5) strength = progress
case _:
strength = progress
change = (final_denoising_strength - initial_denoising_strength) * strength change = (final_denoising_strength - initial_denoising_strength) * strength
return initial_denoising_strength + change return initial_denoising_strength + change
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment