This line seems to assign the output of node_forward to tree.state, which could indeed store the tensors with their graph.
However, based in the claimed value of 27153241.914 MiB, which would be 27153241.914 / 1024**2 ~= 25.9TB I don’t quite trust it or is your memory indeed growing by TBs?