(value: Any, label: str)
| 1701 | state: dict[str, torch.Tensor] = {} |
| 1702 | for key, value in raw_state.items(): |
| 1703 | if not isinstance(key, str): |
| 1704 | raise RuntimeError(f"invalid non-string Whisper tensor key: {key!r}") |
| 1705 | if not isinstance(value, torch.Tensor): |
| 1706 | raise RuntimeError(f"invalid non-tensor Whisper state entry: {key}") |
| 1707 | state[key] = value.detach().cpu().contiguous() |
| 1708 | return state |
| 1709 |
no outgoing calls
no test coverage detected