From 3253768f7933ad65fe41cb68b5450dce72fcaa40 Mon Sep 17 00:00:00 2001 From: Luis Quesada Date: Fri, 13 Feb 2026 10:24:30 +0100 Subject: [PATCH] Fix mask detector in GPU mode --- inpaint_cropandstitch.py | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inpaint_cropandstitch.py b/inpaint_cropandstitch.py index 50a0499..d02ad70 100644 --- a/inpaint_cropandstitch.py +++ b/inpaint_cropandstitch.py @@ -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) diff --git a/pyproject.toml b/pyproject.toml index f7e033a..362efde 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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]