          return swapped
  
  
  class FacesDisplay():
      """ Compiled faces into a single image """
      def __init__(self, size, padding, tk_vars):
          logger.trace("Initializing %s: (size: %s, padding: %s, tk_vars: %s)",
                       self.__class__.__name__, size, padding, tk_vars)
          self.size = size
          self.display_dims = (1, 1)
 
</s> remove         self.size = size
        self.display_dims = (1, 1)
        self.tk_vars = tk_vars
        self.padding = padding
 </s> add         self._size = size
        self._display_dims = (1, 1)
        self._tk_vars = tk_vars
        self._padding = padding

        self._faces = dict()
        self._faces_source = None
        self._faces_dest = None
        self._tk_image = None </s> remove     """ Canvas to hold the images """
 </s> add     """ tkinter Canvas that holds the preview images.

    Parameters
    ----------
    parent: tkinter object
        The parent tkinter object that holds the canvas
    tk_vars: dict
        Global tkinter variables. `Refresh` and `Busy` :class:`tkinter.BooleanVar`
    """ </s> remove     """ Frame that holds the left hand side options panel """
    def __init__(self, parent, selected_color, selected_mask_type, selected_scaling,
                 config_tools, patch_callback, refresh_callback, tk_vars):
        logger.debug("Initializing %s: (selected_color: %s, selected_mask_type: %s, "
                     "selected_scaling: %s, config_tools, patch_callback: %s, "
                     "refresh_callback: %s, tk_vars: %s)", self.__class__.__name__, selected_color,
 </s> add     """ Frame that holds the left hand side options panel containing the command line options.

    Parameters
    ----------
    parent: tkinter object
        The parent tkinter object that holds the Action Frame
    available_masks: list
        The available masks that exist within the alignments file
    has_predicted_mask: bool
        Whether the model was trained with a mask
    selected_color: str
        The selected color adjustment type
    selected_mask_type: str
        The selected mask type
    selected_scaling: str
        The selected scaling type
    config_tools: :class:`ConfigTools`
        Tools for loading and saving configuration files
    patch_callback: python function
        The function to execute when a patch callback is received
    refresh_callback: python function
        The function to execute when a refresh callback is received
    tk_vars: dict
        Global tkinter variables. `Refresh` and `Busy` :class:`tkinter.BooleanVar`
    """
    def __init__(self, parent, available_masks, has_predicted_mask, selected_color,
                 selected_mask_type, selected_scaling, config_tools, patch_callback,
                 refresh_callback, tk_vars):
        logger.debug("Initializing %s: (available_masks: %s, has_predicted_mask: %s, "
                     "selected_color: %s, selected_mask_type: %s, selected_scaling: %s, "
                     "patch_callback: %s, refresh_callback: %s, tk_vars: %s)",
                     self.__class__.__name__, available_masks, has_predicted_mask, selected_color, </s> remove                      "predicted_available: %s, configfile: %s, config: %s)",
                     self.__class__.__name__, mask_type, output_size, predicted_available,
                     configfile, config)
        self.config = self.set_config(configfile, config)
 </s> add                      "configfile: %s, config: %s)", self.__class__.__name__, mask_type,
                     output_size, configfile, config)
        self.config = self._set_config(configfile, config) </s> remove         self.samples = samples
        self.queue_patch_in = queue_manager.get_queue("preview_patch_in")
        self.display = display
        self.lock = lock
        self.trigger = trigger
 </s> add         self._samples = samples
        self._queue_patch_in = queue_manager.get_queue("preview_patch_in")
        self._display = display
        self._lock = lock
        self._trigger = trigger
    """ Compiles the 2 rows of sample faces (original and swapped) into a single image

    Parameters
    ----------
    size: int
        The size of each individual face sample in pixels
    padding: int
        The amount of extra padding to apply to the outside of the face
    tk_vars: dict
        Global tkinter variables. `Refresh` and `Busy` :class:`tkinter.BooleanVar`

    Attributes
    ----------
    update_source: bool
        Flag to indicate that the source images for the preview have been updated, so the preview
        should be recompiled.
    source: list
        The list of :class:`numpy.ndarray` source preview images for top row of display
    destination: list
        The list of :class:`numpy.ndarray` swapped and patched preview images for bottom row of
        display
    """
          return swapped
  
  
  class FacesDisplay():
    """ Compiles the 2 rows of sample faces (original and swapped) into a single image

    Parameters
    ----------
    size: int
        The size of each individual face sample in pixels
    padding: int
        The amount of extra padding to apply to the outside of the face
    tk_vars: dict
        Global tkinter variables. `Refresh` and `Busy` :class:`tkinter.BooleanVar`

    Attributes
    ----------
    update_source: bool
        Flag to indicate that the source images for the preview have been updated, so the preview
        should be recompiled.
    source: list
        The list of :class:`numpy.ndarray` source preview images for top row of display
    destination: list
        The list of :class:`numpy.ndarray` swapped and patched preview images for bottom row of
        display
    """
      def __init__(self, size, padding, tk_vars):
          logger.trace("Initializing %s: (size: %s, padding: %s, tk_vars: %s)",
                       self.__class__.__name__, size, padding, tk_vars)
          self.size = size
          self.display_dims = (1, 1)
keep keep keep keep 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 
tools/preview.py