In your loop over x_test it seems you are appending the losses into preds.
Since you are neither detaching the loss nor wrap the code in with torch.no_grad(), each loss tensor will hold to its computation graph, which will increase the memory usage for each iteration.
If you don’t need to call backward on these losses, just use this code:
with torch.no_grad():
    for calSet in x_test:
        finalTree = valSet[-1]
        preds.append(model(finalTree,root)[1])
    predTensor = torch.stack(preds)