mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Merge branch 'main' into depth-anything
This commit is contained in:
commit
0868fc2558
@ -57,7 +57,7 @@
|
|||||||
"@dnd-kit/core": "^6.1.0",
|
"@dnd-kit/core": "^6.1.0",
|
||||||
"@dnd-kit/utilities": "^3.2.2",
|
"@dnd-kit/utilities": "^3.2.2",
|
||||||
"@fontsource-variable/inter": "^5.0.16",
|
"@fontsource-variable/inter": "^5.0.16",
|
||||||
"@invoke-ai/ui": "0.0.12",
|
"@invoke-ai/ui": "0.0.13",
|
||||||
"@mantine/form": "6.0.21",
|
"@mantine/form": "6.0.21",
|
||||||
"@nanostores/react": "^0.7.1",
|
"@nanostores/react": "^0.7.1",
|
||||||
"@reduxjs/toolkit": "2.0.1",
|
"@reduxjs/toolkit": "2.0.1",
|
||||||
|
12
invokeai/frontend/web/pnpm-lock.yaml
generated
12
invokeai/frontend/web/pnpm-lock.yaml
generated
@ -29,8 +29,8 @@ dependencies:
|
|||||||
specifier: ^5.0.16
|
specifier: ^5.0.16
|
||||||
version: 5.0.16
|
version: 5.0.16
|
||||||
'@invoke-ai/ui':
|
'@invoke-ai/ui':
|
||||||
specifier: 0.0.12
|
specifier: 0.0.13
|
||||||
version: 0.0.12(@chakra-ui/form-control@2.2.0)(@chakra-ui/icon@3.2.0)(@chakra-ui/media-query@3.3.0)(@chakra-ui/menu@2.2.1)(@chakra-ui/spinner@2.1.0)(@chakra-ui/system@2.6.2)(@fontsource-variable/inter@5.0.16)(@internationalized/date@3.5.1)(@types/react@18.2.48)(i18next@23.7.16)(react-dom@18.2.0)(react@18.2.0)
|
version: 0.0.13(@chakra-ui/form-control@2.2.0)(@chakra-ui/icon@3.2.0)(@chakra-ui/media-query@3.3.0)(@chakra-ui/menu@2.2.1)(@chakra-ui/spinner@2.1.0)(@chakra-ui/system@2.6.2)(@fontsource-variable/inter@5.0.16)(@internationalized/date@3.5.1)(@types/react@18.2.48)(i18next@23.7.16)(react-dom@18.2.0)(react@18.2.0)
|
||||||
'@mantine/form':
|
'@mantine/form':
|
||||||
specifier: 6.0.21
|
specifier: 6.0.21
|
||||||
version: 6.0.21(react@18.2.0)
|
version: 6.0.21(react@18.2.0)
|
||||||
@ -3759,8 +3759,8 @@ packages:
|
|||||||
'@swc/helpers': 0.5.3
|
'@swc/helpers': 0.5.3
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@invoke-ai/ui@0.0.12(@chakra-ui/form-control@2.2.0)(@chakra-ui/icon@3.2.0)(@chakra-ui/media-query@3.3.0)(@chakra-ui/menu@2.2.1)(@chakra-ui/spinner@2.1.0)(@chakra-ui/system@2.6.2)(@fontsource-variable/inter@5.0.16)(@internationalized/date@3.5.1)(@types/react@18.2.48)(i18next@23.7.16)(react-dom@18.2.0)(react@18.2.0):
|
/@invoke-ai/ui@0.0.13(@chakra-ui/form-control@2.2.0)(@chakra-ui/icon@3.2.0)(@chakra-ui/media-query@3.3.0)(@chakra-ui/menu@2.2.1)(@chakra-ui/spinner@2.1.0)(@chakra-ui/system@2.6.2)(@fontsource-variable/inter@5.0.16)(@internationalized/date@3.5.1)(@types/react@18.2.48)(i18next@23.7.16)(react-dom@18.2.0)(react@18.2.0):
|
||||||
resolution: {integrity: sha512-G0iPzGx1Nu7mHOZtwUYtqNWAqo2KnYGvs883w4WJwUpoCEbnaZd9Pi876UvOh9aNyjO93t/5ctIffkcYlDKGNg==}
|
resolution: {integrity: sha512-X4Txij2dMnzPUXTPhorBHezByJQ/ceyHxCM+zZ0gpFsSyXUieOFWjaSu+dAVpghS9y0dxFQGayHvNyX6VsX/PA==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@fontsource-variable/inter': ^5.0.16
|
'@fontsource-variable/inter': ^5.0.16
|
||||||
react: ^18.2.0
|
react: ^18.2.0
|
||||||
@ -12063,7 +12063,7 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
react: ^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0
|
react: ^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime': 7.23.7
|
'@babel/runtime': 7.23.8
|
||||||
react: 18.2.0
|
react: 18.2.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
@ -12158,7 +12158,7 @@ packages:
|
|||||||
'@types/react':
|
'@types/react':
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime': 7.23.7
|
'@babel/runtime': 7.23.8
|
||||||
'@types/react': 18.2.48
|
'@types/react': 18.2.48
|
||||||
focus-lock: 1.0.0
|
focus-lock: 1.0.0
|
||||||
prop-types: 15.8.1
|
prop-types: 15.8.1
|
||||||
|
@ -46,14 +46,14 @@ export const addDynamicPromptsListener = () => {
|
|||||||
|
|
||||||
if (cachedPrompts) {
|
if (cachedPrompts) {
|
||||||
dispatch(promptsChanged(cachedPrompts.prompts));
|
dispatch(promptsChanged(cachedPrompts.prompts));
|
||||||
|
dispatch(parsingErrorChanged(cachedPrompts.error));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!getShouldProcessPrompt(state.generation.positivePrompt)) {
|
if (!getShouldProcessPrompt(state.generation.positivePrompt)) {
|
||||||
if (state.dynamicPrompts.isLoading) {
|
|
||||||
dispatch(isLoadingChanged(false));
|
|
||||||
}
|
|
||||||
dispatch(promptsChanged([state.generation.positivePrompt]));
|
dispatch(promptsChanged([state.generation.positivePrompt]));
|
||||||
|
dispatch(parsingErrorChanged(undefined));
|
||||||
|
dispatch(isErrorChanged(false));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +78,6 @@ export const addDynamicPromptsListener = () => {
|
|||||||
dispatch(promptsChanged(res.prompts));
|
dispatch(promptsChanged(res.prompts));
|
||||||
dispatch(parsingErrorChanged(res.error));
|
dispatch(parsingErrorChanged(res.error));
|
||||||
dispatch(isErrorChanged(false));
|
dispatch(isErrorChanged(false));
|
||||||
dispatch(isLoadingChanged(false));
|
|
||||||
} catch {
|
} catch {
|
||||||
dispatch(isErrorChanged(true));
|
dispatch(isErrorChanged(true));
|
||||||
dispatch(isLoadingChanged(false));
|
dispatch(isLoadingChanged(false));
|
||||||
|
@ -61,7 +61,12 @@ const ParamDynamicPromptsPreview = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FormControl orientation="vertical" w="full" h="full">
|
<FormControl
|
||||||
|
orientation="vertical"
|
||||||
|
w="full"
|
||||||
|
h="full"
|
||||||
|
isInvalid={Boolean(parsingError || isError)}
|
||||||
|
>
|
||||||
<InformationalPopover feature="dynamicPrompts" inPortal={false}>
|
<InformationalPopover feature="dynamicPrompts" inPortal={false}>
|
||||||
<FormLabel>{label}</FormLabel>
|
<FormLabel>{label}</FormLabel>
|
||||||
</InformationalPopover>
|
</InformationalPopover>
|
||||||
|
@ -13,7 +13,11 @@ const loadingStyles: SystemStyleObject = {
|
|||||||
export const ShowDynamicPromptsPreviewButton = memo(() => {
|
export const ShowDynamicPromptsPreviewButton = memo(() => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const isLoading = useAppSelector((s) => s.dynamicPrompts.isLoading);
|
const isLoading = useAppSelector((s) => s.dynamicPrompts.isLoading);
|
||||||
|
const isError = useAppSelector((s) =>
|
||||||
|
Boolean(s.dynamicPrompts.isError || s.dynamicPrompts.parsingError)
|
||||||
|
);
|
||||||
const { isOpen, onOpen } = useDynamicPromptsModal();
|
const { isOpen, onOpen } = useDynamicPromptsModal();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
label={
|
label={
|
||||||
@ -30,6 +34,7 @@ export const ShowDynamicPromptsPreviewButton = memo(() => {
|
|||||||
icon={<BsBracesAsterisk />}
|
icon={<BsBracesAsterisk />}
|
||||||
onClick={onOpen}
|
onClick={onOpen}
|
||||||
sx={isLoading ? loadingStyles : undefined}
|
sx={isLoading ? loadingStyles : undefined}
|
||||||
|
colorScheme={isError && !isLoading ? 'error' : 'base'}
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
);
|
);
|
||||||
|
@ -47,6 +47,7 @@ export const dynamicPromptsSlice = createSlice({
|
|||||||
},
|
},
|
||||||
promptsChanged: (state, action: PayloadAction<string[]>) => {
|
promptsChanged: (state, action: PayloadAction<string[]>) => {
|
||||||
state.prompts = action.payload;
|
state.prompts = action.payload;
|
||||||
|
state.isLoading = false;
|
||||||
},
|
},
|
||||||
parsingErrorChanged: (
|
parsingErrorChanged: (
|
||||||
state,
|
state,
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
const hasOpenCloseCurlyBracesRegex = /.*\{.*\}.*/;
|
const hasOpenCloseCurlyBracesRegex = /.*\{[\s\S]*\}.*/;
|
||||||
export const getShouldProcessPrompt = (prompt: string): boolean =>
|
export const getShouldProcessPrompt = (prompt: string): boolean =>
|
||||||
hasOpenCloseCurlyBracesRegex.test(prompt);
|
hasOpenCloseCurlyBracesRegex.test(prompt);
|
||||||
|
@ -65,7 +65,7 @@ export const zModelType = z.enum([
|
|||||||
'controlnet',
|
'controlnet',
|
||||||
'embedding',
|
'embedding',
|
||||||
]);
|
]);
|
||||||
export const zModelName = z.string().trim().min(1);
|
export const zModelName = z.string().min(3);
|
||||||
export const zModelIdentifier = z.object({
|
export const zModelIdentifier = z.object({
|
||||||
model_name: zModelName,
|
model_name: zModelName,
|
||||||
base_model: zBaseModel,
|
base_model: zBaseModel,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user