Spaces:
Running
on
Zero
Running
on
Zero
Update comfy/float.py
Browse files- comfy/float.py +1 -1
comfy/float.py
CHANGED
@@ -55,7 +55,7 @@ def stochastic_rounding(value, dtype, seed=0):
|
|
55 |
if dtype == torch.bfloat16:
|
56 |
return value.to(dtype=torch.bfloat16)
|
57 |
if dtype == torch.float8_e4m3fn or dtype == torch.float8_e5m2:
|
58 |
-
generator = torch.Generator(device=
|
59 |
generator.manual_seed(seed)
|
60 |
output = torch.empty_like(value, dtype=dtype)
|
61 |
num_slices = max(1, (value.numel() / (4096 * 4096)))
|
|
|
55 |
if dtype == torch.bfloat16:
|
56 |
return value.to(dtype=torch.bfloat16)
|
57 |
if dtype == torch.float8_e4m3fn or dtype == torch.float8_e5m2:
|
58 |
+
generator = torch.Generator(device='cpu')
|
59 |
generator.manual_seed(seed)
|
60 |
output = torch.empty_like(value, dtype=dtype)
|
61 |
num_slices = max(1, (value.numel() / (4096 * 4096)))
|