      """ Control the underlying Faceswap tasks """
      def __init__(self, wrapper):
          logger.debug("Initializing %s", self.__class__.__name__)
          self.wrapper = wrapper
          self.statusbar = get_config().statusbar
          self.command = None
          self.args = None
          self.process = None
          self.thread = None  # Thread for LongRunningTask termination
          self.train_stats = {"iterations": 0, "timestamp": None}
 
</s> remove             root.after(1000, self.terminate)
 </s> add             self.config.root.after(1000, self.terminate) </s> remove         root = get_config().root
 </s> add  </s> remove         logger.trace("Loading aligned face: (size: %s, align_eyes: %s, dtype: %s)",
                     size, align_eyes, dtype)
        padding = int(size * self.extract_ratio) // 2
        self.aligned["size"] = size
        self.aligned["padding"] = padding
        self.aligned["align_eyes"] = align_eyes
        self.aligned["matrix"] = get_align_mat(self, size, align_eyes)
        if image is None:
            self.aligned["face"] = None
 </s> add         # Don't reload an already aligned face:
        if self.aligned:
            logger.trace("Skipping alignment calculation for already aligned face") </s> remove         logger.debug("Initialized session")
 </s> add         logger.debug("Initialized session. Session_ID: %s", self.session_id)
        self.config = get_config()
        self.statusbar = self.config.statusbar
      """ Control the underlying Faceswap tasks """
      def __init__(self, wrapper):
          logger.debug("Initializing %s", self.__class__.__name__)
          self.wrapper = wrapper
        self.config = get_config()
        self.statusbar = self.config.statusbar
          self.command = None
          self.args = None
          self.process = None
          self.thread = None  # Thread for LongRunningTask termination
          self.train_stats = {"iterations": 0, "timestamp": None}
keep keep keep keep replace keep keep keep keep keep
 Bugfixes

- Fix filter/nfilter for convert
- Remove existing snapshot folder before creating if it pre-exists
- Don't initialize training session until after first save. "Nonetype" session fix 
lib/gui/wrapper.py