[Bug]: Restore Faces Error
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
Runtime Error : unexpected EOF, expected 440767 more bytes. The file might be corrupted.
I am getting this error whenever i try to use Restore Faces option
Steps to reproduce the problem
- Txt2img or img2img
- Check the Restore faces box 3 after running the prompt, there's no output. And the error shows up in cmd
What should have happened?
The faces should be fixed and there should be an output present
Commit where the problem happens
828438b4a190759807f9054932cae3a8b880ddf1
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Mozilla Firefox
Command Line Arguments
No response
Additional information, context and logs
No response
Delete the file GFPGANv1.4.pth from stable-diffusion-webui\models\GFPGAN and run the image generation. The model should download automatically and work correctly. I solved the same problem this way.
Delete the file GFPGANv1.4.pth from stable-diffusion-webui\models\GFPGAN and run the image generation. The model should download automatically and work correctly. I solved the same problem this way.
I got exactly the same issue as this and GFPGAN folder was empty.
FYI when I first used Restore Faces, there were some downloads happening and a connection issue happened that interrupt download.
Got a fix that worked for me. when u first use the face restore feature it should download some files from Github. The error seems to happen because the download was incomplete before the program tried to use these files, so it thought the files were corrupted. So I checked the error log and found the links to these files, downloaded manually from Github and put them into the target path(in the error log of course), and that fixed the problem.
Here's the links to the files I needed and where I put them into, may be of some help to you: https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth ---> /stable-diffusion-webui/models/Codeformer/codeformer-v0.1.0.pth https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth ---> /stable-diffusion-webui/repositories/CodeFormer/weights/facelib/detection_Resnet50_Final.pth https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/parsing_parsenet.pth ---> /stable-diffusion-webui/repositories/CodeFormer/weights/facelib/parsing_parsenet.pth
Delete the file GFPGANv1.4.pth from stable-diffusion-webui\models\GFPGAN and run the image generation. The model should download automatically and work correctly. I solved the same problem this way.
this works!
Delete the file GFPGANv1.4.pth from stable-diffusion-webui\models\GFPGAN and run the image generation. The model should download automatically and work correctly. I solved the same problem this way.
Same problem bothered me days, searched thousand of codings could not, your way is the best best, simple and working right away!
Got a fix that worked for me. when u first use the face restore feature it should download some files from Github. The error seems to happen because the download was incomplete before the program tried to use these files, so it thought the files were corrupted. So I checked the error log and found the links to these files, downloaded manually from Github and put them into the target path(in the error log of course), and that fixed the problem.
Here's the links to the files I needed and where I put them into, may be of some help to you: https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth ---> /stable-diffusion-webui/models/Codeformer/codeformer-v0.1.0.pth https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth ---> /stable-diffusion-webui/repositories/CodeFormer/weights/facelib/detection_Resnet50_Final.pth https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/parsing_parsenet.pth ---> /stable-diffusion-webui/repositories/CodeFormer/weights/facelib/parsing_parsenet.pth
This works!thank you, you are my hero!
得到了一个对我有用的修复程序。当您第一次使用面部还原功能时,它应该从Github下载一些文件。该错误似乎是因为在程序尝试使用这些文件之前下载不完整,因此它认为文件已损坏。所以我检查了错误日志并找到了这些文件的链接,这些文件从 Github 手动下载并将它们放入目标路径(当然是在错误日志中),这解决了问题。
以下是我需要的文件的链接以及我将它们放入的位置,可能对您有所帮助: https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth ---> /stable-diffusion-webui/models/Codeformer/codeformer-v0.1.0.pth https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth ---> /stable-diffusion-webui/repository/CodeFormer/weights/facelib/detection_Resnet50_Final.pth https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/parsing_parsenet.pth ---> /stable-diffusion-webui/repositories/CodeFormer/weights/facelib/parsing_parsenet.pth
This works!thank you
Got a fix that worked for me. when u first use the face restore feature it should download some files from Github. The error seems to happen because the download was incomplete before the program tried to use these files, so it thought the files were corrupted. So I checked the error log and found the links to these files, downloaded manually from Github and put them into the target path(in the error log of course), and that fixed the problem.
Here's the links to the files I needed and where I put them into, may be of some help to you: https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth ---> /stable-diffusion-webui/models/Codeformer/codeformer-v0.1.0.pth https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth ---> /stable-diffusion-webui/repositories/CodeFormer/weights/facelib/detection_Resnet50_Final.pth https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/parsing_parsenet.pth ---> /stable-diffusion-webui/repositories/CodeFormer/weights/facelib/parsing_parsenet.pth
This Work! Thanks !
Downloading: "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth" to /mnt/workspace/stable-diffusion-webui/models/Codeformer/codeformer-v0.1.0.pth
100%|████████████████████████████████████████| 359M/359M [00:11<00:00, 33.6MB/s] Downloading: "https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth" to /mnt/workspace/stable-diffusion-webui/repositories/CodeFormer/weights/facelib/detection_Resnet50_Final.pth
100%|████████████████████████████████████████| 104M/104M [01:00<00:00, 1.81MB/s] Downloading: "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/parsing_parsenet.pth" to /mnt/workspace/stable-diffusion-webui/repositories/CodeFormer/weights/facelib/parsing_parsenet.pth
Hi People, none of above methods helped mi. Error still exist. HEEELP!
Duplicate of https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/7593
私にとってうまくいった修正がありました。初めて顔復元機能を使用するときは、Github からいくつかのファイルをダウンロードする必要があります。このエラーは、プログラムがこれらのファイルを使用しようとする前にダウンロードが不完全であったため、ファイルが破損していると考えられたために発生したようです。そこで、エラー ログをチェックしてこれらのファイルへのリンクを見つけ、Github から手動でダウンロードしてターゲット パス (もちろんエラー ログ内) に配置したところ、問題は解決しました。
私が必要としたファイルとそのファイルの保存場所へのリンクは次のとおりです。参考になるかもしれません: https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth ---> /stable-diffusion-webui/models/Codeformer/codeformer-v0.1.0.pth https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth ---> /stable-diffusion- webui/repositories/CodeFormer/weights/facelib/detection_Resnet50_Final.pth https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/parsing_parsenet.pth ---> /stable-diffusion-webui/repositories/CodeFormer /weights/facelib/parsing_parsenet.pth
Thanks to you I have solved the problem (TT)!
Got a fix that worked for me. when u first use the face restore feature it should download some files from Github. The error seems to happen because the download was incomplete before the program tried to use these files, so it thought the files were corrupted. So I checked the error log and found the links to these files, downloaded manually from Github and put them into the target path(in the error log of course), and that fixed the problem.
Here's the links to the files I needed and where I put them into, may be of some help to you: https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth ---> /stable-diffusion-webui/models/Codeformer/codeformer-v0.1.0.pth https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth ---> /stable-diffusion-webui/repositories/CodeFormer/weights/facelib/detection_Resnet50_Final.pth https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/parsing_parsenet.pth ---> /stable-diffusion-webui/repositories/CodeFormer/weights/facelib/parsing_parsenet.pth
lifesaver