AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
139.11k stars 26.4k forks source link

If restore face is ON to generate txt2img I will have RuntimeError error #1511

Open dexterhuh opened 1 year ago

dexterhuh commented 1 year ago

Describe the bug

If restore face is ON to generate txt2img I will have RuntimeError error

I have finished downloaded everything and restart not help.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'local stable diffusion web ui'
  2. Input few correct prompt in txt2img with default argument
  3. Tap Generate

Expected behavior Images has been generated successfully

Actually Result

I have error below

File "E:\stable-diffusion-webui\modules\ui.py", line 136, in f res = list(func(*args, *kwargs)) File "E:\stable-diffusion-webui\webui.py", line 60, in f res = func(args, kwargs) File "E:\stable-diffusion-webui\modules\txt2img.py", line 41, in txt2img processed = process_images(p) File "E:\stable-diffusion-webui\modules\processing.py", line 367, in process_images x_sample = modules.face_restoration.restore_faces(x_sample) File "E:\stable-diffusion-webui\modules\face_restoration.py", line 19, in restore_faces return face_restorer.restore(np_image) File "E:\stable-diffusion-webui\modules\codeformer_model.py", line 76, in restore self.create_models() File "E:\stable-diffusion-webui\modules\codeformer_model.py", line 63, in create_models face_helper = FaceRestoreHelper(1, face_size=512, crop_ratio=(1, 1), det_model='retinaface_resnet50', save_ext='png', use_parse=True, device=devices.device_codeformer) File "E:\stable-diffusion-webui\repositories\CodeFormer\facelib\utils\face_restoration_helper.py", line 109, in init self.face_parse = init_parsing_model(model_name='parsenet', device=self.device) File "E:\stable-diffusion-webui\repositories\CodeFormer\facelib\parsing__init__.py", line 19, in init_parsing_model load_net = torch.load(model_path, map_location=lambda storage, loc: storage) File "E:\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 713, in load return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args) File "E:\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 938, in _legacy_load typed_storage._storage._set_from_file( RuntimeError: unexpected EOF, expected 1942397 more bytes. The file might be corrupted.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

theoretischer commented 1 year ago

Same Problem.

Echolink50 commented 1 year ago

Not sure if it's the same thing but make sure you have an internet connection

RozkladJazdy commented 1 year ago

Same problem, I have internet connection

ShadowFireSage commented 1 year ago

same problem and i believe my computer shut down the first time i used restore faces while it was downloading something so maybe the problem is missing data but no idea how to fix

uuleaf commented 1 year ago

Same problem, no one can fixed it , 55555

LarsOde commented 1 year ago

same here (img2img same)

666sxrA commented 1 year ago

目前来看是模型缺少问题,请下载模型到指定目录,参考 #2383

TheOnlyHolyMoly commented 1 year ago

Okay, the resolution approach related incident #2383 was to download the missing model files. The issue was flagged as "closed". Can this issue be then closed as well?