Commit 30d48a5
Fix device mismatch in crop_bboxes for cross-device inference
Ensure bboxes are moved to the same device as images before computing
crop indices. This fixes RuntimeError when bboxes are on GPU but images
are on CPU (or vice versa) during top-down inference.
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent 460f6b7 commit 30d48a5
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| |||
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
89 | | - | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| |||
0 commit comments