{"record":{"id":"985968697bb45b3e","repo":"deepfakes/faceswap","slug":"the-timelapse-path-folder-does-not-contain-any","errorCode":null,"errorMessage":"The Timelapse path '{folder}' does not contain any valid images","messagePattern":"The Timelapse path '(.+?)' does not contain any valid images","errorType":"exception","errorClass":"FaceswapError","httpStatus":null,"severity":"error","filePath":"scripts/train.py","lineNumber":181,"sourceCode":"                                \"(--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\n        Should only be called from  :class:`lib.cli.launcher.ScriptExecutor`\n        \"\"\"\n        if self._args.summary:\n            self._load_model()\n            return\n        logger.debug(\"[Train] Starting Training Process\")\n        logger.info(\"Training data directory: %s\", self._args.model_dir)\n        thread = self._start_thread()\n        # from lib.queue_manager import queue_manager; queue_manager.debug_monitor(1)","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/deepfakes/faceswap/blob/f530cb7508ae670f6474f8a7d9c4df94705cf96b/scripts/train.py#L163-L199","documentation":"Raised when a timelapse input folder exists but contains no .png files (case-insensitive extension check on os.listdir). Faceswap takes the first PNG in each timelapse folder as the sample image for the timelapse video, so an empty/non-PNG folder aborts training startup.","triggerScenarios":"Training with timelapse enabled where the timelapse input folder exists but holds only .jpg/.jpeg files, empty files, subfolders, or is empty — and the folder is not identical to the training input folder (which would be skipped).","commonSituations":"Timelapse folder freshly created but not yet populated; pointing at a folder of JPEG previews; extract output written to a different folder than the one passed to --timelapse-input-*.","solutions":["Put at least one Faceswap-extracted PNG face into each timelapse input folder.","If your faces are JPEGs, re-run extract with PNG output or point the flag at the PNG extract output.","Alternatively set the timelapse input to the same path as the corresponding training input folder, which is skipped by design."],"exampleFix":"# before: tl_a/ contains only preview.jpg\nls tl_a/  # preview.jpg\n\n# after\npython scripts/extract.py -i a_frames/ -o tl_a/   # writes PNG faces with metadata\nls tl_a/  # face_00001.png","handlingStrategy":"validation","validationCode":"import os\n\ndef folder_has_png(folder: str) -> bool:\n    return any(os.path.splitext(f)[-1].lower() == \".png\" for f in os.listdir(folder))","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Extract timelapse samples as PNG, not JPEG.","Prefer pointing --timelapse-input-A at the training input folder itself (skipped by design)."],"tags":["faceswap","train","timelapse","png","empty-folder"],"backgroundTag":null,"analyzedSha":"f530cb7508ae670f6474f8a7d9c4df94705cf96b","analyzedAt":"2026-08-15T02:59:26.626Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}