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

[Feafure request]= Allow for choosing separate VAE (for hiresfix with 1.5 to XL and the opposite) #6

Open
Dawgmastah opened this issue Feb 10, 2024 · 11 comments

Comments

@Dawgmastah
Copy link

TItle, would be interesting to have the option, currently you can change checkpoint but not compatible between both arquitectures

@light-and-ray
Copy link

You can set vae for every checkpoint inside "Checkpoints" tab, next to "Lora" tab, and then use only "automatic" mode for vae

@w-e-w
Copy link
Owner

w-e-w commented Feb 10, 2024

tldr
it might be possible done with an extension but the implementation will be very very ugly
and even if it's implemented it's likely going to be easy to break especially when mixing with other extensions
it's better that if this is gonna be implemented it be directly implemented in web UI

@light-and-ray
Copy link

About this issue: I think we should be sure this method is better then just decode vae and then encode back

@w-e-w
Copy link
Owner

w-e-w commented Feb 10, 2024

About this issue: I think we should be sure this method is better then just decode vae and then encode back

that's easier said than done, the code is programmed by Italians who loves spaghetti

@Dawgmastah
Copy link
Author

You can set vae for every checkpoint inside "Checkpoints" tab, next to "Lora" tab, and then use only "automatic" mode for vae

@light-and-ray In theory yeah, and I've tried it lots of times. The end image ends up no looking right. Im doing SDXL->1.5, and even though the log says the vae was loaded for 1.5, the end image ends up looking blueish and wrong.

Unless theres somehting im missing or a setting thats colliding with this, doesnt really work.

@w-e-w
Copy link
Owner

w-e-w commented Feb 11, 2024

this is from memory so I might remember something wrong

the issue is that and why I said the code is spaghetti is because in hires fix the vae decode of the first pass happens near the beginning at the hires stage
but switch model request is done at the end of the first pass stage before entering hires stage

which means if you go from SD 1.5 to SDXL is you will decode the first pass 1.5 using XL VAE

@light-and-ray
Copy link

Maybe I should go back to developing img2img hiresfix as selectable script, and if everything go ok, port it in txt2img with a kind of compatibility layer. Unfortunately in discord nobody answers me, and I abandoned. And I m not sure am I really need it, because I've added custom mask in my replacer extension

Btw inpaint hires fix has much more options like extra mask dilate/blur/padding, and they really works. Also it's a good idea to add hires fix seed. So if I'll add it, it must be an always on script

Also I think I can't wait answering from auto, he it very busy as I see. At least I can discard spirky ✨ button and convert it into an extension

@light-and-ray
Copy link

Btw @w-e-w using of your style of masking like from your nudenet extras script with a button for creating canvas I've found it helps to solve performance issue with inpainting by downscaling image inside created canvas. Maybe in inpainting tab I can try to make a hidden image box for the original image, and send a downscaled image into masking image box. It can prevent ui performance issue for 4k images etc. But I need to think about it only if I add inpaint hires fix

@w-e-w
Copy link
Owner

w-e-w commented Feb 11, 2024

Btw @w-e-w using of your style of masking like from your nudenet extras script with a button for creating canvas I've found it helps to solve performance issue with inpainting by downscaling image inside created canvas. Maybe in inpainting tab I can try to make a hidden image box for the original image, and send a downscaled image into masking image box. It can prevent ui performance issue for 4k images etc. But I need to think about it only if I add inpaint hires fix

I don't really want to touch that thing until after we upgrade to Gradio 4

@w-e-w
Copy link
Owner

w-e-w commented Feb 11, 2024

Unfortunately in discord nobody answers me, and I abandoned

I didn't reply you on that because I'm personally not too interested
not sure about what other think, if you're really interested you can always ask again

@light-and-ray
Copy link

Oh, yes, gradio 4... Went out of my head

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants