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

using GFPGAN correction with SD upscaling causes a model error in Real ESRGAN #87

Closed
ssube opened this issue Jan 31, 2023 · 2 comments · Fixed by #131
Closed

using GFPGAN correction with SD upscaling causes a model error in Real ESRGAN #87

ssube opened this issue Jan 31, 2023 · 2 comments · Fixed by #131
Assignees
Labels
status/fixed issues that have been fixed and released type/bug broken features
Milestone

Comments

@ssube
Copy link
Owner

ssube commented Jan 31, 2023

Enabling the face correction option while using a GFPGAN model in combination with a Stable Diffusion upscaling model will then pass the SD model to the ESRGAN background upscaler, causing an error:

  File "C:\Users\ssube\stabdiff\onnx-try-2\onnx-web\api\onnx_web\chain\base.py", line 93, in __call__
    image = stage_pipe(ctx, stage_params, params, image,
  File "C:\Users\ssube\stabdiff\onnx-try-2\onnx-web\api\onnx_web\chain\correct_gfpgan.py", line 72, in correct_gfpgan
    gfpgan = load_gfpgan(ctx, upscale, upsampler=upsampler)
  File "C:\Users\ssube\stabdiff\onnx-try-2\onnx-web\api\onnx_web\chain\correct_gfpgan.py", line 34, in load_gfpgan
    upsampler = load_resrgan(ctx, upscale)
  File "C:\Users\ssube\stabdiff\onnx-try-2\onnx-web\api\onnx_web\chain\upscale_resrgan.py", line 34, in load_resrgan
    raise Exception('Real ESRGAN model not found at %s' % model_path)
Exception: Real ESRGAN model not found at ..\models\upscaling-stable-diffusion-x4.onnx

The error is complaining that the .onnx file does not exist, but SD pipelines are stored in a directory, and wouldn't work for the ESRGAN upscaler anyway.

@ssube ssube added status/new issues that have not been confirmed yet type/bug broken features labels Jan 31, 2023
@ssube ssube added this to the v0.6 milestone Feb 2, 2023
@ssube
Copy link
Owner Author

ssube commented Feb 3, 2023

This will be part of the larger valid-combination-of-parameters effort.

@ssube ssube modified the milestones: v0.6, v0.7 Feb 3, 2023
@ssube ssube mentioned this issue Feb 6, 2023
68 tasks
@ssube ssube added status/fixed issues that have been fixed and released and removed status/new issues that have not been confirmed yet labels Feb 12, 2023
@ssube ssube self-assigned this Feb 12, 2023
@ssube
Copy link
Owner Author

ssube commented Feb 12, 2023

The Real ESRGAN upsampler for GFPGAN was something that I had unintentionally enabled, so I've removed that for now in favor of the upscale model/tab that is already available. That allows mixing SD upscaling with GFPGAN, but if you set face outscale > 1, forces GFPGAN to use Lanczos interpolation instead of an SR model.

@ssube ssube mentioned this issue Feb 14, 2023
51 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/fixed issues that have been fixed and released type/bug broken features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant