fix extract

This commit is contained in:
Tran Xen
2023-08-04 01:11:33 +02:00
parent be1cd15432
commit 26ac28634f
3 changed files with 6 additions and 1 deletions
@@ -210,6 +210,7 @@ class UpscaledINSwapper(INSwapper):
)
if options.improved_mask:
logger.info("improved_mask")
mask = get_face_mask(aimg, bgr_fake)
bgr_fake = merge_images_with_mask(aimg, bgr_fake, mask)
+3 -1
View File
@@ -70,7 +70,9 @@ def extract_faces(
logger.error("You need at least one image file to extract")
return []
try:
postprocess_options = PostProcessingOptions(*components) # type: ignore
postprocess_options = dataclasses_from_flat_list(
[PostProcessingOptions], components
).pop()
images = [
Image.open(file.name) for file in files
] # potentially greedy but Image.open is supposed to be lazy