I’m not sure, if the posted object is used as the input or inside the model as e.g. a custom parameter.
In the former case, I would guess you could push the data to the GPU before executing the forward pass, while the parameters would be pushed to the device after initializing the model, so I’m unsure why the device transfer is used in the forward.
In any case, I don’t know what limitations Lightning has, so could you explain why pushing the data to the device won’t work?