  
      def get_available_vram(self):
          """ Recalculate the available vram """
          if self.device == -1:
              # Limit ram usage to 3072 for CPU
              self.vram_free = 3072
          else:        
              free_mem = self.stats.get_free()
              self.vram_free = free_mem[self.device]
  
          if self.verbose:
              print("GPU VRAM free:    {}".format(self.vram_free))
 
</s> remove             # Limit ram usage to 3072 for CPU
            self.vram_total = 3072
 </s> add             # Limit ram usage to 2048 for CPU
            self.vram_total = 2048 </s> remove class GPUMem(object):
 </s> add class GPUMem():
            # Limit RAM to 2GB for non-gpu
            self.vram_free = 2048
        else:
  
      def get_available_vram(self):
          """ Recalculate the available vram """
          if self.device == -1:
            # Limit RAM to 2GB for non-gpu
            self.vram_free = 2048
        else:
            # Limit RAM to 2GB for non-gpu
            self.vram_free = 2048
        else:
            # Limit RAM to 2GB for non-gpu
            self.vram_free = 2048
        else:
              free_mem = self.stats.get_free()
              self.vram_free = free_mem[self.device]
  
          if self.verbose:
              print("GPU VRAM free:    {}".format(self.vram_free))
keep keep keep keep replace replace replace keep keep keep keep keep
 Extract: Limit non-gpu RAM useage to 2GB 
lib/face_alignment/vram_allocation.py