          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._stop: bool = False
          self._save_now: bool = False
          self._preview = PreviewInterface(self._args.preview)
  
          logger.debug("Initialized %s", self.__class__.__name__)
 
</s> remove                   if os.path.isdir(os.path.join(self._args.input_dir, fname))
                  or os.path.splitext(fname)[-1].lower() in _video_extensions]
 </s> add                   if (os.path.isdir(os.path.join(self._args.input_dir, fname))  # folder images
                      and any(os.path.splitext(iname)[-1].lower() in _image_extensions
                              for iname in os.listdir(os.path.join(self._args.input_dir, fname))))
                  or os.path.splitext(fname)[-1].lower() in _video_extensions]  # video
 </s> remove from lib.utils import get_folder, _video_extensions
 </s> add from lib.utils import get_folder, _image_extensions, _video_extensions
            mask=os.path.join(gui_cache, ".preview_mask_toggle"),
            refresh=os.path.join(gui_cache, ".preview_trigger"))
          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_mask_toggle"),
            refresh=os.path.join(gui_cache, ".preview_trigger"))
            mask=os.path.join(gui_cache, ".preview_mask_toggle"),
            refresh=os.path.join(gui_cache, ".preview_trigger"))
          self._stop: bool = False
          self._save_now: bool = False
          self._preview = PreviewInterface(self._args.preview)
  
          logger.debug("Initialized %s", self.__class__.__name__)
keep keep keep keep replace replace keep keep keep keep keep
 Bugfixes:
  - Extract - batch mode. Exclude folders with no images
  - Train. Trigger the correct preview/mask update from gui trigger 
scripts/train.py