-
Notifications
You must be signed in to change notification settings - Fork 277
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
add sd-webui-aurasr #356
base: extensions
Are you sure you want to change the base?
add sd-webui-aurasr #356
Conversation
I don't see a reason why it's needed to save image before passing into aurasr library. It accepts pil images doesn't it? I remember I tried to make the same extension, but I disliked the result and canceled it. But the 2nd model maybe good Maybe it doesn't accept pil image for upscaling with tiling, but you can just copy tiling code from other upscalers in sd-webui |
Nope, everything is okay https://github.com/fal-ai/aura-sr/blob/main/aura_sr.py#L868 it receives pil image You make useful saving here # Convert the input image to RGB and save it to the input file path
-> img.convert('RGB').save(fileIn, quality=100)
# Get the AuraSR model
aura_sr = get_aura_sr_model()
# Open the input image
-> input_image = Image.open(fileIn) # <- just use img instead
# Upscale the input image using AuraSR
upscaled_image = aura_sr.upscale_4x_overlapped(input_image)
# Save the upscaled image to the output file path
upscaled_image.save(fileOut, quality=100) And also here: # Save the upscaled image to the output file path
-> upscaled_image.save(fileOut, quality=100)
# Check if the output file exists
if not os.path.exists(fileOut):
raise Exception("AuraSR didn't process any image")
# Return the output image
-> return Image.open(fileOut) # <- just use upscaled_image instead |
yeah the reason I haven't merged this one was because I read the code and I don't think it makes sense |
I've edited the code, a little bit |
I suppose Andrey is a newbie if he makes these mistakes, so it's better for his skill to fix them by himself 😌 |
but and the webui may not even have CUDA
use this need to be fixed be fore adding to index your install.py is a total mess and bad for load time
|
Info
https://github.com/AndreyRGW/sd-webui-aurasr
Integrates AuraSR V2 upscaling feature into stable-diffusion-webui.
Checklist:
Readme.md
index.json
andextension_template.json
have not been modified.entry
is placed in theextensions
directory with the.json
file extension.