if folder is not None and not os.path.isdir(folder):
raise FaceswapError("The Timelapse path "{}" does not exist".format(folder))
exts = [os.path.splitext(fname)[-1].lower() for fname in os.listdir(folder)]
if not any(ext in _image_extensions for ext in exts):
raise FaceswapError("The Timelapse path "{}" does not contain any valid "
"images".format(folder))
kwargs = {"input_a": self._args.timelapse_input_a,
After Change
timelapse_output = str(get_folder(self._args.timelapse_output))
for side in ("a", "b"):
folder = getattr(self._args, "timelapse_input_{}".format(side))
if folder is not None and not os.path.isdir(folder):
raise FaceswapError("The Timelapse path "{}" does not exist".format(folder))
training_folder = getattr(self._args, "input_{}".format(side))
if folder == training_folder:
continue // Timelapse folder is training folder
filenames = [fname for fname in os.listdir(folder)
if os.path.splitext(fname)[-1].lower() in _image_extensions]
if not filenames:
raise FaceswapError("The Timelapse path "{}" does not contain any valid "