I think your issue is here is that your model class specifically defines cuda as location and so even though you load to cpu it clashes with the model class (assuming you don’t have a separate cpu model class not shown in your post). You need to alter the model class so that you can choose for it to run on cuda/cpu or make a separate cpu model class if you prefer.