Yes, saving the state_dict is sufficient to restore the model for your deployment use case.
The error message seems to be raised by OpenCV and I don’t know which method is raising it.
Are you able to read frames from your cam object using OpenCV?