OpenTalker / video-retalking

[SIGGRAPH Asia 2022] VideoReTalking: Audio-based Lip Synchronization for Talking Head Video Editing In the Wild
https://opentalker.github.io/video-retalking/
Apache License 2.0
6.36k stars 943 forks source link

UnboundLocalError: local variable 'mask_sharp' referenced before assignment ? WIN11 RTX 3050 #149

Open Someonetoldme584 opened 10 months ago

Someonetoldme584 commented 10 months ago

File "inference.py", line 345, in main() File "inference.py", line 201, in main pred, , = enhancer.process(img, img, face_enhance=True, possion_blending=False) File "C:\AI\opentalker\video-retalking\third_part\GPEN\gpen_face_enhancer.py", line 113, in process mask_sharp = cv2.GaussianBlur(mask_sharp, (0,0), sigmaX=1, sigmaY=1, borderType = cv2.BORDER_DEFAULT) UnboundLocalError: local variable 'mask_sharp' referenced before assignment

PhilGauthier commented 10 months ago

Same here, with Windows10, RTX A4500

sysuchenpc commented 10 months ago

same

alexmgee commented 10 months ago

Also experiencing this.

Not smart enough to touch the code.

PhilGauthier commented 10 months ago

I added this line 61 third_part\GPEN\gpen_face_enhancer.py to initialize mask_sharp : mask_sharp = full_mask.copy() It seems to work but not sure at all it's a good fix.

AIhasArrived commented 10 months ago

Hello @PhilGauthier , did it work since yesterday? (Also you memntioned A4500 how did you get that?)