{"record":{"id":"a0c20b82e3ca3574","repo":"deepfakes/faceswap","slug":"the-timelapse-path-folder-does-not-exist","errorCode":null,"errorMessage":"The Timelapse path '{folder}' does not exist","messagePattern":"The Timelapse path '(.+?)' does not exist","errorType":"exception","errorClass":"FaceswapError","httpStatus":null,"severity":"error","filePath":"scripts/train.py","lineNumber":172,"sourceCode":"        \"\"\"\n        if (not self._args.timelapse_input_a and\n                not self._args.timelapse_input_b and\n                not self._args.timelapse_output):\n            return False\n        if (not self._args.timelapse_input_a or\n                not self._args.timelapse_input_b or\n                not self._args.timelapse_output):\n            raise FaceswapError(\"To enable the timelapse, you have to supply all the parameters \"\n                                \"(--timelapse-input-A, --timelapse-input-B and \"\n                                \"--timelapse-output).\")\n\n        timelapse_folders = [self._args.timelapse_input_a, self._args.timelapse_input_b]\n        get_folder(self._args.timelapse_output)\n\n        for idx, folder in enumerate(timelapse_folders):\n            side = \"a\" if idx == 0 else \"b\"\n            if folder is not None and not os.path.isdir(folder):\n                raise FaceswapError(f\"The Timelapse path '{folder}' does not exist\")\n\n            training_folder = getattr(self._args, f\"input_{side}\")\n            if folder == training_folder:\n                continue  # Time-lapse folder is training folder\n\n            filenames = [os.path.join(folder, fname) for fname in os.listdir(folder)\n                         if os.path.splitext(fname)[-1].lower() == \".png\"]\n            if not filenames:\n                raise FaceswapError(f\"The Timelapse path '{folder}' does not contain any valid \"\n                                    \"images\")\n\n            self._validate_faceswap_image(filenames[0])\n        logger.debug(\"[Train] Timelapse enabled\")\n        return True\n\n    def process(self) -> None:\n        \"\"\"The entry point for triggering the Training Process.\n","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/deepfakes/faceswap/blob/f530cb7508ae670f6474f8a7d9c4df94705cf96b/scripts/train.py#L154-L190","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Verify the folder exists from where you launch training: `ls -d <path>`; fix typos or use absolute paths.","If the folder is optional-but-intended, create it and populate it with extracted PNG faces first.","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."],"exampleFix":"# before\npython scripts/train.py ... --timelapse-input-A ./a_faces   # does not exist from this CWD\n\n# after\npython scripts/train.py ... --timelapse-input-A /abs/path/to/a_faces","handlingStrategy":"validation","validationCode":"import os\n\ndef validate_timelapse_folder(path: str | None) -> bool:\n    return path is None or os.path.isdir(os.path.abspath(path))","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use absolute paths for timelapse folders in long-running training scripts.","Create/populate timelapse folders as part of the extract step so they exist before train starts."],"tags":["faceswap","train","timelapse","filesystem","paths"],"backgroundTag":null,"analyzedSha":"f530cb7508ae670f6474f8a7d9c4df94705cf96b","analyzedAt":"2026-08-15T02:59:26.626Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}