-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Error: 'NoneType' object has no attribute 'enhance' #487
Comments
I confirm the issue is visible in the current For MPSThis PR fix it for MacOS MPS because it loads Real-ESRGAN from the binary rather the Python Library. When I switch to this PR upscale work. When on current
When I switched to the PR #424 the terminal output is: (Successful)
|
For System other than MPSThe issue happens because the code base will load a model for 2x and x4 scaling only. To understand the error on CUDA.The error happens in:
When we dive deep this happens because of the following code which is executed only on CUDA platform: model_path = {
2: 'https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth',
4: 'https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth',
}
if upsampler_scale not in model_path:
return None As we can see it load model for upscale at x2 and x4, but no model for x3 which returns None. This is what generates the |
As of today the x3 cannot work with the implementation of the python lib of Real-ESRGAN. While it works if we use the Bin. We need to revert this PR: #442 (I will do the revert) cc: @lstein |
@glonlas could you confirm that upscaling is now working on the Macintosh platform? Please check either "development" HEAD, or the tag release-candidate-1.14.2. Thnx |
For the time being it works (1.14.3). In the future, it may be worth looking into using the executables (there's versions for Linux/Windows/Mac) if these reports I found running it are not isolated to my machine. https://github.com/lstein/stable-diffusion/discussions/511#discussioncomment-3624882 (about quality and time). But anyway, it works |
Describe your environment
git status
says anything other than "On branch main" paste it here] developmentgit show
and paste the line that starts with "Merge" here] bfb2781Describe the bug
Error
'NoneType' object has no attribute 'enhance'
when using GFPGAN via the Web UI.To Reproduce
On MPS:
Steps to reproduce the behavior:
python scripts/dream.py --full_precision --web
Upscaling Level = x2|x3|x4
(GPFGAN Strength
can be anything)On CUDA
Steps to reproduce the behavior:
python scripts/dream.py --full_precision --web
Upscaling Level = x3
(GPFGAN Strength
can be anything)The terminal will return
Expected behavior
The generation of the image works with GPFGAN and Upscaling without any trouble.
The text was updated successfully, but these errors were encountered: