mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-25 22:00:19 +08:00
Merge branch 'comfyanonymous:master' into master
This commit is contained in:
commit
1678ea8f9c
@ -41,6 +41,8 @@ def manual_stochastic_round_to_float8(x, dtype, generator=None):
|
|||||||
(2.0 ** (-EXPONENT_BIAS + 1)) * abs_x
|
(2.0 ** (-EXPONENT_BIAS + 1)) * abs_x
|
||||||
)
|
)
|
||||||
|
|
||||||
|
inf = torch.finfo(dtype)
|
||||||
|
torch.clamp(sign, min=inf.min, max=inf.max, out=sign)
|
||||||
return sign
|
return sign
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user