Fix mask detector in GPU mode
This commit is contained in:
@@ -878,8 +878,8 @@ class GPUProcessorLogic(ProcessorLogic):
|
||||
device = mask.device
|
||||
|
||||
# Find which rows and columns have any mask content
|
||||
any_y = mask.max(dim=2).values > 0.5 # [B, H]
|
||||
any_x = mask.max(dim=1).values > 0.5 # [B, W]
|
||||
any_y = mask.max(dim=2).values > 0. # [B, H]
|
||||
any_x = mask.max(dim=1).values > 0. # [B, W]
|
||||
|
||||
def get_min_max(any_dim, size):
|
||||
indices = torch.arange(size, device=device).unsqueeze(0).expand(B, -1)
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui-inpaint-cropandstitch"
|
||||
description = "The '✂️ Inpaint Crop' and '✂️ Inpaint Stitch' nodes enable inpainting only on masked area very easily: crop the image around the masked area with the Crop node, then use any standard workflow for sampling, then connect the sampled image to the Stitch node, which will put it back in place in the original image. These nodes enable faster sampling of smaller areas and take care of downsampling and upsampling to fit specific model and resource needs."
|
||||
version = "3.0.6"
|
||||
version = "3.0.7"
|
||||
license = { file = "LICENSE" }
|
||||
|
||||
[project.urls]
|
||||
|
||||
Reference in New Issue
Block a user