diff --git a/scripts/faceswap.py b/scripts/faceswap.py index 3fce8cb3..c28b2413 100644 --- a/scripts/faceswap.py +++ b/scripts/faceswap.py @@ -141,12 +141,14 @@ def process( swap_in_source, swap_in_generated, ): + self.enable = enable + if not enable: + return self.source = img self.face_restorer_name = face_restorer_name self.upscaler_scale = upscaler_scale self.upscaler_visibility = upscaler_visibility self.face_restorer_visibility = face_restorer_visibility - self.enable = enable self.upscaler_name = upscaler_name self.swap_in_generated = swap_in_generated self.model = model