              self._initialize_window()
              self._root.mainloop()
  
  
  def main():
      """ Load image from first given argument and display
  
      python -m lib.training.preview_tk <filename>
 
</s> remove         if not self._initialized:
 </s> add         if not self._initialized and self._is_standalone: </s> remove class Images():
    """ The centralized image repository for holding all icons and images required by the GUI.
 </s> add def _get_previews(image_path: str) -> List[str]:
    """ Get the images stored within the given directory.

    Parameters
    ----------
    image_path: str
        The folder containing images to be scanned

    Returns
    -------
    list:
        The image filenames stored within the given folder </s> remove     def read_stdout(self):
        """ Read stdout from the subprocess. If training, pass the loss
        values to Queue """
 </s> add     def _process_progress_stdout(self, output: str) -> bool:
        """ Process stdout for any faceswap processes that update the status/progress bar(s)

        Parameters
        ----------
        output: str
            The output line read from stdout

        Returns
        -------
        bool
            ``True`` if all actions have been completed on the output line otherwise ``False``
        """
        if self.command == "train" and self.capture_loss(output):
            return True

        if self.command == "effmpeg" and self.capture_ffmpeg(output):
            return True

        if self.command not in ("train", "effmpeg") and self.capture_tqdm(output):
            return True

        return False

    def _process_training_stdout(self, output: str) -> None:
        """ Process any triggers that are required to update the GUI when Faceswap is running a
        training session.

        Parameters
        ----------
        output: str
            The output line read from stdout
        """
        if self.command != "train" or not self.wrapper.tk_vars.is_training.get():
            return

        if "[saved models]" not in output.strip().lower():
            return

        logger.debug("Trigger GUI Training update")
        logger.trace("tk_vars: %s", {itm: var.get()  # type:ignore
                                     for itm, var in self.wrapper.tk_vars.__dict__.items()})
        if not Session.is_training:
            # Don't initialize session until after the first save as state file must exist first
            logger.debug("Initializing curret training session")
            Session.initialize_session(self._session_info["model_folder"],
                                       self._session_info["model_name"],
                                       is_training=True)
        self.wrapper.tk_vars.refresh_graph.set(True)

    def read_stdout(self) -> None:
        """ Read stdout from the subprocess. """ </s> remove from typing import cast, Dict, Optional, Tuple, TYPE_CHECKING
 </s> add from typing import Dict, Optional, Tuple

from lib.training.preview_tk import PreviewTk
        if not self._initialized:  # Set initialized to True for GUI
            self._set_min_max_scales()
            self._taskbar.scale_var.set("Fit")
            self._initialized = True
              self._initialize_window()
              self._root.mainloop()
        if not self._initialized:  # Set initialized to True for GUI
            self._set_min_max_scales()
            self._taskbar.scale_var.set("Fit")
            self._initialized = True
  
  
  def main():
      """ Load image from first given argument and display
  
      python -m lib.training.preview_tk <filename>
keep add keep keep keep keep keep keep
 GUI - Preview updates
  - Training preview. Embed preview pop-out window
  - Bugfix - convert/extract previews 
lib/training/preview_tk.py