Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Restore Faces Error #4951

Closed
1 task done
AayushSoni007 opened this issue Nov 22, 2022 · 13 comments
Closed
1 task done

[Bug]: Restore Faces Error #4951

AayushSoni007 opened this issue Nov 22, 2022 · 13 comments
Labels
asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance

Comments

@AayushSoni007
Copy link

Is there an existing issue for this?

  • 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
gg
Capture

Steps to reproduce the problem

  1. Txt2img or img2img
  2. 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

828438b

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

@AayushSoni007 AayushSoni007 added the bug-report Report of a bug, yet to be confirmed label Nov 22, 2022
@erusiamu
Copy link

erusiamu commented Dec 9, 2022

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.

@dexterhuh
Copy link

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.

@XenoXenonZ
Copy link

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

@zzxxccii
Copy link

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!

@openrox
Copy link

openrox commented Feb 18, 2023

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!

@shiverwang
Copy link

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!

@Cuxiagui
Copy link

Cuxiagui commented Mar 7, 2023

得到了一个对我有用的修复程序。当您第一次使用面部还原功能时,它应该从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

@Dimsonz
Copy link

Dimsonz commented Mar 8, 2023

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 !

@gulu233
Copy link

gulu233 commented May 21, 2023

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

@k0001111
Copy link

Hi People, none of above methods helped mi. Error still exist. HEEELP!

@catboxanon
Copy link
Collaborator

Duplicate of #7593

@catboxanon catboxanon marked this as a duplicate of #7593 Aug 26, 2023
@catboxanon catboxanon added asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance and removed bug-report Report of a bug, yet to be confirmed labels Aug 26, 2023
@yasainet
Copy link

私にとってうまくいった修正がありました。初めて顔復元機能を使用するときは、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)!

@FirePhoenix231
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance
Projects
None yet
Development

No branches or pull requests