Commit 54e7bee
Accept torch tensors as DiNTS arch_code for weights_only=True checkpoints
TopologyConstruction.__init__ converted arch_code entries with
torch.from_numpy, which raises TypeError when the architecture codes are
already tensors. Checkpoints such as search_code_18590.pt from the
pancreas_ct_dints_segmentation and multi_organ_segmentation bundles must
be re-saved with tensors to load under torch.load(weights_only=True),
so the network needs to accept both. torch.as_tensor handles numpy
arrays and tensors identically, keeping the existing numpy path intact.
Fixes #9025 (MONAI code side; bundle artifact re-upload tracked separately)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Minsu Kim <minsu.kim08@gmail.com>1 parent 87060c4 commit 54e7bee
2 files changed
Lines changed: 46 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
522 | | - | |
| 522 | + | |
| 523 | + | |
523 | 524 | | |
524 | 525 | | |
525 | 526 | | |
| |||
605 | 606 | | |
606 | 607 | | |
607 | 608 | | |
608 | | - | |
609 | | - | |
| 609 | + | |
| 610 | + | |
610 | 611 | | |
611 | 612 | | |
612 | 613 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
156 | 198 | | |
157 | 199 | | |
158 | 200 | | |
| |||
0 commit comments