torch.jit.freeze
'd models cannot be moved to GPU with .to()
#57569
Labels
oncall: jit
Add this issue/PR to JIT oncall triage queue
Projects
🐛 Bug
To Reproduce
Gives:
Expected behavior
This works without
torch.jit.freeze
:It also works if you freeze after moving the model to device:
Environment
conda
,pip
, source): condaAdditional context
Interestingly, this can be circumvented by using
map_location
intorch.jit.load
instead of.to()
to move the model:cc @gmagogsfm
The text was updated successfully, but these errors were encountered: