-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Flux Redux cropping non square images. #1648
Comments
Clip vision always works on square (224x224) input images. crop=none means non-square image is stretched and its aspect ratio broken. I'm not sure how useful is it? At extremes it probably leads to bad proportions. Note that you can always prepare the image to be square yourself with transform tools, doing a mix of crop/stretch that you find acceptable. |
Hey thank you for the reply. Here is why it is useful from my perspective as a user. I read on BFL blog flux redux can be used to change the style of the image e.g. photo to anime. So I load my portrait 9:16 image to krita, set it as a reference and write a prompt to generate an anime image. To my surprise the result was headless me... |
yea you need to resize/crop it so it still has its head :) the question is, does the crop=none actually solve the problem, or does it just give stretched/bad proportion instead? |
It solves the problem. Even though the reference image becomes square and aspect ratio is broken, you should leave the latent input to be initial non square resolution and it will output the wanted result. The influence of the reference is stretched. |
I did some tests. Depending on the subject the resize does have a negative influence, like people in portrait format input become more chubby. But it's usually less bad than chopping their heads off, so I'm going to put it as default. For best results you still have to crop/resize manually. Probably you saw, but your reference image does not need to have the same size as your canvas/output. You can just have transparent areas in the layer, they will not be included, so generating a portrait image with square reference works. |
- this would have to happen anyway (model input is fixed) - previously was using a center crop, now it's a scale - stretching/squashing image contents does negatively influence references, but usually not as bad as crop
Hey, yes I later realized I it doesn't have to be the same size as canvas. Thank you for the change, I agree it still looks better then crop, especially as most users probably don't know it needs to be square. |
When working with non square images redux will crop the image.
I opened the workflow to see why is this happening and I can see that the comfyui-tooling-nodes do not have the option to work with rectangular images.
I tried to fix this myself and I changed the workflow to use these native nodes which have the option crop:none and it works as expected, however range functionality is lost this way...

The text was updated successfully, but these errors were encountered: