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

upscaling with Real ESRGAN fails on CUDA platform #77

Closed
ssube opened this issue Jan 22, 2023 · 1 comment
Closed

upscaling with Real ESRGAN fails on CUDA platform #77

ssube opened this issue Jan 22, 2023 · 1 comment
Labels
status/fixed issues that have been fixed and released type/bug broken features
Milestone

Comments

@ssube
Copy link
Owner

ssube commented Jan 22, 2023

When DirectML is not available, upscaling fails:

2023-01-22T22:25:53.909984287Z /usr/local/lib/python3.8/dist-packages/onnxruntime/capi/onnxruntime_inference_collection.py:54: UserWarning: Specified provider 'DmlExecutionProvider' is not in available provider names.Available providers: 'TensorrtExecutionProvider, CUDAExecutionProvider, CPUExecutionProvider'
2023-01-22T22:25:53.909990197Z   warnings.warn(
2023-01-22T22:25:53.909993827Z exception calling callback for <Future at 0x7fd32e57b100 state=finished raised TypeError>
2023-01-22T22:25:53.909997797Z Traceback (most recent call last):
2023-01-22T22:25:53.910001297Z   File "/usr/lib/python3.8/concurrent/futures/_base.py", line 328, in _invoke_callbacks
2023-01-22T22:25:53.910005147Z     callback(self)
2023-01-22T22:25:53.910008527Z   File "/usr/local/lib/python3.8/dist-packages/flask_executor/executor.py", line 37, in propagate_exceptions_callback
2023-01-22T22:25:53.910012557Z     raise exc
2023-01-22T22:25:53.910015987Z   File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
2023-01-22T22:25:53.910019987Z     result = self.fn(*self.args, **self.kwargs)
2023-01-22T22:25:53.910023517Z   File "/usr/local/lib/python3.8/dist-packages/flask_executor/executor.py", line 29, in wrapper
2023-01-22T22:25:53.910027937Z     return fn(*args, **kwargs)
2023-01-22T22:25:53.910031247Z   File "/usr/local/lib/python3.8/dist-packages/flask/ctx.py", line 182, in wrapper
2023-01-22T22:25:53.910034907Z     return ctx.app.ensure_sync(f)(*args, **kwargs)
2023-01-22T22:25:53.910038297Z   File "/onnx-web/api/onnx_web/pipeline.py", line 122, in run_txt2img_pipeline
2023-01-22T22:25:53.910041987Z     image = upscale_resrgan(ctx, upscale, image)
2023-01-22T22:25:53.910045397Z   File "/onnx-web/api/onnx_web/upscale.py", line 152, in upscale_resrgan
2023-01-22T22:25:53.910048987Z     upsampler = make_resrgan(ctx, params, tile=512)
2023-01-22T22:25:53.910052367Z   File "/onnx-web/api/onnx_web/upscale.py", line 135, in make_resrgan
2023-01-22T22:25:53.910068437Z     upsampler = RealESRGANer(
2023-01-22T22:25:53.910072207Z   File "/usr/local/lib/python3.8/dist-packages/realesrgan/utils.py", line 70, in __init__
2023-01-22T22:25:53.910075977Z     model.load_state_dict(loadnet[keyname], strict=True)
2023-01-22T22:25:53.910079407Z TypeError: load_state_dict() got an unexpected keyword argument 'strict'

The request's provider is not being passed to the upscaling pipeline's inference session.

@ssube ssube added this to the v0.5 milestone Jan 22, 2023
@ssube ssube added status/new issues that have not been confirmed yet type/bug broken features status/progress issues that are in progress and have a branch and removed status/new issues that have not been confirmed yet labels Jan 22, 2023
@ssube
Copy link
Owner Author

ssube commented Jan 22, 2023

This was not just a CUDA issue, it was caused by renaming a keyword argument in 9d0a159, and should be fixed with 9bff64c

@ssube ssube closed this as completed Jan 22, 2023
@ssube ssube added status/fixed issues that have been fixed and released and removed status/progress issues that are in progress and have a branch labels Jan 22, 2023
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

No branches or pull requests

1 participant