Spaces:
Runtime error
Runtime error
cocktailpeanut
commited on
Commit
•
b97e44f
1
Parent(s):
13d3a21
update
Browse files- tokenflow_pnp.py +1 -2
tokenflow_pnp.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
import torch
|
2 |
import glob
|
3 |
import os
|
4 |
import numpy as np
|
@@ -28,7 +27,7 @@ elif torch.backends.mps.is_available():
|
|
28 |
device = "mps"
|
29 |
else:
|
30 |
device = "cpu"
|
31 |
-
to = torch.float16 if
|
32 |
|
33 |
class TokenFlow(nn.Module):
|
34 |
def __init__(self, config,
|
|
|
|
|
1 |
import glob
|
2 |
import os
|
3 |
import numpy as np
|
|
|
27 |
device = "mps"
|
28 |
else:
|
29 |
device = "cpu"
|
30 |
+
to = torch.float16 if device == 'cuda' else torch.float32
|
31 |
|
32 |
class TokenFlow(nn.Module):
|
33 |
def __init__(self, config,
|