                                      source_frame_dims=extract_media.image_size))
              image = encode_image(face.aligned.face, extension, metadata=meta)
  
              if saver is not None:
                  saver.save(output_filename, image)
              final_faces.append(face.to_alignment())
          self._alignments.data[os.path.basename(extract_media.filename)] = dict(faces=final_faces)
          del extract_media
 
</s> remove         filename = os.path.join(self.location, os.path.basename(filename))
 </s> add         location = os.path.join(self.location, sub_folder) if sub_folder else self._location
        if sub_folder and not os.path.exists(location):
            os.makedirs(location)

        filename = os.path.join(location, os.path.basename(filename)) </s> remove     def save(self, filename, image):
 </s> add     def save(self, filename: str, image: bytes, sub_folder: Optional[str] = None) -> None:
                sub_folder = extract_media.sub_folders[idx]
                saver.save(output_filename, image, sub_folder)
                                      source_frame_dims=extract_media.image_size))
              image = encode_image(face.aligned.face, extension, metadata=meta)
  
              if saver is not None:
                sub_folder = extract_media.sub_folders[idx]
                saver.save(output_filename, image, sub_folder)
              final_faces.append(face.to_alignment())
          self._alignments.data[os.path.basename(extract_media.filename)] = dict(faces=final_faces)
          del extract_media
keep keep keep keep replace keep keep keep
 Extract filter: Allow saving of filtered images 
scripts/extract.py