Good to hear original issue has been resolved. Regarding CUDA out of memory error, it may be happening due to insufficient memory available. Please check available GPU memory using nvidia-smi and make sure enough memory is available. We recommend you to share error logs and issue reproducible model/scripts for better assistance,
Please refer following and make sure your engine serializing and inference code is correct.
Regarding Deepstream deployment, we recommend you to post your query on Deepstream forum. You may get better help.