Update comfy/float.py
Browse files- comfy/float.py +1 -1
comfy/float.py
CHANGED
|
@@ -62,7 +62,7 @@ def stochastic_rounding(value, dtype, seed=0):
|
|
| 62 |
slice_size = max(1, round(value.shape[0] / num_slices))
|
| 63 |
with torch.no_grad():
|
| 64 |
for i in range(0, value.shape[0], slice_size):
|
| 65 |
-
output[i:i+slice_size].copy_(manual_stochastic_round_to_float8(value[i:i+slice_size], dtype
|
| 66 |
return output
|
| 67 |
|
| 68 |
return value.to(dtype=dtype)
|
|
|
|
| 62 |
slice_size = max(1, round(value.shape[0] / num_slices))
|
| 63 |
with torch.no_grad():
|
| 64 |
for i in range(0, value.shape[0], slice_size):
|
| 65 |
+
output[i:i+slice_size].copy_(manual_stochastic_round_to_float8(value[i:i+slice_size], dtype))
|
| 66 |
return output
|
| 67 |
|
| 68 |
return value.to(dtype=dtype)
|