          self._images = self._get_images()
          self._timelapse = self._set_timelapse()
          gui_cache = os.path.join(
              os.path.realpath(os.path.dirname(sys.argv[0])), "lib", "gui", ".cache")
          self._gui_triggers = dict(update=os.path.join(gui_cache, ".preview_trigger"),
                                    mask_toggle=os.path.join(gui_cache, ".preview_mask_toggle"))
          self._stop: bool = False
          self._save_now: bool = False
          self._preview = Preview()
  
          logger.debug("Initialized %s", self.__class__.__name__)
 
</s> remove         self._preview = Preview()
 </s> add         self._preview = PreviewInterface(self._args.preview) </s> remove                 if self._args.preview:
                    self._preview.display_preview()

 </s> add  </s> remove             if self._preview.should_refresh():
 </s> add             if self._preview.should_refresh or gui_triggers["refresh"] or update_preview_images: </s> remove     def get_trainer(name: str, disable_logging: bool = False) -> "TrainerBase":
 </s> add     def get_trainer(name: str, disable_logging: bool = False) -> Type["TrainerBase"]:
        self._gui_triggers: Dict[Literal["mask", "refresh"], str] = dict(
            mask=os.path.join(gui_cache, ".preview_trigger"),
            refresh=os.path.join(gui_cache, ".preview_mask_toggle"))
          self._images = self._get_images()
          self._timelapse = self._set_timelapse()
          gui_cache = os.path.join(
              os.path.realpath(os.path.dirname(sys.argv[0])), "lib", "gui", ".cache")
        self._gui_triggers: Dict[Literal["mask", "refresh"], str] = dict(
            mask=os.path.join(gui_cache, ".preview_trigger"),
            refresh=os.path.join(gui_cache, ".preview_mask_toggle"))
        self._gui_triggers: Dict[Literal["mask", "refresh"], str] = dict(
            mask=os.path.join(gui_cache, ".preview_trigger"),
            refresh=os.path.join(gui_cache, ".preview_mask_toggle"))
          self._stop: bool = False
          self._save_now: bool = False
          self._preview = Preview()
  
          logger.debug("Initialized %s", self.__class__.__name__)
keep keep keep keep replace replace keep keep keep keep keep
 Training - Use custom preview pop-out 
scripts/train.py