Commit 9abc7bbe authored by dmMaze's avatar dmMaze
Browse files

enable inpaint by block for cuda #262

parent 7dcc1778
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -161,7 +161,6 @@ class AOTInpainter(InpainterBase):
        else:
            self.model = AOTMODEL
            self.model.to(self.device)
        self.inpaint_by_block = self.device not in GPUINTENSIVE_SET
        self.inpaint_size = int(self.params['inpaint_size']['select'])

    def inpaint_preprocess(self, img: np.ndarray, mask: np.ndarray) -> np.ndarray:
@@ -219,7 +218,6 @@ class AOTInpainter(InpainterBase):
            param_device = self.params['device']['select']
            self.model.to(param_device)
            self.device = param_device
            self.inpaint_by_block = param_device not in GPUINTENSIVE_SET

        elif param_key == 'inpaint_size':
            self.inpaint_size = int(self.params['inpaint_size']['select'])
@@ -255,7 +253,6 @@ class LamaInpainterMPE(InpainterBase):
        else:
            self.model = LAMA_MPE
            self.model.to(self.device)
        self.inpaint_by_block = self.device not in GPUINTENSIVE_SET
        self.inpaint_size = int(self.params['inpaint_size']['select'])

    def inpaint_preprocess(self, img: np.ndarray, mask: np.ndarray) -> np.ndarray:
@@ -320,7 +317,6 @@ class LamaInpainterMPE(InpainterBase):
            param_device = self.params['device']['select']
            self.model.to(param_device)
            self.device = param_device
            self.inpaint_by_block = param_device not in GPUINTENSIVE_SET

        elif param_key == 'inpaint_size':
            self.inpaint_size = int(self.params['inpaint_size']['select'])