          bool
              ``True`` if legacy items exist and state file has been updated, otherwise ``False``
          """
          logger.debug("Checking for legacy state file update")
          priors = ["dssim_loss", "mask_type", "mask_type", "l2_reg_term"]
          new_items = ["loss_function", "learn_mask", "mask_type", "loss_function_2"]
          updated = False
          for old, new in zip(priors, new_items):
              if old not in self._config:
                  logger.debug("Legacy item '%s' not in config. Skipping update", old)
                  continue
 
</s> remove         if clipnorm and (arguments.distributed or mixed_precision):
            logger.warning("Clipnorm has been selected, but is unsupported when using distributed "
                           "or mixed_precision training, so has been disabled. If you wish to "
                           "enable clipnorm, then you must disable these other options.")
            clipnorm = False
        if clipnorm and get_backend() == "amd":
            # TODO add clipnorm in for plaidML when it is fixed upstream. Still not fixed in
            # release 0.7.0.
            logger.warning("Due to a bug in plaidML, clipnorm cannot be used on AMD backends so "
                           "has been disabled")
            clipnorm = False
        if clipnorm:
            self._kwargs["clipnorm"] = 1.0
 </s> add         if not autoclip:
            return </s> remove         clipnorm: bool
            Whether to clip gradients to avoid exploding/vanishing gradients
        mixed_precision: bool
            ``True`` if mixed precision training is to be enabled otherwise ``False``
        arguments: :class:`argparse.Namespace`
            The arguments that were passed to the train or convert process as generated from
            Faceswap's command line arguments
 </s> add         autoclip: bool
            ``True`` if AutoClip should be enabled otherwise ``False`` </s> remove     clipnorm: bool
        Whether to clip gradients to avoid exploding/vanishing gradients
 </s> add     autoclip: bool
        ``True`` if AutoClip should be enabled otherwise ``False``
        priors = ["dssim_loss", "mask_type", "mask_type", "l2_reg_term", "clipnorm"]
        new_items = ["loss_function", "learn_mask", "mask_type", "loss_function_2",
                     "autoclip"]
          bool
              ``True`` if legacy items exist and state file has been updated, otherwise ``False``
          """
          logger.debug("Checking for legacy state file update")
        priors = ["dssim_loss", "mask_type", "mask_type", "l2_reg_term", "clipnorm"]
        new_items = ["loss_function", "learn_mask", "mask_type", "loss_function_2",
                     "autoclip"]
        priors = ["dssim_loss", "mask_type", "mask_type", "l2_reg_term", "clipnorm"]
        new_items = ["loss_function", "learn_mask", "mask_type", "loss_function_2",
                     "autoclip"]
          updated = False
          for old, new in zip(priors, new_items):
              if old not in self._config:
                  logger.debug("Legacy item '%s' not in config. Skipping update", old)
                  continue
keep keep keep keep replace replace keep keep keep keep keep
 Nvidia: Add AutoClip training option 
plugins/train/model/_base/model.py