Soo can you paste a standalone snippet with a toy example?
It seems you are wrapping everything with a nn.module class (graph).
Buut maybe node_info is a standard dict? It’s a bit difficult to say
I think you are doing something like
import torch
from torch import nn
class Toy(nn.Module):
    def __init__(self):
        super().__init__()
        wrong=nn.Parameter(torch.Tensor([5]))
        self.w = wrong.cuda()
        self.good = nn.Parameter(torch.Tensor([5]))
    def forward(self):
        pass

m = Toy()
print(m.w.is_leaf,m.w.grad_fn)
print(m.good.is_leaf,m.good.grad_fn)

False <CopyBackwards object at 0x7f65a3de7f98>
True None
Think that this behaviour doesn’t have to happen inside init, it can be extrapolable to however you are instantiating new nodes.