Commit 369990d
Fix LangSAM API: pass lists instead of bare string to predict()
The updated LangSAM API expects predict([image], [text]) with lists.
Passing a bare string caused it to iterate over characters (e.g.
"bear" -> ["b","e","a","r"]), breaking mask prediction entirely.
Also handles the new list[dict] return format and guards against
empty mask results.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 24b2ba6 commit 369990d
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
| |||
0 commit comments