I have an integer to be returned, along with some other stuff.

Why do you want to return this integer? What does this integer contain? Is it the model output? Is the model input type Tensor?

Have you ever tried to return an integer itself?

Yes. If you try to backprop with this returned int it will thrown an error as it doesn’t have grad.

That will also be converted to a tensor

Why are you converting back and forth to int and Tensor?
Please give more details so that we could help you.