def to(self, device):
        """Same as to in torch module
        Don't really underestand why this isn't a module in the first place"""
        for k, v in self.__dict__.items():
            if isinstance(v, torch.Tensor):
                new_v = getattr(self, k).to(device)
                setattr(self, k, new_v)
Same as to in torch module
        Don't really underestand why this isn't a module in the first place
mv-diffusion/One-2-3-45-by-view/ldm/models/diffusion/ddim.py