Merge branch 'master' into img2img-enhance

This commit is contained in:
space-nuko
2023-03-28 10:59:12 -04:00
committed by GitHub
20 changed files with 389 additions and 139 deletions

View File

@@ -54,15 +54,12 @@ class Script(scripts.Script):
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