Skip to content

Commit d0fcdbe

Browse files
tweak(ui): simplify layout of inplace install form elements
1 parent a28547b commit d0fcdbe

File tree

2 files changed

+28
-20
lines changed

2 files changed

+28
-20
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,8 +766,8 @@
766766
"importModels": "Import Models",
767767
"importQueue": "Import Queue",
768768
"inpainting": "v1 Inpainting",
769-
"inplaceInstall": "Inplace install",
770-
"inplaceInstallTooltip": "If inplace installs are enabled, Invoke will reference your model files from where they are now. If disabled, your model files will be cloned into your invokeai directory and referenced from there.",
769+
"inplaceInstall": "In-place install",
770+
"inplaceInstallDesc": "Install models without copying the files. When using the model, it will be loaded from its this location. If disabled, the model file(s) will be copied into the Invoke-managed models directory during installation.",
771771
"interpolationType": "Interpolation Type",
772772
"inverseSigmoid": "Inverse Sigmoid",
773773
"invokeAIFolder": "Invoke AI Folder",

invokeai/frontend/web/src/features/modelManagerV2/subpanels/AddModelPanel/InstallModelForm.tsx

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Button, Checkbox, Flex, FormControl, FormLabel, Input, Tooltip } from '@invoke-ai/ui-library';
1+
import { Button, Checkbox, Flex, FormControl, FormHelperText, FormLabel, Input } from '@invoke-ai/ui-library';
22
import { useAppDispatch } from 'app/store/storeHooks';
33
import { addToast } from 'features/system/store/systemSlice';
44
import { makeToast } from 'features/system/util/makeToast';
@@ -64,28 +64,36 @@ export const InstallModelForm = () => {
6464

6565
return (
6666
<form onSubmit={handleSubmit(onSubmit)}>
67-
<Flex gap={2} alignItems="flex-end" justifyContent="space-between">
68-
<FormControl>
69-
<Flex direction="column" w="full">
67+
<Flex flexDir="column" gap={4}>
68+
<Flex gap={2} alignItems="flex-end" justifyContent="space-between">
69+
<FormControl orientation="vertical">
7070
<FormLabel>{t('modelManager.modelLocation')}</FormLabel>
7171
<Input {...register('location')} />
72+
</FormControl>
73+
<Button
74+
onClick={handleSubmit(onSubmit)}
75+
isDisabled={!formState.isDirty}
76+
isLoading={isLoading}
77+
type="submit"
78+
size="sm"
79+
mb={1}
80+
>
81+
{t('modelManager.addModel')}
82+
</Button>
83+
</Flex>
84+
85+
<FormControl>
86+
<Flex flexDir="column" gap={2}>
87+
<Flex gap={4}>
88+
<Checkbox {...register('inplace')} />
89+
<FormLabel>
90+
{t('modelManager.inplaceInstall')} ({t('modelManager.localOnly')})
91+
</FormLabel>
92+
</Flex>
93+
<FormHelperText>{t('modelManager.inplaceInstallDesc')}</FormHelperText>
7294
</Flex>
7395
</FormControl>
74-
<Button onClick={handleSubmit(onSubmit)} isDisabled={!formState.isDirty} isLoading={isLoading} type="submit">
75-
{t('modelManager.addModel')}
76-
</Button>
7796
</Flex>
78-
79-
<FormControl flexDir="column" gap="1" alignItems="flex-start" mt={3}>
80-
<Tooltip label={t('modelManager.inplaceInstallTooltip')}>
81-
<Flex gap={3}>
82-
<Checkbox {...register('inplace')} />
83-
<FormLabel>
84-
{t('modelManager.inplaceInstall')} ({t('modelManager.localOnly')})
85-
</FormLabel>
86-
</Flex>
87-
</Tooltip>
88-
</FormControl>
8997
</form>
9098
);
9199
};

0 commit comments

Comments
 (0)