-
Notifications
You must be signed in to change notification settings - Fork 45
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
Firstpass height and width with hi-res fix in img2img? #137
Comments
hires fix is a txt2img function exposed in A1111 webUI and thus can't be applied with img2img - the "inpaint full resolution" option is probably the most adjacently similar function for img2img :/ dream/txt2img automatic hrfix option previously calculated its x/y values by simply halving the value of the resolution slider and applying it to both x and y axes as reticles used to be purely square. testing branch commit c9a768d adds a hacky (what a surprise) quick fix to set the x/y values against the actual returned boundary box dimensions. |
alright, actually @Drakmour if you've already ran basically, it steps between 0/256/512/768 - set it to 0 to turn off max pixel values, and you can of course click the slider to type a manual integer value, but tl;dr - set the slider and if the automatic hrfix value is > slider value, slider value is used, either X or Y axis. for example, an image dreamed at 960x1408 with a lock value of 512 sets firstpass height to 512, and firstpass width to 480. a 1920x1856 clamped to 512 firstpasses at... 512x512 of course. 768 was chosen as a ceiling for the moment since that's the largest training data any model's been based on so far. anyway, let me know if this is more useful :) |
I don't know, maybe it's just me and my bad skills, but now img2img doesn't do anything on any denoise level. It just sharpens image a bit and nothing else changes. With or without tick in HRfix. I just put git pull during launch and I think it automatically updated. Or I still need to do "git checkout testing". A still didn't understand how to do it. :-D My extention path is this - c:\SUPER SD 2.0\stable-diffusion-webui\extensions\openOutpaint-webUI-extension |
I found a reason why I had no results. In img2img if you have no mask you have to put tick in "invert mask", or it will try to img2img non-existing mask. If you put inverted mask, it will img2img the whole image cuz it is the "inverted" part of non existing mask. :-D A bit confusing. |
hrfix option doesn't happen at all anywhere if you're using img2img - it'll only do anything whatsoever on a completely new dream over blank space as that's the only txt2img operation that occurs in openOutpaint. inpainting/outpainting/img2img tool all use the img2img functionality of A1111 which doesn't have hrfix anywhere in the process chain. otherwise, yeah, the invert mask option should be enabled when you select the img2img tool unless you'd disabled it earlier in the session, but i can see how that'd be a bit awkward; there's now more clarity regarding the option in the manual.
ah, wasn't aware you were using the extension. you might've checked out the testing branch for that instead. so you'd do the following:
that'll switch the openOutpaint gitmodule in the extension to the testing branch and should put the extension back on the main branch. the extension will try to update the submodule each time it's initialized (whenever gradio re/starts) so you may end up with unexpected bugs/side effects if you stay on the testing branch as that's where stuff in testing goes. you'll likely want to switch back to main by replacing "testing" back to "main" in the |
Ok. I switched to test branch. Thanks for the explanation. |
yeah, unfortunately all i've got on that one is "work in greater detail using smaller regions" :/ not much of a fix really i was actually looking into adding a selector for the img2img inpaint modes last night and those should be added to openOutpaint fairly soon; can't give an exact timeframe unfortunately due to holidays and family events, but those are definitely planned to show up 👍 |
Good to know. I just can't come up with a plan ho to make img2img without morbid results. If I make 512x512 and then try to upscale, it's pointless cuz 512 has so much less details than 1200+, and every img2img upscale from 512 to 1200+ even with low denoising will still get morbid results during the generation and will slowly change image from the initial one... :-( |
img2img inpaint mode selector should exist now on the testing branch; it's nothing fancy, just delivers what it says on the tin :) |
hey well thanks to the massive changes to HRfix, none of the above is even relevant anymore so that's neat there's a new hrfix scale slider to work like a traditional upscaler, and a "lie to hrfix" option in the gear/config menu which will set the resolution requested from webUI to the divided value against the hrfix scale; that way, webUI "upscales" an image from... whatever resolution into one that'll fit the reticle correctly |
closing this as moot given the upstream HRfix craziness of late, plus the original bug of non-square ratios was fixed, plus plus HRfix isn't a thing in img2img in the first place |
Discussed in #136
Originally posted by Drakmour December 30, 2022
I can't find where to put the initial resolution for hi-res fix in img2img of OpenOutpaint. Like firstpass height and width in text2img. Is there such option? I've read that right now it decrease the resolution x2 and then generate, but if my image is more than 1024 and is not square it still result in morbid multiple characters. I'd like to have an option to make firstpass 512x512 and then resize to my end resolution. It 99% works in text2img and should work in img2img. In text2img I get random result, while in img2img I can draw a sketch of pose of character myself to have much more control of the result.
The text was updated successfully, but these errors were encountered: