#Ideal Size [3.1+]

26 messages · Page 1 of 1 (latest)

stuck heath
#

This node takes in your target dimensions, Unet, and VAE, and outputs a width and height for initial generation using the model you've fed it (or so I hope). For example, asking for a 2048x2048 image would give you 512x512 with a SD 1.5 model. You can generate with that resolution to avoid duplication and other artifacts that plague models when images get too big, then upscale and enhance the resulting latents however you want.
https://github.com/JPPhoto/ideal-size-node

GitHub

An InvokeAI node for calculating ideal image sizes to avoid duplication - GitHub - JPPhoto/ideal-size-node: An InvokeAI node for calculating ideal image sizes to avoid duplication

gritty juniper
#

might have missed this - does this have an open PR?

full crest
#

Nice idea. Output of the multiplier to get back to the original resolution might be a good idea. Then that could be used in a resize/upscale node after generating at the best base size.

stuck heath
#

I put two integer fields in front of the node and use those to get to upscaling.

stuck heath
gritty juniper
#

hmmm I'm not sure - I could see it being one

#

@austere minnow do you have thoughts?

#

for now, maybe we just add it to the community nodes list?

#

ignore the part that says submit the PR against nodes you'll want to submit against main

stuck heath
#

So I make my own repo for this, upload it, then modify the communityNodes.md file to link to it and make a PR?

#

Just want to know what the procedure you envision is.

gritty juniper
#

you nailed it!

stuck heath
#

We'll see if I nailed it.

#

Going to get a lot of PRs as people add nodes. 😬

gritty juniper
#

Looks good to me! If you have an example graph to share that might be helpful as well

#

Agreed on the PRs front, but the other alternative for the time was to merge the actual nodes into the code base which felt messier

stuck heath
#

Not sure that I want to include an example graph at this point since nodes is very much beta... just... connect it and it works!

pliant dune
#

Would it be possible to have this maintain aspect ratio of the input width/height?
EDIT: Nevermind, I see this is implemented in the code.

stuck heath
#

Yep!

#

It tries its best but is subject to rounding to the nearest 8 pixels. You'll want to eventually do an image or latent resize to the correct target resolution.

stuck heath
#

I just updated this with a multiplier (float). If you're using a model that doesn't duplicate often or a ControlNet, you may find a larger initial generation size helpful. Setting this to 1.5 would act as if a version 1.5 model has internal dimensions of 768x768, for example.

stuck heath
#

Updated for 3.1.

stuck heath
#

Ideal Size (3.1 Compatible)

stuck heath
#

Ideal Size [3.1+]