core.utils.backward_compatibility.torch_load_with_fallback
core.utils.backward_compatibility.torch_load_with_fallback(
filename,
preferred_map_location='cuda',
)Loads a PyTorch file with fallback behavior: 1. Tries preferred_map_location (default: cuda) 2. Falls back to CUDA/MPS/HIP if available 3. Finally falls back to CPU
Returns
| Name | Type | Description |
|---|---|---|
| Loaded model and torch device on which it has been loaded |