deepfakes/faceswap · error · FaceswapError

The Timelapse path '{folder}' does not exist

Error message

The Timelapse path '{folder}' does not exist

What it means

Raised when validating an enabled timelapse: the path given for --timelapse-input-A or --timelapse-input-B exists as a string but is not an existing directory (os.path.isdir is false). Faceswap needs to enumerate PNG files inside that folder to build the timelapse samples.

Source

Thrown at scripts/train.py:172

        """
        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:
                raise FaceswapError(f"The Timelapse path '{folder}' does not contain any valid "
                                    "images")

            self._validate_faceswap_image(filenames[0])
        logger.debug("[Train] Timelapse enabled")
        return True

    def process(self) -> None:
        """The entry point for triggering the Training Process.

View on GitHub (pinned to f530cb7508)

Solutions

  1. Verify the folder exists from where you launch training: `ls -d <path>`; fix typos or use absolute paths.
  2. If the folder is optional-but-intended, create it and populate it with extracted PNG faces first.
  3. If the timelapse folder is the same as the training input folder, confirm the paths match exactly (same string/absolute form) so the later equality check applies — otherwise point it at the real directory.

Example fix

# before
python scripts/train.py ... --timelapse-input-A ./a_faces   # does not exist from this CWD

# after
python scripts/train.py ... --timelapse-input-A /abs/path/to/a_faces
Defensive patterns

Strategy: validation

Validate before calling

import os

def validate_timelapse_folder(path: str | None) -> bool:
    return path is None or os.path.isdir(os.path.abspath(path))

Prevention

When it happens

Trigger: Training with timelapse enabled where a timelapse input path is misspelled, points to a file instead of a folder, is not yet created, or uses a wrong relative path (relative to the launch CWD, not the training folders).

Common situations: Relative paths breaking when launching from a different working directory; pointing at a symlink whose target is gone; the folder living on an unmounted drive; leftover path from an older layout after moving the faces folder.

Related errors


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