fix: invalid empty mask size

related issue:
https://github.com/ltdrdata/ComfyUI-Impact-Pack/issues/433
This commit is contained in:
Dr.Lt.Data
2024-01-15 14:22:12 +09:00
parent b9eb80f599
commit 6183c00b95
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ import configparser
import os
version_code = [4, 66, 2]
version_code = [4, 66, 3]
version = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')
dependency_version = 20
+1 -1
View File
@@ -607,7 +607,7 @@ def make_sam_mask(sam_model, segs, image, detection_hint, dilation,
mask = dilate_mask(mask.cpu().numpy(), dilation)
mask = torch.from_numpy(mask)
else:
size = image.shape[0] // 8, image.shape[1] // 8
size = image.shape[0], image.shape[1]
mask = torch.zeros(size, dtype=torch.float32, device="cpu") # empty mask
mask = utils.make_3d_mask(mask)