mirror of
https://github.com/s0md3v/roop.git
synced 2025-09-26 20:31:16 +08:00
Hotfix enhancer as of empty bbox
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
name = 'roop'
|
||||
version = '1.2.0'
|
||||
version = '1.2.1'
|
||||
|
@@ -60,12 +60,14 @@ def post_process() -> None:
|
||||
|
||||
def enhance_face(target_face: Face, temp_frame: Frame) -> Frame:
|
||||
start_x, start_y, end_x, end_y = map(int, target_face['bbox'])
|
||||
with THREAD_SEMAPHORE:
|
||||
_, _, temp_face = get_face_enhancer().enhance(
|
||||
temp_frame[start_y:end_y, start_x:end_x],
|
||||
paste_back=True
|
||||
)
|
||||
temp_frame[start_y:end_y, start_x:end_x] = temp_face
|
||||
temp_face = temp_frame[start_y:end_y, start_x:end_x]
|
||||
if temp_face.size:
|
||||
with THREAD_SEMAPHORE:
|
||||
_, _, temp_face = get_face_enhancer().enhance(
|
||||
temp_face,
|
||||
paste_back=True
|
||||
)
|
||||
temp_frame[start_y:end_y, start_x:end_x] = temp_face
|
||||
return temp_frame
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user