{"record":{"id":"755244d71a869e51","repo":"deepfakes/faceswap","slug":"to-enable-the-timelapse-you-have-to-supply-all-th","errorCode":null,"errorMessage":"To enable the timelapse, you have to supply all the parameters (--timelapse-input-A, --timelapse-input-B and --timelapse-output).","messagePattern":"To enable the timelapse, you have to supply all the parameters \\(--timelapse-input-A, --timelapse-input-B and --timelapse-output\\)\\.","errorType":"exception","errorClass":"FaceswapError","httpStatus":null,"severity":"error","filePath":"scripts/train.py","lineNumber":162,"sourceCode":"            logger.info(\"Model %s Directory: '%s' (%s images)\", key, image_dir, len(test))\n\n        return retval\n\n    def _set_timelapse(self) -> bool:\n        \"\"\"Validate timelapse settings\n\n        Returns\n        -------\n        ``True`` if timelapse is enabled and valid otherwise ``False``\n        \"\"\"\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:","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/deepfakes/faceswap/blob/f530cb7508ae670f6474f8a7d9c4df94705cf96b/scripts/train.py#L144-L180","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","solutions":["Supply all three flags together: --timelapse-input-A <A faces> --timelapse-input-B <B faces> --timelapse-output <folder>.","If you did not want a timelapse, remove all three timelapse flags entirely.","Double-check GUI fields: every timelapse field must be filled or all left empty."],"exampleFix":"# before\npython scripts/train.py -A a/ -B b/ -m model/ --timelapse-input-A a/\n\n# after\npython scripts/train.py -A a/ -B b/ -m model/ \\\n  --timelapse-input-A a/ --timelapse-input-B b/ --timelapse-output tl_out/","handlingStrategy":"validation","validationCode":"def timelapse_args_complete(a, b, out) -> bool:\n    flags = [bool(a), bool(b), bool(out)]\n    return all(flags) or not any(flags)  # all-or-nothing","typeGuard":null,"tryCatchPattern":"from lib.exceptions import FaceswapError\ntry:\n    trainer.validate_timelapse()\nexcept FaceswapError as err:\n    print(\"Fix timelapse args (supply all three or none):\", err)\n    raise SystemExit(1)","preventionTips":["Define timelapse as a single config tuple in scripts so the three flags are always set together.","Add a smoke-test that parses your standard train command and asserts all-or-none timelapse flags."],"tags":["faceswap","train","timelapse","cli-arguments","configuration"],"backgroundTag":null,"analyzedSha":"f530cb7508ae670f6474f8a7d9c4df94705cf96b","analyzedAt":"2026-08-15T02:59:26.626Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}