code: def cuda_mem_get_info(self):
      index = (
          self.device.index
          if self.device.index is not None
          else torch.cuda.current_device()
      )
      return torch.cuda.mem_get_info(index)
  
file_path: stable-diffusion-webui/modules/memmon.py
imports: import threading
  import time
  from collections import defaultdict
  import torch
label_desc: Use image node_id 2 for calling the MemUsageMonitor obj's underlying member method code with example usage: obj.cuda_mem_get_info() and returns: torch