CodeFormers, Restore Faces yields "AttributeError: 'FaceRestoreHelper' object has no attribute 'face_det'" #10059
Replies: 2 comments 1 reply
-
Have you solved this problem yet? I encountered the same problem and would like to share a solution if it is convenient. and how many versions of facexlib do you have? “#self.face_helper.face_det.to(device)” , I try comment out the code at the error location, it worked. but i do not know what impact will face repair have,so i would like to ask how you solved this problem.Looking forward to your reply. |
Beta Was this translation helpful? Give feedback.
-
you should modify the "self.face_helper.face_det.to(device)" to "self.face_helper.face_detector.to(device)". since there is no member named face_det in class. see https://github.com/sczhou/CodeFormer/blob/master/facelib/utils/face_restoration_helper.py#LL119C16-L119C16 |
Beta Was this translation helpful? Give feedback.
-
python: 3.10.10 • torch: 2.0.0+cu118 • xformers: 0.0.17 • gradio: 3.23.0 • checkpoint: [0b914c246e]
CodeFormers is the latest available (happened previously with one from 2 weeks ago as well). Whenever I try to run "Restore Faces", whether in Extras or in 2img, I get the above error.
I can't find any mention of this error online, so I figured asking here couldn't hurt.
Beta Was this translation helpful? Give feedback.
All reactions