neverbiasu / ComfyUI-SAM2

A ComfyUI extension for Segment-Anything 2
47 stars 9 forks source link

please push the fixes for a few bugs: #13

Open donlee1 opened 1 month ago

donlee1 commented 1 month ago

bug 1: "axes don't match array" issue:

@Yuliuchengyin You should delete the squeeze(0) in SAM2ImagePredictor.predict (line 280 - line 282 in ComfyUI-SAM2/sam2/sam2_image_predictor.py). Then it will works!

bug 2: "RuntimeError: No available kernel. Aborting execution.": I solved this issue by adding some lines after L22 in sam2\modeling\sam\transformer.py

USE_FLASH_ATTN = False MATH_KERNEL_ON = True OLD_GPU = True

neverbiasu commented 1 month ago

thx, fix it now