diff --git a/invokeai/frontend/web/src/features/parameters/components/Parameters/Canvas/BoundingBox/ParamBoundingBoxSize.tsx b/invokeai/frontend/web/src/features/parameters/components/Parameters/Canvas/BoundingBox/ParamBoundingBoxSize.tsx
index 4c2e6d252c..7725461fd3 100644
--- a/invokeai/frontend/web/src/features/parameters/components/Parameters/Canvas/BoundingBox/ParamBoundingBoxSize.tsx
+++ b/invokeai/frontend/web/src/features/parameters/components/Parameters/Canvas/BoundingBox/ParamBoundingBoxSize.tsx
@@ -80,7 +80,16 @@ export default function ParamBoundingBoxSize() {
size="sm"
icon={}
fontSize={20}
- onClick={() => dispatch(flipBoundingBoxAxes())}
+ onClick={() => {
+ dispatch(flipBoundingBoxAxes());
+ if (
+ ![null, 2 / 3, 16 / 9, 1 / 1].includes(
+ boundingBoxDimensions.height / boundingBoxDimensions.width
+ )
+ ) {
+ dispatch(setAspectRatio(null));
+ }
+ }}
/>
{
- state.aspectRatio = null;
- });
},
});