Change clamp on CAS

This commit is contained in:
Clybius
2023-11-20 04:42:31 -06:00
parent eda11957af
commit 52c6281c9c
+1 -1
View File
@@ -50,7 +50,7 @@ def contrast_adaptive_sharpening(image, amount):
# scaling
amp = torch.copysign(torch.sqrt(torch.abs(amp)), amp)
w = - amp * (amount * (1/5 - 1/8) + 1/8)
div = torch.reciprocal(1 + 4*w).clamp(-1, 1)
div = torch.reciprocal(1 + 4*w).clamp(-10, 10)
output = ((b + d + f + h)*w + e) * div
output = torch.nan_to_num(output)