      # Saving tasks
      def save(self, completion_event):
          """ Save the converted images """
          logger.debug("Save Images: Start")
          write_preview = self.args.redirect_gui and self.writer.is_stream
          preview_image = os.path.join(self.writer.output_folder, ".gui_preview.jpg")
          logger.debug("Write preview for gui: %s", write_preview)
          for idx in tqdm(range(self.total_count), desc="Converting", file=sys.stdout):
              if self.save_queue.shutdown.is_set():
                  logger.debug("Save Queue: Stop signal received. Terminating")
                  break
 
</s> remove         for idx in tqdm(range(self.total_count), desc="Converting", file=sys.stdout):
            if self.save_queue.shutdown.is_set():
 </s> add         for idx in tqdm(range(self._total_count), desc="Converting", file=sys.stdout):
            if self._queues["save"].shutdown.is_set(): </s> remove     def save(self, completion_event):
        """ Save the converted images """
 </s> add     def _save(self, completion_event):
        """ Save the converted images.

        Puts the selected writer into a background thread and feeds it from the output of the
        patch queue.

        Parameters
        ----------
        completion_event: :class:`event.Event`
            An even that this process triggers when it has finished saving
        """ </s> remove             item = self.save_queue.get()
 </s> add             item = self._queues["save"].get() </s> remove         for filename, image in self.images.load():
 </s> add         for filename, image in self._images.load(): </s> remove             if self.load_queue.shutdown.is_set():
 </s> add             if self._queues["load"].shutdown.is_set():
        write_preview = self._args.redirect_gui and self._writer.is_stream
        preview_image = os.path.join(self._writer.output_folder, ".gui_preview.jpg")
      # Saving tasks
      def save(self, completion_event):
          """ Save the converted images """
          logger.debug("Save Images: Start")
        write_preview = self._args.redirect_gui and self._writer.is_stream
        preview_image = os.path.join(self._writer.output_folder, ".gui_preview.jpg")
        write_preview = self._args.redirect_gui and self._writer.is_stream
        preview_image = os.path.join(self._writer.output_folder, ".gui_preview.jpg")
          logger.debug("Write preview for gui: %s", write_preview)
          for idx in tqdm(range(self.total_count), desc="Converting", file=sys.stdout):
              if self.save_queue.shutdown.is_set():
                  logger.debug("Save Queue: Stop signal received. Terminating")
                  break
keep keep keep keep replace replace keep keep keep keep keep
 Smart Masks to Convert (#957)

- scripts.convert - Use Smart Masks for Convert
    * Make on-the-fly conversion an explicit option

- Move BlurMask to lib.faces_detect

- tools.preview - Fix for smart masks
    * Subclass from tk.Tk
    * Options to lib.gui.control_helper
    *variable cleanup

- lib.logger - Demote more tensorflow deprecation messages

- Documentation:
    * lib.faces_detect.BlurMask
    * plugins.convert.mask
    * lib.convert
    * scripts.convert
    * scripts.fsmedia
    * tools.preview 
scripts/convert.py