      """ 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)
          self.tk_vars = tk_vars
          self.padding = padding
  
          # Set from Samples
          self.update_source = False
          self.source = list()  # Source images, filenames + detected faces
          # Set from Patch
 
</s> remove     """ Compiled faces into a single image """
 </s> add     """ 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
    """ </s> remove         self.faces = dict()
        self.faces_source = None
        self.faces_dest = None
        self.tk_image = None
 </s> add  </s> remove         self.valid = True  # Set to False if invalid parameters passed in to disable
 </s> add         self._valid = True  # Set to False if invalid parameters passed in to disable </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 </s> remove         self.batchsize = self.get_batchsize(queue_size)
        self.args = arguments
        self.in_queue = in_queue
        self.out_queue = queue_manager.get_queue("patch")
        self.serializer = get_serializer("json")
        self.faces_count = 0
        self.verify_output = False
 </s> add         self._batchsize = self._get_batchsize(queue_size)
        self._args = arguments
        self._in_queue = in_queue
        self._out_queue = queue_manager.get_queue("patch")
        self._serializer = get_serializer("json")
        self._faces_count = 0
        self._verify_output = False
        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
      """ 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)
        self._tk_vars = tk_vars
        self._padding = padding

        self._faces = dict()
        self._faces_source = None
        self._faces_dest = None
        self._tk_image = None
        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
        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
        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
  
          # Set from Samples
          self.update_source = False
          self.source = list()  # Source images, filenames + detected faces
          # Set from Patch
keep keep keep keep replace replace 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 
tools/preview.py