Bhl0318 2024-10-01 14:29:13 +08:00 committed by GitHub
commit 2692d9b698
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

1
.gitignore vendored
View File

@ -24,3 +24,4 @@ models/GFPGANv1.4.pth
models/DMDNet.pth
faceswap/
.vscode/
/ffmpeg-7.0.2-full_build

View File

@ -774,12 +774,13 @@ def swap_faces_paths() -> None:
def select_target_path() -> None:
global RECENT_DIRECTORY_TARGET, img_ft, vid_ft
combined_types = ('Media',(img_ft[-1] + vid_ft[-1])
)
PREVIEW.withdraw()
target_path = ctk.filedialog.askopenfilename(
title="select an target image or video",
initialdir=RECENT_DIRECTORY_TARGET,
filetypes=[img_ft, vid_ft],
filetypes=[combined_types],
)
if is_image(target_path):
modules.globals.target_path = target_path