  
          detector = "dlib" if detector in ("dlib-cnn",
                                            "dlib-hog",
                                            "dlib-all") else detector
          buffer = 64  # 64MB overhead buffer
          gradient = 3483.2 / 9651200  # MTCNN
          constant = 1.007533156  # MTCNN
          if detector == "dlib":
              self.get_available_vram()
              gradient = 213 / 524288
 
</s> remove         free_mem = self.vram_free - buffer
 </s> add         free_mem = self.vram_free - self.dlib_buffer  # overhead buffer
        if self.verbose:
            print("Allocating for DLib: {}".format(free_mem)) </s> remove     def initialize_vram(self, detector):
 </s> add     def initialize_vram(self, detector, dlib_buffer): </s> remove class Align(object):
 </s> add class Align():
  
          detector = "dlib" if detector in ("dlib-cnn",
                                            "dlib-hog",
                                            "dlib-all") else detector

          gradient = 3483.2 / 9651200  # MTCNN
          constant = 1.007533156  # MTCNN
          if detector == "dlib":
              self.get_available_vram()
              gradient = 213 / 524288
keep keep keep keep replace keep keep keep keep keep
 Add option to change dlib-cnn buffer size 
lib/face_alignment/vram_allocation.py