For future reference:
The problem with 1 is that whatever is saved with ctx must also be an output of the forward method.
Regarding 2 I will update when I find a solution.
For now it seems your suggestions are the right solution so I’ll mark them as such, but will update my results in the future when I get it to work