diff --git a/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamAspectRatio.tsx b/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamAspectRatio.tsx
index f14a88af75..1b575b5793 100644
--- a/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamAspectRatio.tsx
+++ b/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamAspectRatio.tsx
@@ -1,9 +1,8 @@
-import { Flex } from '@chakra-ui/react';
+import { ButtonGroup, Flex } from '@chakra-ui/react';
import { RootState } from 'app/store/store';
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
import IAIButton from 'common/components/IAIButton';
import { setAspectRatio } from 'features/ui/store/uiSlice';
-import { ReactNode } from 'react';
const aspectRatios = [
{ name: 'Free', value: null },
@@ -12,10 +11,6 @@ const aspectRatios = [
{ name: '3:2', value: 3 / 2 },
];
-export const roundToEight = (number: number) => {
- return Math.round(number / 8) * 8;
-};
-
export default function ParamAspectRatio() {
const aspectRatio = useAppSelector(
(state: RootState) => state.ui.aspectRatio
@@ -23,27 +18,20 @@ export default function ParamAspectRatio() {
const dispatch = useAppDispatch();
- const renderAspectRatios = () => {
- const aspectRatiosToRender: ReactNode[] = [];
- aspectRatios.forEach((ratio) => {
- aspectRatiosToRender.push(
- dispatch(setAspectRatio(ratio.value))}
- >
- {ratio.name}
-
- );
- });
- return aspectRatiosToRender;
- };
-
return (
-
- {renderAspectRatios()}
+
+
+ {aspectRatios.map((ratio) => (
+ dispatch(setAspectRatio(ratio.value))}
+ >
+ {ratio.name}
+
+ ))}
+
);
}
diff --git a/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamSize.tsx b/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamSize.tsx
index 55340ce799..15637bb091 100644
--- a/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamSize.tsx
+++ b/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamSize.tsx
@@ -1,4 +1,4 @@
-import { Flex, Text } from '@chakra-ui/react';
+import { Flex, Spacer, Text } from '@chakra-ui/react';
import { RootState } from 'app/store/store';
import { useAppSelector } from 'app/store/storeHooks';
import { useTranslation } from 'react-i18next';
@@ -13,17 +13,32 @@ export default function ParamSize() {
);
return (
-
+
{t('parameters.aspectRatio')}
+