Files
stlukyanenko 0b5cfc264c Fix multi-zoom crops in the SAM mask-generation pipeline and related bugs (Fixes #35530) (#49689)
* Remove the torch.stack of cropped images for SAM that was broken for crops_n_layers > 0

crops have different dimensions from the full image/each other, so can't be stacked, keeping them as a list of tensors is compatible

* Iterative inference over crops with SAM to avoid errors with crops_n_layers > 0

Every chunk now only carries its own crop's information (features, points, box, sizes) + full image size. The points_per_batch check now catches errors before feature computation.

* Fix _pad_masks by allowing non int bounding boxes that generate_crop_boxes produces

* Fix the incorrect coordinates of boxes belonging to crop masks

* Spread the points correctly across crops by fixing _generate_crop_images

* Make crop chunk construction in preprocessing simpler and yield them outside of device context

* Implement testing for point and mask generation with crops_n_layers > 0
2026-10-21 15:43:12 +00:00
..