From da963b8796c4b16367185c944bee65642c2b17d9 Mon Sep 17 00:00:00 2001 From: zappityzap Date: Sat, 14 Sep 2024 15:29:05 -0700 Subject: [PATCH] allow using spaces in face index lists --- scripts/reactor_faceswap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/reactor_faceswap.py b/scripts/reactor_faceswap.py index 2a6d712..e97d013 100644 --- a/scripts/reactor_faceswap.py +++ b/scripts/reactor_faceswap.py @@ -245,10 +245,10 @@ class FaceSwapScript(scripts.Script): if self.gender_target is None or self.gender_target == "No": self.gender_target = 0 self.source_faces_index = [ - int(x) for x in source_faces_index.strip(",").split(",") if x.isnumeric() + int(x) for x in source_faces_index.strip().replace(" ", "").strip(",").split(",") if x.isnumeric() ] self.faces_index = [ - int(x) for x in faces_index.strip(",").split(",") if x.isnumeric() + int(x) for x in faces_index.strip().replace(" ", "").strip(",").split(",") if x.isnumeric() ] if len(self.source_faces_index) == 0: self.source_faces_index = [0]