-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[bug]: Fit to Bbox not fitting to bbox #7613
Comments
I can't reproduce this, can you please share the input image? |
Thanks, unfortunately it still works fine for me w/ that image. Can you please get me a debug snapshot of the canvas state:
|
Ahh, I know what is happening. Internally, the bbox is represented as So, if the selected model is FLUX, and layer origin y is a multiple of 8 but not a multiple of 16, the bbox will conservatively shift its origin to the nearest multiple of 16 = 8px down. If it does that, it also needs to shrink the height to fit. The result is the bbox is 16px shorter than the layer - the problem described in this issue. The model-dependent grid snapping approach approximates "smart" snapping (e.g. to layer and bbox bounds), but is only strictly necessary for bbox size. There's no inherent need for positions of anything to be snapped to the grid. It's implemented this way because it's much easier to do this than it is to implement true smart snapping. But, until we have true smart snapping, I don't think we can change this. |
Is there an existing issue for this problem?
Operating system
other
GPU vendor
Nvidia (CUDA)
GPU model
RTX 3060
GPU VRAM
12GB
Version number
main
Browser
Chrome
Python dependencies
No response
What happened
Clicking "Fit Bbox To Layers" in canvas doesn't fit the Bbox entirely to the layers. Tested with a 1152x1728 image and the bbox is 1152x1712.
What you expected to happen
The bbox should be set to the maximum dimensions of 1152x1728.
How to reproduce the problem
No response
Additional context
No response
Discord username
No response
The text was updated successfully, but these errors were encountered: