Commit a47fa0c
committed
Added automatic device detection for model loading in vulnscan
Resolved crash when loading PyTorch model on systems without CUDA by implementing auto-detection of device availability (CPU/GPU). torch.load now uses map_location to ensure compatibility across environments.
Signed-off-by: Shahm Najeeb <[email protected]>1 parent 1683db0 commit a47fa0c
1 file changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
59 | 67 | | |
60 | 68 | | |
61 | 69 | | |
| |||
0 commit comments