-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
[ Request ] Integration of an upscaler and face restoration #56
Comments
I think something along the lines of A1111's Hires fix would really hit the sweet spot. Amazing work @MoonRide303, also recommend adding a coffee/donate button somewhere so we can pitch in to support the work. |
Upscaling is now possible in v2.0.12 via Image-2-Image - see example in Wiki. |
What a legend! Thank you. |
@Acephalia With support for img2img and custom resolutions already in place I just needed to add some small tweaks in code preparing img2img input - I should think of it earlier, to be honest :). |
The fact that you already had it partially implemented = legend x2 I gave it a go and it works pretty well. Is it possible to extend it to perhaps use an upscaler model? Or do you reckon running it back purely through SDXL and the refiner gives better results? |
@Acephalia Simple upscaler models I tested so far are unable to understand broader context of the image, and they tend to introduce bad-looking artifacts (like sharpening areas of the image that shouldn't be sharpened) - so for the time being I'd just stick to img2img method powered by full SDXL models. Bonus feature of this approach: you can also play with img2img parameters, seed, prompt, and Control-LoRAs to check different variants :). |
Yep that does make sense and I'm definitely liking this approach. The only thing I'm finding a tad tedious is to manually calculate the upscale values and enter it in. How complex would it be to add a slider for the upscale size? ex 1x-2x range? or even a simple checkbox for 2x to just double it? Not a deal breaker in any way but definitely be a nice QOL add on. |
@Acephalia Yeah, it should be simpler - people shouldn't have to manually calculate resolutions. I will try figuring something out. |
I have to sign off for the evening but I was tinkering around a bit and might be able to help. Just need to figure out how to get the math function to overwrite the selected gradio value. Will report back tomorrow. |
@Acephalia It's not the math or Gradio - I was rather wondering how perfect UI for it should look like - cause it's pretty crowded already, and pushing even more stuff in there will just slowly turn it into another SD web UI, full of buttons and slider everywhere. |
@MoonRide303 ah yes. The ui problem. It’s inevitable with more customisation options. Happy mediums I guess. Could you potentially group all extra parameters under a expander that is contracted by default to clean it up? My suggestions would be to : Irrespectively; adding a slider to upscale either under the resolution or image2image tab isn’t going to make it an eye sore imho. It’s still very streamlined and far away from auto1111 territory. |
Higher resolutions don't really work too well in txt2img (SDXL needs to stay around 1 MP when generating from scratch), so I made dedicated Image-2-Image Scale slider, working only in img2img mode - should be much more convenient to use, now :). 1 + 2 + 3 good idea, 4 +5 keeping as it is (at least for now). Done as commit 426088e (part of v2.0.18). No plans for face restorations in nearby future, so nothing more left to do in this issue - closing. |
Thank you Moonride303 for this fantastic upgrade of Fooocus. It is gold. The only thing which is still missing in Fooocus is an integration of an upscaler like Esrgan and a face restoration like Codeformer/Gfpgan. Thank you for your work!
The text was updated successfully, but these errors were encountered: