I’m not familiar with the code and I’m not sure, which method is called how often, but in the file you’ve linked there is a function which adds tensors to lists: line of code 13.
Could you check somehow, if and when the clear function is called?
If the tensors are added to the lists, your memory will grow continuously.
It’s usually a good idea to post code directly, as this makes the search easier in the forum in case someone else has a similar issue. You can post code using three backticks `