stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: Restore Faces Error

Open AayushSoni007 opened this issue 3 years ago • 8 comments

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 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

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

AayushSoni007 avatar Nov 22 '22 09:11 AayushSoni007

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.

erusiamu avatar Dec 09 '22 22:12 erusiamu

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.

dexterhuh avatar Jan 24 '23 11:01 dexterhuh

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

XenoXenonZ avatar Jan 29 '23 05:01 XenoXenonZ

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!

zzxxccii avatar Feb 17 '23 10:02 zzxxccii

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!

openrox avatar Feb 18 '23 11:02 openrox

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!

shiverwang avatar Mar 01 '23 14:03 shiverwang

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

Cuxiagui avatar Mar 07 '23 09:03 Cuxiagui

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 !

Dimsonz avatar Mar 08 '23 14:03 Dimsonz

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

gulu233 avatar May 21 '23 03:05 gulu233

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

k0001111 avatar Aug 25 '23 08:08 k0001111

Duplicate of https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/7593

catboxanon avatar Aug 26 '23 08:08 catboxanon

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

yasainet avatar Dec 12 '23 16:12 yasainet

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

FirePhoenix231 avatar Dec 29 '23 15:12 FirePhoenix231