Commit bba207a
fix(ui): IP adapter / control adapter model recall for reinstalled models (invoke-ai#8960)
* fix(ui): resolve models by name+base+type when recalling metadata for reinstalled models
When a model (IP Adapter, ControlNet, etc.) is deleted and reinstalled,
it gets a new UUID key. Previously, metadata recall would fail because
it only looked up models by their stored UUID key. Now the recall falls
back to searching by name+base+type, allowing reinstalled models with
the same name to be correctly resolved.
https://claude.ai/code/session_01XYubzMK363BXGTvfJJqFnX
* Add hash-based model recall fallback for reinstalled models
When a model is deleted and reinstalled, it gets a new UUID key but
retains the same BLAKE3 content hash. This adds hash as a middle
fallback stage in model resolution (key → hash → name+base+type),
making recall more robust.
Changes:
- Add /api/v2/models/get_by_hash backend endpoint (uses existing
search_by_hash from model records store)
- Add getModelConfigByHash RTK Query endpoint in frontend
- Add hash fallback to both resolveModel and parseModelIdentifier
https://claude.ai/code/session_01XYubzMK363BXGTvfJJqFnX
* Chore pnpm fix
* Chore typegen
---------
Co-authored-by: Claude <[email protected]>1 parent a7b367f commit bba207a
File tree
4 files changed
+139
-7
lines changed- invokeai
- app/api/routers
- frontend/web/src
- features/metadata
- services/api
- endpoints
4 files changed
+139
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
196 | 213 | | |
197 | 214 | | |
198 | 215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1063 | 1063 | | |
1064 | 1064 | | |
1065 | 1065 | | |
1066 | | - | |
| 1066 | + | |
| 1067 | + | |
1067 | 1068 | | |
1068 | 1069 | | |
1069 | 1070 | | |
| |||
1099 | 1100 | | |
1100 | 1101 | | |
1101 | 1102 | | |
1102 | | - | |
| 1103 | + | |
| 1104 | + | |
1103 | 1105 | | |
1104 | 1106 | | |
1105 | 1107 | | |
| |||
1165 | 1167 | | |
1166 | 1168 | | |
1167 | 1169 | | |
1168 | | - | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
1169 | 1173 | | |
1170 | 1174 | | |
1171 | 1175 | | |
| |||
1534 | 1538 | | |
1535 | 1539 | | |
1536 | 1540 | | |
1537 | | - | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
1538 | 1554 | | |
1539 | 1555 | | |
1540 | 1556 | | |
| |||
1562 | 1578 | | |
1563 | 1579 | | |
1564 | 1580 | | |
1565 | | - | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
1566 | 1610 | | |
1567 | | - | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
1568 | 1618 | | |
1569 | | - | |
| 1619 | + | |
1570 | 1620 | | |
1571 | 1621 | | |
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
242 | 254 | | |
243 | 255 | | |
244 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
372 | 393 | | |
373 | 394 | | |
374 | 395 | | |
| |||
29117 | 29138 | | |
29118 | 29139 | | |
29119 | 29140 | | |
| 29141 | + | |
| 29142 | + | |
| 29143 | + | |
| 29144 | + | |
| 29145 | + | |
| 29146 | + | |
| 29147 | + | |
| 29148 | + | |
| 29149 | + | |
| 29150 | + | |
| 29151 | + | |
| 29152 | + | |
| 29153 | + | |
| 29154 | + | |
| 29155 | + | |
| 29156 | + | |
| 29157 | + | |
| 29158 | + | |
| 29159 | + | |
| 29160 | + | |
| 29161 | + | |
| 29162 | + | |
| 29163 | + | |
| 29164 | + | |
| 29165 | + | |
| 29166 | + | |
| 29167 | + | |
| 29168 | + | |
| 29169 | + | |
| 29170 | + | |
| 29171 | + | |
| 29172 | + | |
29120 | 29173 | | |
29121 | 29174 | | |
29122 | 29175 | | |
| |||
0 commit comments