Support non-ascii characters

This commit is contained in:
Kenneth Estanislao
2026-06-14 20:18:56 +08:00
parent 3b69413d61
commit 834bc43768
8 changed files with 73 additions and 52 deletions
+2 -2
View File
@@ -126,7 +126,7 @@ def process_video_in_memory(source_path: str, target_path: str, fps: float) -> b
Returns True on success, False on failure (caller should fall back to the
disk-based pipeline).
"""
import cv2
from modules import imread_unicode
from modules.face_analyser import get_one_face
from modules.utilities import (
get_video_dimensions,
@@ -139,7 +139,7 @@ def process_video_in_memory(source_path: str, target_path: str, fps: float) -> b
# --- Pre-load source face (needed by face_swapper in simple mode) ---
source_face = None
if source_path and os.path.exists(source_path):
source_img = cv2.imread(source_path)
source_img = imread_unicode(source_path)
if source_img is not None:
source_face = get_one_face(source_img)
del source_img