loopback.py Colab compatibility and bug fix
This code (suggested by @abvgdeabvgde2 ) literally does the same thing and it does not break with Python 3.9, making it helpful for Google Colab users (me included). fixes #8927 Also a partial fix for #8902 but it does not resolve the unresponsive UI problem faced by @Archon332
This commit is contained in:
parent
91ae48fd7e
commit
5c7ab90a4e
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue