              if item.startswith(".gui_training_preview") and item.endswith(".jpg"):
                  fullitem = os.path.join(self.pathpreview, item)
                  logger.debug("Deleting: '%s'", fullitem)
                  os.remove(fullitem)
          for fname in self.previewcache["filenames"]:
              if os.path.basename(fname) == ".gui_preview.jpg":
                  logger.debug("Deleting: '%s'", fname)
                  try:
                      os.remove(fname)
                  except FileNotFoundError:
 
</s> remove                 fullitem = os.path.join(self.pathpreview, item)
 </s> add                 fullitem = os.path.join(self._pathpreview, item) </s> remove         for item in os.listdir(self.pathpreview):
 </s> add         for item in os.listdir(self._pathpreview): </s> remove         """ Delete the preview files """
 </s> add         """ Delete the preview files in the cache folder and reset the image cache.

        Should be called when terminating tasks, or when Faceswap starts up or shuts down.
        """ </s> remove         self.clear_image_cache()
 </s> add         self._clear_image_cache() </s> remove     def clear_image_cache(self):
        """ Clear all cached images """
 </s> add     def _clear_image_cache(self):
        """ Clear all cached images. """
        for fname in self._previewcache["filenames"]:
              if item.startswith(".gui_training_preview") and item.endswith(".jpg"):
                  fullitem = os.path.join(self.pathpreview, item)
                  logger.debug("Deleting: '%s'", fullitem)
                  os.remove(fullitem)
        for fname in self._previewcache["filenames"]:
              if os.path.basename(fname) == ".gui_preview.jpg":
                  logger.debug("Deleting: '%s'", fname)
                  try:
                      os.remove(fname)
                  except FileNotFoundError:
keep keep keep keep replace keep keep keep keep keep
 GUI Updates (#940)

* lib.gui: Update icons
* tools.cli: Add video filetype flag to mask input
* lib.gui.popup_configure: Refresh GUI on config save
* lib.gui._config: Add Icon size and load last session options
* lib.gui.control_helper - Add control modification tracking
* lib.gui - Add Projects and Last Session
- Main root title handled by projects
- Add Hotkeys
- Create projects module
- split fsw and fst filetypes
- Add last_session saving

* lib.project
- Documentation
- Ask confirm on closing unsaved project
-Fixups

* Track model folder changes
- Shuffle some globals
- Activate System Verbosity for GUI

* lib.gui.utils - Documentation and clean up
- lib.gui.custom_widgets - Create and document

* Add GUI config option to disable auto loading model stats 
lib/gui/utils.py