code: def run(self):
      if self.disabled:
          return
  
      while True:
          self.run_flag.wait()
  
          torch.cuda.reset_peak_memory_stats()
          self.data.clear()
  
          if self.opts.memmon_poll_rate <= 0:
              self.run_flag.clear()
              continue
  
          self.data["min_free"] = self.cuda_mem_get_info()[0]
  
          while self.run_flag.is_set():
              free, total = self.cuda_mem_get_info()
              self.data["min_free"] = min(self.data["min_free"], free)
  
              time.sleep(1 / self.opts.memmon_poll_rate)
  
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 3 for calling the MemUsageMonitor obj's underlying member method code with example usage: obj.run() without return types