Spaces:
Runtime error
Runtime error
update.
Browse files
web-demos/hugging_face/inpainter/base_inpainter.py
CHANGED
|
@@ -164,6 +164,8 @@ class ProInpainter:
|
|
| 164 |
def __init__(self, propainter_checkpoint, raft_checkpoint, flow_completion_checkpoint, device="cuda:0", use_half=True):
|
| 165 |
self.device = device
|
| 166 |
self.use_half = use_half
|
|
|
|
|
|
|
| 167 |
|
| 168 |
##############################################
|
| 169 |
# set up RAFT and flow competition model
|
|
|
|
| 164 |
def __init__(self, propainter_checkpoint, raft_checkpoint, flow_completion_checkpoint, device="cuda:0", use_half=True):
|
| 165 |
self.device = device
|
| 166 |
self.use_half = use_half
|
| 167 |
+
if self.device == torch.device('cpu'):
|
| 168 |
+
self.use_half = False
|
| 169 |
|
| 170 |
##############################################
|
| 171 |
# set up RAFT and flow competition model
|