              raise
  
      def convert_one_face(self, converter, imagevars):
          """ Perform the conversion on the given frame for a single face """
          filename, image, idx, face = imagevars
  
          if self.opts.check_skipface(filename, idx):
              return image
  
          # TODO: This switch between 64 and 128 is a hack for now.
          # We should have a separate cli option for size
          size = 128 if (self.args.trainer.strip().lower()
                         in ('gan128', 'originalhighres')) else 64
  
 
</s> remove     def convert_one_face(self, converter, imagevars):
 </s> add     def convert_one_face(self, converter, image, face): </s> remove                 for idx, face in enumerate(faces):
                    image = self.convert_one_face(converter,
                                                  (filename, image, idx, face))
 </s> add                 for face in faces:
                    image = self.convert_one_face(converter, image, face) </s> remove         for key in tqdm(sorted(self.alignments.data.keys()),
                        desc="Compiling"):
 </s> add         for key in tqdm(sorted(self.alignments.data.keys()), desc="Compiling"): </s> remove             return faces
        valid_faces = list()
        sizes = self.extracted_faces.get_roi_size_for_frame(frame)
        for idx, size in enumerate(sizes):
            if size >= self.extracted_faces.size:
                valid_faces.append(faces[idx])
 </s> add             valid_faces = faces
        else:
            sizes = self.extracted_faces.get_roi_size_for_frame(frame)
            valid_faces = [faces[idx]
                           for idx, size in enumerate(sizes)
                           if size >= self.extracted_faces.size]
        logger.trace("frame: '%s', total_faces: %s, valid_faces: %s",
                     frame, len(faces), len(valid_faces)) </s> remove         return [np.array([[(0, 0), (0, size - 1),
                           (size - 1, size - 1), (size - 1, 0)]], np.int32)]
 </s> add         return [np.array([[(0, 0), (0, size - 1), (size - 1, size - 1), (size - 1, 0)]], np.int32)]
              raise
  
      def convert_one_face(self, converter, imagevars):
          """ Perform the conversion on the given frame for a single face """





          # TODO: This switch between 64 and 128 is a hack for now.
          # We should have a separate cli option for size
          size = 128 if (self.args.trainer.strip().lower()
                         in ('gan128', 'originalhighres')) else 64
  
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 Add Face Hashes to Alignments (#550)

* Convert main scripts to use face hashes

* Alignment tool: Use hashes, add logging, add face rename function

* More logging. Update Manual tool to work with hashing 
scripts/convert.py