We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 518c0dc commit 73e3a9eCopy full SHA for 73e3a9e
comfy/float.py
@@ -41,6 +41,8 @@ def manual_stochastic_round_to_float8(x, dtype, generator=None):
41
(2.0 ** (-EXPONENT_BIAS + 1)) * abs_x
42
)
43
44
+ inf = torch.finfo(dtype)
45
+ torch.clamp(sign, min=inf.min, max=inf.max, out=sign)
46
return sign
47
48
0 commit comments