                  icon = action if action != "extract" else "folder"
                  wgt = ttk.Button(frame, image=icons[icon], command=self._btn_action[action])
                  wgt.state(state)
              else:
                  wgt = self._add_filter_mode_combo(frame)
              wgt.pack(side=side, padx=padx)
              Tooltip(wgt, text=self._helptext[action])
              buttons[action] = wgt
          logger.debug("Transport buttons: %s", buttons)
          return buttons
 
</s> remove             Tooltip(wgt, text=self._helptext[action])
 </s> add             if action != "mode":
                Tooltip(wgt, text=self._helptext[action]) </s> remove     def sort_color(self):
        """ Score by channel average intensity """
        logger.info("Sorting by channel average intensity...")
        desired_channel = {'gray': 0, 'luma': 0, 'orange': 1, 'green': 2}
        method = self._args.color_method
        channel_to_sort = next(v for (k, v) in desired_channel.items() if method.endswith(k))
        filename_list, image_list = self._get_images()

        logger.info("Converting to appropriate colorspace...")
        same_size = all(img.size == image_list[0].size for img in image_list)
        images = np.array(image_list, dtype='float32')[None, ...] if same_size else image_list
        converted_images = self._convert_color(images, same_size, method)

        logger.info("Scoring each image...")
        if same_size:
            scores = np.average(converted_images[0], axis=(1, 2))
        else:
            progress_bar = tqdm(converted_images, desc="Scoring", file=sys.stdout)
            scores = np.array([np.average(image, axis=(0, 1)) for image in progress_bar])

        logger.info("Sorting...")
        matched_list = list(zip(filename_list, scores[:, channel_to_sort]))
        sorted_file_img_list = sorted(matched_list, key=operator.itemgetter(1), reverse=True)
        return sorted_file_img_list

 </s> add 
                wgt = self._add_filter_section(frame)
                  icon = action if action != "extract" else "folder"
                  wgt = ttk.Button(frame, image=icons[icon], command=self._btn_action[action])
                  wgt.state(state)
              else:
                wgt = self._add_filter_section(frame)
              wgt.pack(side=side, padx=padx)
              Tooltip(wgt, text=self._helptext[action])
              buttons[action] = wgt
          logger.debug("Transport buttons: %s", buttons)
          return buttons
keep keep keep keep replace keep keep keep keep keep
 Add Misalignment Detection
  - lib.align.AlignedFace - Add average_distance property (distance from mean_face)
  - tools.manual - Add misaligned Faces filter
  - tools.sort - Add sort by distance (misaligned sort)Add "Misaligned Faces" filter to manual tool 
tools/manual/frameviewer/frame.py