  from tqdm import tqdm
  
  from lib.image import encode_image, generate_thumbnail, ImagesLoader, ImagesSaver
  from lib.multithreading import MultiThread
  from lib.utils import get_folder, _video_extensions
  from plugins.extract.pipeline import Extractor, ExtractMedia
  from scripts.fsmedia import Alignments, PostProcess, finalize
  
  
  tqdm.monitor_interval = 0  # workaround for TqdmSynchronisationWarning
 
</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             mask=os.path.join(gui_cache, ".preview_trigger"),
            refresh=os.path.join(gui_cache, ".preview_mask_toggle"))
 </s> add             mask=os.path.join(gui_cache, ".preview_mask_toggle"),
            refresh=os.path.join(gui_cache, ".preview_trigger"))
from lib.utils import get_folder, _image_extensions, _video_extensions
  from tqdm import tqdm
  
  from lib.image import encode_image, generate_thumbnail, ImagesLoader, ImagesSaver
  from lib.multithreading import MultiThread
from lib.utils import get_folder, _image_extensions, _video_extensions
  from plugins.extract.pipeline import Extractor, ExtractMedia
  from scripts.fsmedia import Alignments, PostProcess, finalize
  
  
  tqdm.monitor_interval = 0  # workaround for TqdmSynchronisationWarning
keep keep keep keep 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/extract.py