charleselena
commited on
add float32
Browse files- handler.py +3 -1
handler.py
CHANGED
@@ -20,8 +20,10 @@ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
20 |
if device.type != 'cuda':
|
21 |
raise ValueError("need to run on GPU")
|
22 |
# set mixed precision dtype
|
23 |
-
dtype = torch.bfloat16 if torch.cuda.get_device_capability()[0] == 8 else torch.float16
|
24 |
|
|
|
|
|
25 |
# controlnet mapping for controlnet id and control hinter
|
26 |
CONTROLNET_MAPPING = {
|
27 |
"canny_edge": {
|
|
|
20 |
if device.type != 'cuda':
|
21 |
raise ValueError("need to run on GPU")
|
22 |
# set mixed precision dtype
|
23 |
+
#dtype = torch.bfloat16 if torch.cuda.get_device_capability()[0] == 8 else torch.float16
|
24 |
|
25 |
+
dtype = torch.float32
|
26 |
+
|
27 |
# controlnet mapping for controlnet id and control hinter
|
28 |
CONTROLNET_MAPPING = {
|
29 |
"canny_edge": {
|