deepfakes/faceswap · error · FaceswapError

To enable the timelapse, you have to supply all the paramete

Error message

To enable the timelapse, you have to supply all the parameters (--timelapse-input-A, --timelapse-input-B and --timelapse-output).

What it means

Raised during training startup when timelapse is partially configured: at least one of --timelapse-input-A, --timelapse-input-B, --timelapse-output is set but one or more of the three is missing. Timelapse needs both input face sets and an output folder, so Faceswap refuses to start rather than silently produce an incomplete timelapse.

Source

Thrown at scripts/train.py:162

            logger.info("Model %s Directory: '%s' (%s images)", key, image_dir, len(test))

        return retval

    def _set_timelapse(self) -> bool:
        """Validate timelapse settings

        Returns
        -------
        ``True`` if timelapse is enabled and valid otherwise ``False``
        """
        if (not self._args.timelapse_input_a and
                not self._args.timelapse_input_b and
                not self._args.timelapse_output):
            return False
        if (not self._args.timelapse_input_a or
                not self._args.timelapse_input_b or
                not self._args.timelapse_output):
            raise FaceswapError("To enable the timelapse, you have to supply all the parameters "
                                "(--timelapse-input-A, --timelapse-input-B and "
                                "--timelapse-output).")

        timelapse_folders = [self._args.timelapse_input_a, self._args.timelapse_input_b]
        get_folder(self._args.timelapse_output)

        for idx, folder in enumerate(timelapse_folders):
            side = "a" if idx == 0 else "b"
            if folder is not None and not os.path.isdir(folder):
                raise FaceswapError(f"The Timelapse path '{folder}' does not exist")

            training_folder = getattr(self._args, f"input_{side}")
            if folder == training_folder:
                continue  # Time-lapse folder is training folder

            filenames = [os.path.join(folder, fname) for fname in os.listdir(folder)
                         if os.path.splitext(fname)[-1].lower() == ".png"]
            if not filenames:

View on GitHub (pinned to f530cb7508)

Solutions

  1. Supply all three flags together: --timelapse-input-A <A faces> --timelapse-input-B <B faces> --timelapse-output <folder>.
  2. If you did not want a timelapse, remove all three timelapse flags entirely.
  3. Double-check GUI fields: every timelapse field must be filled or all left empty.

Example fix

# before
python scripts/train.py -A a/ -B b/ -m model/ --timelapse-input-A a/

# after
python scripts/train.py -A a/ -B b/ -m model/ \
  --timelapse-input-A a/ --timelapse-input-B b/ --timelapse-output tl_out/
Defensive patterns

Strategy: validation

Validate before calling

def timelapse_args_complete(a, b, out) -> bool:
    flags = [bool(a), bool(b), bool(out)]
    return all(flags) or not any(flags)  # all-or-nothing

Try / catch

from lib.exceptions import FaceswapError
try:
    trainer.validate_timelapse()
except FaceswapError as err:
    print("Fix timelapse args (supply all three or none):", err)
    raise SystemExit(1)

Prevention

When it happens

Trigger: Calling `python scripts/train.py ... --timelapse-input-A faces_a` without also passing --timelapse-input-B and --timelapse-output (or any other partial combination). The first branch (all three unset) disables timelapse cleanly; any mixed state raises.

Common situations: Copy-pasting an old train command that only carried one timelapse flag; adding --timelapse-output in a GUI session but forgetting the inputs; flag names differing between versions (e.g. older single-folder timelapse syntax).

Related errors


AI-assisted analysis of deepfakes/faceswap@f530cb7508 (2026-08-15). Data as JSON: /api/errors/755244d71a869e51. Report an issue: GitHub.