Skip to content

Commit 4c75b93

Browse files
Mary Hipppsychedelicious
authored andcommitted
feat(ui): add informational popovers for upscale params
1 parent 5be0de9 commit 4c75b93

File tree

6 files changed

+45
-5
lines changed

6 files changed

+45
-5
lines changed

invokeai/frontend/web/public/locales/en.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,6 +1509,30 @@
15091509
"seamlessTilingYAxis": {
15101510
"heading": "Seamless Tiling Y Axis",
15111511
"paragraphs": ["Seamlessly tile an image along the vertical axis."]
1512+
},
1513+
"upscaleModel": {
1514+
"heading": "Upscale Model",
1515+
"paragraphs": [
1516+
"The Upscale model is used to create the initial resized image for upscaling details to be added to. You can upload new upscaling models that are supported for use in this and other post-processing workflows."
1517+
]
1518+
},
1519+
"scale": {
1520+
"heading": "Scale",
1521+
"paragraphs": [
1522+
"Scale controls the output image size, and is based on a multiple of the input image resolution. For example a 2x upscale on a 1024x1024 image would produce a 2048 x 2048 output."
1523+
]
1524+
},
1525+
"creativity": {
1526+
"heading": "Creativity",
1527+
"paragraphs": [
1528+
"Creativity determines how much the AI can change your image based on your prompt. Low creativity stays close to the original, while high creativity follows the prompt more freely, potentially creating very different results."
1529+
]
1530+
},
1531+
"structure": {
1532+
"heading": "Structure",
1533+
"paragraphs": [
1534+
"Structure controls how closely the new image keeps the layout of your original. Low structure allows major composition changes, while high structure maintains the original layout."
1535+
]
15121536
}
15131537
},
15141538
"unifiedCanvas": {

invokeai/frontend/web/src/common/components/InformationalPopover/constants.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ export type Feature =
5353
| 'refinerCfgScale'
5454
| 'scaleBeforeProcessing'
5555
| 'seamlessTilingXAxis'
56-
| 'seamlessTilingYAxis';
56+
| 'seamlessTilingYAxis'
57+
| 'upscaleModel'
58+
| 'scale'
59+
| 'creativity'
60+
| 'structure';
5761

5862
export type PopoverData = PopoverProps & {
5963
image?: string;

invokeai/frontend/web/src/features/parameters/components/Upscale/ParamCreativity.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { CompositeNumberInput, CompositeSlider, FormControl, FormLabel } from '@invoke-ai/ui-library';
22
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
3+
import { InformationalPopover } from 'common/components/InformationalPopover/InformationalPopover';
34
import { creativityChanged } from 'features/parameters/store/upscaleSlice';
45
import { memo, useCallback, useMemo } from 'react';
56
import { useTranslation } from 'react-i18next';
@@ -25,7 +26,9 @@ const ParamCreativity = () => {
2526

2627
return (
2728
<FormControl>
28-
<FormLabel>{t('upscaling.creativity')}</FormLabel>
29+
<InformationalPopover feature="creativity">
30+
<FormLabel>{t('upscaling.creativity')}</FormLabel>
31+
</InformationalPopover>
2932
<CompositeSlider
3033
value={creativity}
3134
defaultValue={initial}

invokeai/frontend/web/src/features/parameters/components/Upscale/ParamSpandrelModel.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Box, Combobox, FormControl, FormLabel, Tooltip } from '@invoke-ai/ui-library';
22
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
3+
import { InformationalPopover } from 'common/components/InformationalPopover/InformationalPopover';
34
import { useModelCombobox } from 'common/hooks/useModelCombobox';
45
import { upscaleModelChanged } from 'features/parameters/store/upscaleSlice';
56
import { memo, useCallback, useMemo } from 'react';
@@ -37,7 +38,9 @@ const ParamSpandrelModel = () => {
3738

3839
return (
3940
<FormControl orientation="vertical">
40-
<FormLabel>{t('upscaling.upscaleModel')}</FormLabel>
41+
<InformationalPopover feature="upscaleModel">
42+
<FormLabel>{t('upscaling.upscaleModel')}</FormLabel>
43+
</InformationalPopover>
4144
<Tooltip label={tooltipLabel}>
4245
<Box w="full">
4346
<Combobox

invokeai/frontend/web/src/features/parameters/components/Upscale/ParamStructure.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { CompositeNumberInput, CompositeSlider, FormControl, FormLabel } from '@invoke-ai/ui-library';
22
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
3+
import { InformationalPopover } from 'common/components/InformationalPopover/InformationalPopover';
34
import { structureChanged } from 'features/parameters/store/upscaleSlice';
45
import { memo, useCallback, useMemo } from 'react';
56
import { useTranslation } from 'react-i18next';
@@ -25,7 +26,9 @@ const ParamStructure = () => {
2526

2627
return (
2728
<FormControl>
28-
<FormLabel>{t('upscaling.structure')}</FormLabel>
29+
<InformationalPopover feature="structure">
30+
<FormLabel>{t('upscaling.structure')}</FormLabel>
31+
</InformationalPopover>
2932
<CompositeSlider
3033
value={structure}
3134
defaultValue={initial}

invokeai/frontend/web/src/features/settingsAccordions/components/UpscaleSettingsAccordion/UpscaleScaleSlider.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { CompositeNumberInput, CompositeSlider, Flex, FormControl, FormLabel } from '@invoke-ai/ui-library';
22
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
3+
import { InformationalPopover } from 'common/components/InformationalPopover/InformationalPopover';
34
import { scaleChanged } from 'features/parameters/store/upscaleSlice';
45
import { memo, useCallback } from 'react';
56
import { useTranslation } from 'react-i18next';
@@ -22,7 +23,9 @@ export const UpscaleScaleSlider = memo(() => {
2223

2324
return (
2425
<FormControl orientation="vertical" gap={0}>
25-
<FormLabel m={0}>{t('upscaling.scale')}</FormLabel>
26+
<InformationalPopover feature="scale">
27+
<FormLabel m={0}>{t('upscaling.scale')}</FormLabel>
28+
</InformationalPopover>
2629
<Flex w="full" gap={4}>
2730
<CompositeSlider
2831
min={2}

0 commit comments

Comments
 (0)