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]: Extras tab -> GFPGAN -> ValueError: max() arg is an empty sequence -> process does not start #14393

Closed
2 of 6 tasks
BorowikWlodek opened this issue Dec 21, 2023 · 4 comments
Labels
bug Report of a confirmed bug

Comments

@BorowikWlodek
Copy link

BorowikWlodek commented Dec 21, 2023

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

When trying to use GFPGAN, it displays ValueError: max() arg is an empty sequence in the WEBUI and a number of errors in the console.
Zrzut ekranu 2023-12-21 145247

The problem occurs with both fresh AUTOMATIC1111 and personalized by extensions.

Steps to reproduce the problem

Extras tab -> Single Image-> GFPGAN -> Choose value -> Generate

What should have happened?

Upscale a image

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

RTX 4070ti
Zrzut ekranu 2023-12-21 145711

Console logs

*** Error completing request
*** Arguments: ('task(xqrd3p3m78grsz1)', 0, <PIL.Image.Image image mode=RGB size=600x896 at 0x1E00852BEB0>, None, '', '', True, 1, 4, 512, 512, True, 'Lanczos', 'None', 0.213, True, 1, False, 1, 0, False, 0.9, 0.15, 0.5, False, False, 384, 768, 4096, 409600, 'Maximize area', 0.1, False, ['Deepbooru'], False, ['Horizontal'], False, 0.5, 0.2) {}
    Traceback (most recent call last):
      File "C:\Users\Administrator\Desktop\stable-diffusion-webui\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "C:\Users\Administrator\Desktop\stable-diffusion-webui\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "C:\Users\Administrator\Desktop\stable-diffusion-webui\modules\postprocessing.py", line 132, in run_postprocessing_webui
        return run_postprocessing(*args, **kwargs)
      File "C:\Users\Administrator\Desktop\stable-diffusion-webui\modules\postprocessing.py", line 73, in run_postprocessing
        scripts.scripts_postproc.run(initial_pp, args)
      File "C:\Users\Administrator\Desktop\stable-diffusion-webui\modules\scripts_postprocessing.py", line 196, in run
        script.process(single_image, **process_args)
      File "C:\Users\Administrator\Desktop\stable-diffusion-webui\scripts\postprocessing_gfpgan.py", line 25, in process
        restored_img = gfpgan_model.gfpgan_fix_faces(np.array(pp.image, dtype=np.uint8))
      File "C:\Users\Administrator\Desktop\stable-diffusion-webui\modules\gfpgan_model.py", line 60, in gfpgan_fix_faces
        model = gfpgann()
      File "C:\Users\Administrator\Desktop\stable-diffusion-webui\modules\gfpgan_model.py", line 38, in gfpgann
        latest_file = max(gfp_models, key=os.path.getctime)
    ValueError: max() arg is an empty sequence

Additional information

No response

@BorowikWlodek BorowikWlodek added the bug-report Report of a bug, yet to be confirmed label Dec 21, 2023
@sovkil
Copy link

sovkil commented Dec 21, 2023

I have the same error, I don’t understand what can fix it

@missionfloyd missionfloyd added bug Report of a confirmed bug and removed bug-report Report of a bug, yet to be confirmed labels Dec 22, 2023
@missionfloyd
Copy link
Collaborator

missionfloyd commented Dec 22, 2023

It's not downloading GFPGANv1.4.pth. Seems to be caused by #13718.

You can download it manually and put it in models/GFPGAN
https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.4.pth

@BorowikWlodek
Copy link
Author

Ok, its work fine right now. Thank you for help.

@Serjio7777
Copy link

Thank you for help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report of a confirmed bug
Projects
None yet
Development

No branches or pull requests

4 participants