mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
build(ui): treeshake lodash via lodash-es
This commit is contained in:
parent
d92d5b5258
commit
2b5ccdc55f
@ -5,10 +5,36 @@ import eslint from 'vite-plugin-eslint';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
|
||||
export const appConfig: UserConfig = {
|
||||
base: './',
|
||||
plugins: [
|
||||
react(),
|
||||
eslint(),
|
||||
tsconfigPaths(),
|
||||
visualizer() as unknown as PluginOption,
|
||||
],
|
||||
build: {
|
||||
chunkSizeWarningLimit: 1500,
|
||||
},
|
||||
server: {
|
||||
// Proxy HTTP requests to the flask server
|
||||
proxy: {
|
||||
// Proxy socket.io to the nodes socketio server
|
||||
'/ws/socket.io': {
|
||||
target: 'ws://127.0.0.1:9090',
|
||||
ws: true,
|
||||
},
|
||||
// Proxy openapi schema definiton
|
||||
'/openapi.json': {
|
||||
target: 'http://127.0.0.1:9090/openapi.json',
|
||||
rewrite: (path) => path.replace(/^\/openapi.json/, ''),
|
||||
changeOrigin: true,
|
||||
},
|
||||
// proxy nodes api
|
||||
'/api/v1': {
|
||||
target: 'http://127.0.0.1:9090/api/v1',
|
||||
rewrite: (path) => path.replace(/^\/api\/v1/, ''),
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -1,50 +0,0 @@
|
||||
import { UserConfig } from 'vite';
|
||||
|
||||
export const commonConfig: UserConfig = {
|
||||
base: './',
|
||||
server: {
|
||||
// Proxy HTTP requests to the flask server
|
||||
proxy: {
|
||||
'/outputs': {
|
||||
target: 'http://127.0.0.1:9090/outputs',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/outputs/, ''),
|
||||
},
|
||||
'/upload': {
|
||||
target: 'http://127.0.0.1:9090/upload',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/upload/, ''),
|
||||
},
|
||||
'/flaskwebgui-keep-server-alive': {
|
||||
target: 'http://127.0.0.1:9090/flaskwebgui-keep-server-alive',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/flaskwebgui-keep-server-alive/, ''),
|
||||
},
|
||||
// Proxy socket.io to the flask-socketio server
|
||||
'/socket.io': {
|
||||
target: 'ws://127.0.0.1:9090',
|
||||
ws: true,
|
||||
},
|
||||
// Proxy socket.io to the nodes socketio server
|
||||
'/ws/socket.io': {
|
||||
target: 'ws://127.0.0.1:9090',
|
||||
ws: true,
|
||||
},
|
||||
// Proxy openapi schema definiton
|
||||
'/openapi.json': {
|
||||
target: 'http://127.0.0.1:9090/openapi.json',
|
||||
rewrite: (path) => path.replace(/^\/openapi.json/, ''),
|
||||
changeOrigin: true,
|
||||
},
|
||||
// proxy nodes api
|
||||
'/api/v1': {
|
||||
target: 'http://127.0.0.1:9090/api/v1',
|
||||
rewrite: (path) => path.replace(/^\/api\/v1/, ''),
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
build: {
|
||||
chunkSizeWarningLimit: 1500,
|
||||
},
|
||||
};
|
@ -2,11 +2,12 @@ import react from '@vitejs/plugin-react-swc';
|
||||
import path from 'path';
|
||||
import { visualizer } from 'rollup-plugin-visualizer';
|
||||
import { PluginOption, UserConfig } from 'vite';
|
||||
import dts from 'vite-plugin-dts';
|
||||
import eslint from 'vite-plugin-eslint';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
import dts from 'vite-plugin-dts';
|
||||
|
||||
export const packageConfig: UserConfig = {
|
||||
base: './',
|
||||
plugins: [
|
||||
react(),
|
||||
eslint(),
|
||||
@ -17,6 +18,7 @@ export const packageConfig: UserConfig = {
|
||||
}),
|
||||
],
|
||||
build: {
|
||||
chunkSizeWarningLimit: 1500,
|
||||
lib: {
|
||||
entry: path.resolve(__dirname, '../src/index.ts'),
|
||||
name: 'InvokeAIUI',
|
||||
|
@ -72,7 +72,7 @@
|
||||
"i18next-browser-languagedetector": "^7.0.1",
|
||||
"i18next-http-backend": "^2.2.0",
|
||||
"konva": "^9.0.1",
|
||||
"lodash": "^4.17.21",
|
||||
"lodash-es": "^4.17.21",
|
||||
"patch-package": "^7.0.0",
|
||||
"re-resizable": "^6.9.9",
|
||||
"react": "^18.2.0",
|
||||
@ -101,7 +101,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/dateformat": "^5.0.0",
|
||||
"@types/lodash": "^4.14.194",
|
||||
"@types/lodash-es": "^4.14.194",
|
||||
"@types/node": "^18.16.2",
|
||||
"@types/react": "^18.2.0",
|
||||
"@types/react-dom": "^18.2.1",
|
||||
|
@ -4,7 +4,7 @@ import { initialCanvasImageSelector } from 'features/canvas/store/canvasSelector
|
||||
import { generationSelector } from 'features/parameters/store/generationSelectors';
|
||||
import { systemSelector } from 'features/system/store/systemSelectors';
|
||||
import { activeTabNameSelector } from 'features/ui/store/uiSelectors';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
export const readinessSelector = createSelector(
|
||||
[
|
||||
|
@ -14,7 +14,7 @@ import {
|
||||
Tooltip,
|
||||
TooltipProps,
|
||||
} from '@chakra-ui/react';
|
||||
import { clamp } from 'lodash';
|
||||
import { clamp } from 'lodash-es';
|
||||
|
||||
import { FocusEvent, memo, useEffect, useState } from 'react';
|
||||
|
||||
|
@ -23,7 +23,7 @@ import {
|
||||
Tooltip,
|
||||
TooltipProps,
|
||||
} from '@chakra-ui/react';
|
||||
import { clamp } from 'lodash';
|
||||
import { clamp } from 'lodash-es';
|
||||
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
|
@ -2,7 +2,7 @@ import { createSelector } from '@reduxjs/toolkit';
|
||||
import { RootState } from 'app/store/store';
|
||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||
import { shiftKeyPressed } from 'features/ui/store/hotkeysSlice';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { isHotkeyPressed, useHotkeys } from 'react-hotkeys-hook';
|
||||
|
||||
const globalHotkeysSelector = createSelector(
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { forEach, size } from 'lodash';
|
||||
import { forEach, size } from 'lodash-es';
|
||||
import { ImageField, LatentsField } from 'services/api';
|
||||
|
||||
const OBJECT_TYPESTRING = '[object Object]';
|
||||
|
@ -8,7 +8,7 @@ import {
|
||||
import Konva from 'konva';
|
||||
import { KonvaEventObject } from 'konva/lib/Node';
|
||||
import { Vector2d } from 'konva/lib/types';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { useCallback, useRef } from 'react';
|
||||
import { Layer, Stage } from 'react-konva';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { Group, Rect } from 'react-konva';
|
||||
import { canvasSelector } from '../store/canvasSelectors';
|
||||
|
@ -5,7 +5,7 @@ import { createSelector } from '@reduxjs/toolkit';
|
||||
import { RootState } from 'app/store/store';
|
||||
import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
|
||||
import { isEqual, range } from 'lodash';
|
||||
import { isEqual, range } from 'lodash-es';
|
||||
|
||||
import { ReactNode, useCallback, useLayoutEffect, useState } from 'react';
|
||||
import { Group, Line as KonvaLine } from 'react-konva';
|
||||
|
@ -4,7 +4,7 @@ import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { useGetUrl } from 'common/util/getUrl';
|
||||
import { GalleryState } from 'features/gallery/store/gallerySlice';
|
||||
import { ImageConfig } from 'konva/lib/shapes/Image';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Image as KonvaImage } from 'react-konva';
|
||||
|
@ -6,7 +6,7 @@ import { Rect } from 'react-konva';
|
||||
|
||||
import { rgbaColorToString } from 'features/canvas/util/colorToString';
|
||||
import Konva from 'konva';
|
||||
import { isNumber } from 'lodash';
|
||||
import { isNumber } from 'lodash-es';
|
||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||
|
||||
export const canvasMaskCompositerSelector = createSelector(
|
||||
|
@ -2,7 +2,7 @@ import { createSelector } from '@reduxjs/toolkit';
|
||||
import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
|
||||
import { GroupConfig } from 'konva/lib/Group';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { Group, Line } from 'react-konva';
|
||||
import { isCanvasMaskLine } from '../store/canvasTypes';
|
||||
|
@ -3,7 +3,7 @@ import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { useGetUrl } from 'common/util/getUrl';
|
||||
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
|
||||
import { rgbaColorToString } from 'features/canvas/util/colorToString';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { Group, Line, Rect } from 'react-konva';
|
||||
import {
|
||||
|
@ -3,7 +3,7 @@ import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { useGetUrl } from 'common/util/getUrl';
|
||||
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
|
||||
import { GroupConfig } from 'konva/lib/Group';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { Group, Rect } from 'react-konva';
|
||||
import IAICanvasImage from './IAICanvasImage';
|
||||
|
@ -12,7 +12,7 @@ import {
|
||||
setShouldShowStagingImage,
|
||||
setShouldShowStagingOutline,
|
||||
} from 'features/canvas/store/canvasSlice';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { useCallback } from 'react';
|
||||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
|
@ -2,7 +2,7 @@ import { Box, Flex } from '@chakra-ui/react';
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import roundToHundreth from '../util/roundToHundreth';
|
||||
|
@ -3,7 +3,7 @@ import { createSelector } from '@reduxjs/toolkit';
|
||||
import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
|
||||
import roundToHundreth from 'features/canvas/util/roundToHundreth';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
|
||||
import { rgbaColorToString } from 'features/canvas/util/colorToString';
|
||||
import { GroupConfig } from 'konva/lib/Group';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { Circle, Group } from 'react-konva';
|
||||
import {
|
||||
|
@ -16,7 +16,7 @@ import Konva from 'konva';
|
||||
import { GroupConfig } from 'konva/lib/Group';
|
||||
import { KonvaEventObject } from 'konva/lib/Node';
|
||||
import { Vector2d } from 'konva/lib/types';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { Group, Rect, Transformer } from 'react-konva';
|
||||
|
@ -18,7 +18,7 @@ import {
|
||||
setShouldPreserveMaskedArea,
|
||||
} from 'features/canvas/store/canvasSlice';
|
||||
import { rgbaColorToString } from 'features/canvas/util/colorToString';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
@ -9,7 +9,7 @@ import { FaRedo } from 'react-icons/fa';
|
||||
import { redo } from 'features/canvas/store/canvasSlice';
|
||||
import { systemSelector } from 'features/system/store/systemSelectors';
|
||||
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const canvasRedoSelector = createSelector(
|
||||
|
@ -16,7 +16,7 @@ import {
|
||||
setShouldSnapToGrid,
|
||||
} from 'features/canvas/store/canvasSlice';
|
||||
import EmptyTempFolderButtonModal from 'features/system/components/ClearTempFolderButtonModal';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { ChangeEvent } from 'react';
|
||||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
|
@ -17,7 +17,7 @@ import {
|
||||
setTool,
|
||||
} from 'features/canvas/store/canvasSlice';
|
||||
import { systemSelector } from 'features/system/store/systemSelectors';
|
||||
import { clamp, isEqual } from 'lodash';
|
||||
import { clamp, isEqual } from 'lodash-es';
|
||||
|
||||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
@ -24,7 +24,7 @@ import {
|
||||
import { mergeAndUploadCanvas } from 'features/canvas/store/thunks/mergeAndUploadCanvas';
|
||||
import { getCanvasBaseLayer } from 'features/canvas/util/konvaInstanceProvider';
|
||||
import { systemSelector } from 'features/system/store/systemSelectors';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { ChangeEvent } from 'react';
|
||||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
|
@ -9,7 +9,7 @@ import { undo } from 'features/canvas/store/canvasSlice';
|
||||
import { systemSelector } from 'features/system/store/systemSelectors';
|
||||
import { activeTabNameSelector } from 'features/ui/store/uiSelectors';
|
||||
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const canvasUndoSelector = createSelector(
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
setStageCoordinates,
|
||||
} from 'features/canvas/store/canvasSlice';
|
||||
import { KonvaEventObject } from 'konva/lib/Node';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { useCallback } from 'react';
|
||||
|
||||
|
@ -13,7 +13,7 @@ import {
|
||||
setTool,
|
||||
} from 'features/canvas/store/canvasSlice';
|
||||
import { activeTabNameSelector } from 'features/ui/store/uiSelectors';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { useRef } from 'react';
|
||||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
|
@ -12,7 +12,7 @@ import {
|
||||
import { activeTabNameSelector } from 'features/ui/store/uiSelectors';
|
||||
import Konva from 'konva';
|
||||
import { KonvaEventObject } from 'konva/lib/Node';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { MutableRefObject, useCallback } from 'react';
|
||||
import getScaledCursorPosition from '../util/getScaledCursorPosition';
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
import { activeTabNameSelector } from 'features/ui/store/uiSelectors';
|
||||
import Konva from 'konva';
|
||||
import { Vector2d } from 'konva/lib/types';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { MutableRefObject, useCallback } from 'react';
|
||||
import getScaledCursorPosition from '../util/getScaledCursorPosition';
|
||||
|
@ -12,7 +12,7 @@ import {
|
||||
} from 'features/canvas/store/canvasSlice';
|
||||
import { activeTabNameSelector } from 'features/ui/store/uiSelectors';
|
||||
import Konva from 'konva';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { MutableRefObject, useCallback } from 'react';
|
||||
import getScaledCursorPosition from '../util/getScaledCursorPosition';
|
||||
|
@ -7,7 +7,7 @@ import {
|
||||
} from 'features/canvas/store/canvasSlice';
|
||||
import Konva from 'konva';
|
||||
import { KonvaEventObject } from 'konva/lib/Node';
|
||||
import { clamp, isEqual } from 'lodash';
|
||||
import { clamp, isEqual } from 'lodash-es';
|
||||
|
||||
import { MutableRefObject, useCallback } from 'react';
|
||||
import {
|
||||
|
@ -6,7 +6,7 @@ import {
|
||||
roundToMultiple,
|
||||
} from 'common/util/roundDownToMultiple';
|
||||
import { IRect, Vector2d } from 'konva/lib/types';
|
||||
import { clamp, cloneDeep } from 'lodash';
|
||||
import { clamp, cloneDeep } from 'lodash-es';
|
||||
//
|
||||
import { RgbaColor } from 'react-colorful';
|
||||
import calculateCoordinates from '../util/calculateCoordinates';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { AppDispatch, AppGetState } from 'app/store/store';
|
||||
import { activeTabNameSelector } from 'features/ui/store/uiSelectors';
|
||||
import { debounce } from 'lodash';
|
||||
import { debounce } from 'lodash-es';
|
||||
import { setDoesCanvasNeedScaling } from '../canvasSlice';
|
||||
|
||||
const debouncedCanvasScale = debounce((dispatch: AppDispatch) => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import {
|
||||
ButtonGroup,
|
||||
|
@ -2,7 +2,7 @@ import { Flex, Icon } from '@chakra-ui/react';
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { systemSelector } from 'features/system/store/systemSelectors';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { MdPhoto } from 'react-icons/md';
|
||||
import { selectedImageSelector } from '../store/gallerySelectors';
|
||||
|
@ -4,7 +4,7 @@ import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { useGetUrl } from 'common/util/getUrl';
|
||||
import { systemSelector } from 'features/system/store/systemSelectors';
|
||||
import { uiSelector } from 'features/ui/store/uiSelectors';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { selectedImageSelector } from '../store/gallerySelectors';
|
||||
import CurrentImageFallback from './CurrentImageFallback';
|
||||
|
@ -15,7 +15,7 @@ import IAISwitch from 'common/components/IAISwitch';
|
||||
import { configSelector } from 'features/system/store/configSelectors';
|
||||
import { systemSelector } from 'features/system/store/systemSelectors';
|
||||
import { setShouldConfirmOnDelete } from 'features/system/store/systemSlice';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { ChangeEvent, memo, useCallback, useRef } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
@ -53,7 +53,7 @@ import { systemSelector } from 'features/system/store/systemSelectors';
|
||||
import { configSelector } from 'features/system/store/configSelectors';
|
||||
import { lightboxSelector } from 'features/lightbox/store/lightboxSelectors';
|
||||
import { activeTabNameSelector } from 'features/ui/store/uiSelectors';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
export const selector = createSelector(
|
||||
[
|
||||
@ -151,8 +151,8 @@ const HoverableImage = memo((props: HoverableImageProps) => {
|
||||
};
|
||||
|
||||
const handleUsePrompt = () => {
|
||||
if (image.metadata?.sd_metadata?.prompt) {
|
||||
setBothPrompts(image.metadata?.sd_metadata?.prompt);
|
||||
if (typeof image.metadata?.invokeai?.node?.prompt === 'string') {
|
||||
setBothPrompts(image.metadata?.invokeai?.node?.prompt);
|
||||
}
|
||||
toast({
|
||||
title: t('toast.promptSet'),
|
||||
@ -163,8 +163,8 @@ const HoverableImage = memo((props: HoverableImageProps) => {
|
||||
};
|
||||
|
||||
const handleUseSeed = () => {
|
||||
image.metadata.sd_metadata &&
|
||||
dispatch(setSeed(image.metadata.sd_metadata.image.seed));
|
||||
typeof image.metadata.invokeai?.node?.seed === 'number' &&
|
||||
dispatch(setSeed(image.metadata.invokeai?.node?.seed));
|
||||
toast({
|
||||
title: t('toast.seedSet'),
|
||||
status: 'success',
|
||||
@ -195,38 +195,39 @@ const HoverableImage = memo((props: HoverableImageProps) => {
|
||||
};
|
||||
|
||||
const handleUseAllParameters = () => {
|
||||
metadata.sd_metadata && dispatch(setAllParameters(metadata.sd_metadata));
|
||||
toast({
|
||||
title: t('toast.parametersSet'),
|
||||
status: 'success',
|
||||
duration: 2500,
|
||||
isClosable: true,
|
||||
});
|
||||
// metadata.invokeai?.node &&
|
||||
// dispatch(setAllParameters(metadata.invokeai?.node));
|
||||
// toast({
|
||||
// title: t('toast.parametersSet'),
|
||||
// status: 'success',
|
||||
// duration: 2500,
|
||||
// isClosable: true,
|
||||
// });
|
||||
};
|
||||
|
||||
const handleUseInitialImage = async () => {
|
||||
if (metadata.sd_metadata?.image?.init_image_path) {
|
||||
const response = await fetch(
|
||||
metadata.sd_metadata?.image?.init_image_path
|
||||
);
|
||||
if (response.ok) {
|
||||
dispatch(setAllImageToImageParameters(metadata?.sd_metadata));
|
||||
toast({
|
||||
title: t('toast.initialImageSet'),
|
||||
status: 'success',
|
||||
duration: 2500,
|
||||
isClosable: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
toast({
|
||||
title: t('toast.initialImageNotSet'),
|
||||
description: t('toast.initialImageNotSetDesc'),
|
||||
status: 'error',
|
||||
duration: 2500,
|
||||
isClosable: true,
|
||||
});
|
||||
// if (metadata.invokeai?.node?.image?.init_image_path) {
|
||||
// const response = await fetch(
|
||||
// metadata.invokeai?.node?.image?.init_image_path
|
||||
// );
|
||||
// if (response.ok) {
|
||||
// dispatch(setAllImageToImageParameters(metadata?.invokeai?.node));
|
||||
// toast({
|
||||
// title: t('toast.initialImageSet'),
|
||||
// status: 'success',
|
||||
// duration: 2500,
|
||||
// isClosable: true,
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// toast({
|
||||
// title: t('toast.initialImageNotSet'),
|
||||
// description: t('toast.initialImageNotSetDesc'),
|
||||
// status: 'error',
|
||||
// duration: 2500,
|
||||
// isClosable: true,
|
||||
// });
|
||||
};
|
||||
|
||||
const handleSelectImage = () => {
|
||||
@ -268,7 +269,7 @@ const HoverableImage = memo((props: HoverableImageProps) => {
|
||||
<MenuItem
|
||||
icon={<IoArrowUndoCircleOutline />}
|
||||
onClickCapture={handleUsePrompt}
|
||||
isDisabled={image?.metadata?.sd_metadata?.prompt === undefined}
|
||||
isDisabled={image?.metadata?.invokeai?.node?.prompt === undefined}
|
||||
>
|
||||
{t('parameters.usePrompt')}
|
||||
</MenuItem>
|
||||
@ -276,14 +277,14 @@ const HoverableImage = memo((props: HoverableImageProps) => {
|
||||
<MenuItem
|
||||
icon={<IoArrowUndoCircleOutline />}
|
||||
onClickCapture={handleUseSeed}
|
||||
isDisabled={image?.metadata?.sd_metadata?.seed === undefined}
|
||||
isDisabled={image?.metadata?.invokeai?.node?.seed === undefined}
|
||||
>
|
||||
{t('parameters.useSeed')}
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
icon={<IoArrowUndoCircleOutline />}
|
||||
onClickCapture={handleUseInitialImage}
|
||||
isDisabled={image?.metadata?.sd_metadata?.type !== 'img2img'}
|
||||
isDisabled={image?.metadata?.invokeai?.node?.type !== 'img2img'}
|
||||
>
|
||||
{t('parameters.useInitImg')}
|
||||
</MenuItem>
|
||||
@ -292,7 +293,7 @@ const HoverableImage = memo((props: HoverableImageProps) => {
|
||||
onClickCapture={handleUseAllParameters}
|
||||
isDisabled={
|
||||
!['txt2img', 'img2img'].includes(
|
||||
image?.metadata?.sd_metadata?.type
|
||||
String(image?.metadata?.invokeai?.node?.type)
|
||||
)
|
||||
}
|
||||
>
|
||||
|
@ -35,7 +35,7 @@
|
||||
// } from 'features/ui/store/uiSlice';
|
||||
// import { InvokeTabName } from 'features/ui/store/tabMap';
|
||||
|
||||
// import { clamp } from 'lodash';
|
||||
// import { clamp } from 'lodash-es';
|
||||
// import { Direction } from 're-resizable/lib/resizer';
|
||||
// import React, {
|
||||
// ChangeEvent,
|
||||
|
@ -7,7 +7,7 @@ import {
|
||||
} from 'features/gallery/store/gallerySlice';
|
||||
import { InvokeTabName } from 'features/ui/store/tabMap';
|
||||
|
||||
import { clamp, isEqual } from 'lodash';
|
||||
import { clamp, isEqual } from 'lodash-es';
|
||||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
|
||||
import './ImageGallery.css';
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { ChakraProps, Flex, Grid, IconButton } from '@chakra-ui/react';
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { FaAngleLeft, FaAngleRight } from 'react-icons/fa';
|
||||
|
@ -7,7 +7,7 @@ import {
|
||||
activeTabNameSelector,
|
||||
uiSelector,
|
||||
} from 'features/ui/store/uiSelectors';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import {
|
||||
selectResultsAll,
|
||||
selectResultsById,
|
||||
|
@ -4,7 +4,7 @@ import * as InvokeAI from 'app/types/invokeai';
|
||||
import { invocationComplete } from 'services/events/actions';
|
||||
import { InvokeTabName } from 'features/ui/store/tabMap';
|
||||
import { IRect } from 'konva/lib/types';
|
||||
import { clamp } from 'lodash';
|
||||
import { clamp } from 'lodash-es';
|
||||
import { isImageOutput } from 'services/types/guards';
|
||||
import { deserializeImageResponse } from 'services/util/deserializeImageResponse';
|
||||
import { imageUploaded } from 'services/thunks/image';
|
||||
|
@ -10,7 +10,7 @@ import { gallerySelector } from 'features/gallery/store/gallerySelectors';
|
||||
import { setIsLightboxOpen } from 'features/lightbox/store/lightboxSlice';
|
||||
import { uiSelector } from 'features/ui/store/uiSelectors';
|
||||
import { AnimatePresence, motion } from 'framer-motion';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
import { BiExit } from 'react-icons/bi';
|
||||
import { TransformWrapper } from 'react-zoom-pan-pinch';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { RootState } from 'app/store/store';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
export const lightboxSelector = createSelector(
|
||||
(state: RootState) => state.lightbox,
|
||||
|
@ -13,7 +13,7 @@ import {
|
||||
import { FaEllipsisV, FaPlus } from 'react-icons/fa';
|
||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||
import { nodeAdded } from '../store/nodesSlice';
|
||||
import { cloneDeep, map } from 'lodash';
|
||||
import { cloneDeep, map } from 'lodash-es';
|
||||
import { RootState } from 'app/store/store';
|
||||
import { useBuildInvocation } from '../hooks/useBuildInvocation';
|
||||
import { addToast } from 'features/system/store/systemSlice';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import 'reactflow/dist/style.css';
|
||||
import { Tooltip, Badge, Flex } from '@chakra-ui/react';
|
||||
import { map } from 'lodash';
|
||||
import { map } from 'lodash-es';
|
||||
import { FIELDS } from '../types/constants';
|
||||
import { memo } from 'react';
|
||||
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
InvocationTemplate,
|
||||
} from 'features/nodes/types/types';
|
||||
import { memo, ReactNode, useCallback } from 'react';
|
||||
import { map } from 'lodash';
|
||||
import { map } from 'lodash-es';
|
||||
import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { RootState } from 'app/store/store';
|
||||
import {
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
OutputFieldValue,
|
||||
} from 'features/nodes/types/types';
|
||||
import { memo, ReactNode, useCallback } from 'react';
|
||||
import { map } from 'lodash';
|
||||
import { map } from 'lodash-es';
|
||||
import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { RootState } from 'app/store/store';
|
||||
import { Box, Flex, FormControl, FormLabel, HStack } from '@chakra-ui/react';
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
selectModelsById,
|
||||
selectModelsIds,
|
||||
} from 'features/system/store/modelSlice';
|
||||
import { isEqual, map } from 'lodash';
|
||||
import { isEqual, map } from 'lodash-es';
|
||||
import { ChangeEvent, memo } from 'react';
|
||||
import { FieldComponentProps } from './types';
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { RootState } from 'app/store/store';
|
||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||
import IAIInput from 'common/components/IAIInput';
|
||||
import { Panel } from 'reactflow';
|
||||
import { map } from 'lodash';
|
||||
import { map } from 'lodash-es';
|
||||
import {
|
||||
ChangeEvent,
|
||||
FocusEvent,
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { RootState } from 'app/store/store';
|
||||
import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { reduce } from 'lodash';
|
||||
import { reduce } from 'lodash-es';
|
||||
import { useCallback } from 'react';
|
||||
import { Node, useReactFlow } from 'reactflow';
|
||||
import { AnyInvocationType } from 'services/events/types';
|
||||
|
@ -14,77 +14,77 @@ export const useIsValidConnection = () => {
|
||||
|
||||
return true;
|
||||
|
||||
// Connection must have valid targets
|
||||
if (!(source && sourceHandle && target && targetHandle)) {
|
||||
return false;
|
||||
}
|
||||
// // Connection must have valid targets
|
||||
// if (!(source && sourceHandle && target && targetHandle)) {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// Connection is invalid if target already has a connection
|
||||
if (
|
||||
edges.find((edge) => {
|
||||
return edge.target === target && edge.targetHandle === targetHandle;
|
||||
})
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
// // Connection is invalid if target already has a connection
|
||||
// if (
|
||||
// edges.find((edge) => {
|
||||
// return edge.target === target && edge.targetHandle === targetHandle;
|
||||
// })
|
||||
// ) {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// Find the source and target nodes
|
||||
const sourceNode = flow.getNode(source) as Node<InvocationValue>;
|
||||
// // Find the source and target nodes
|
||||
// const sourceNode = flow.getNode(source) as Node<InvocationValue>;
|
||||
|
||||
const targetNode = flow.getNode(target) as Node<InvocationValue>;
|
||||
// const targetNode = flow.getNode(target) as Node<InvocationValue>;
|
||||
|
||||
// Conditional guards against undefined nodes/handles
|
||||
if (!(sourceNode && targetNode && sourceNode.data && targetNode.data)) {
|
||||
return false;
|
||||
}
|
||||
// // Conditional guards against undefined nodes/handles
|
||||
// if (!(sourceNode && targetNode && sourceNode.data && targetNode.data)) {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// Connection types must be the same for a connection
|
||||
if (
|
||||
sourceNode.data.outputs[sourceHandle].type !==
|
||||
targetNode.data.inputs[targetHandle].type
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
// // Connection types must be the same for a connection
|
||||
// if (
|
||||
// sourceNode.data.outputs[sourceHandle].type !==
|
||||
// targetNode.data.inputs[targetHandle].type
|
||||
// ) {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// Graphs much be acyclic (no loops!)
|
||||
// // Graphs much be acyclic (no loops!)
|
||||
|
||||
/**
|
||||
* TODO: use `graphlib.alg.findCycles()` to identify strong connections
|
||||
*
|
||||
* this validation func only runs when the cursor hits the second handle of the connection,
|
||||
* and only on that second handle - so it cannot tell us exhaustively which connections
|
||||
* are valid.
|
||||
*
|
||||
* ideally, we check when the connection starts to calculate all invalid handles at once.
|
||||
*
|
||||
* requires making a new graphlib graph - and calling `findCycles()` - for each potential
|
||||
* handle. instead of using the `isValidConnection` prop, it would use the `onConnectStart`
|
||||
* prop.
|
||||
*
|
||||
* the strong connections should be stored in global state.
|
||||
*
|
||||
* then, `isValidConnection` would simple loop through the strong connections and if the
|
||||
* source and target are in a single strong connection, return false.
|
||||
*
|
||||
* and also, we can use this knowledge to style every handle when a connection starts,
|
||||
* which is otherwise not possible.
|
||||
*/
|
||||
// /**
|
||||
// * TODO: use `graphlib.alg.findCycles()` to identify strong connections
|
||||
// *
|
||||
// * this validation func only runs when the cursor hits the second handle of the connection,
|
||||
// * and only on that second handle - so it cannot tell us exhaustively which connections
|
||||
// * are valid.
|
||||
// *
|
||||
// * ideally, we check when the connection starts to calculate all invalid handles at once.
|
||||
// *
|
||||
// * requires making a new graphlib graph - and calling `findCycles()` - for each potential
|
||||
// * handle. instead of using the `isValidConnection` prop, it would use the `onConnectStart`
|
||||
// * prop.
|
||||
// *
|
||||
// * the strong connections should be stored in global state.
|
||||
// *
|
||||
// * then, `isValidConnection` would simple loop through the strong connections and if the
|
||||
// * source and target are in a single strong connection, return false.
|
||||
// *
|
||||
// * and also, we can use this knowledge to style every handle when a connection starts,
|
||||
// * which is otherwise not possible.
|
||||
// */
|
||||
|
||||
// build a graphlib graph
|
||||
const g = new graphlib.Graph();
|
||||
// // build a graphlib graph
|
||||
// const g = new graphlib.Graph();
|
||||
|
||||
nodes.forEach((n) => {
|
||||
g.setNode(n.id);
|
||||
});
|
||||
// nodes.forEach((n) => {
|
||||
// g.setNode(n.id);
|
||||
// });
|
||||
|
||||
edges.forEach((e) => {
|
||||
g.setEdge(e.source, e.target);
|
||||
});
|
||||
// edges.forEach((e) => {
|
||||
// g.setEdge(e.source, e.target);
|
||||
// });
|
||||
|
||||
// Add the candidate edge to the graph
|
||||
g.setEdge(source, target);
|
||||
// // Add the candidate edge to the graph
|
||||
// g.setEdge(source, target);
|
||||
|
||||
return graphlib.alg.isAcyclic(g);
|
||||
// return graphlib.alg.isAcyclic(g);
|
||||
},
|
||||
[flow]
|
||||
);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { reduce } from 'lodash';
|
||||
import { reduce } from 'lodash-es';
|
||||
import { OpenAPIV3 } from 'openapi-types';
|
||||
import { FIELD_TYPE_MAP } from '../types/constants';
|
||||
import { isSchemaObject } from '../types/typeGuards';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Graph } from 'services/api';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { reduce } from 'lodash';
|
||||
import { reduce } from 'lodash-es';
|
||||
import { RootState } from 'app/store/store';
|
||||
import { AnyInvocation } from 'services/events/types';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { filter, reduce } from 'lodash';
|
||||
import { filter, reduce } from 'lodash-es';
|
||||
import { OpenAPIV3 } from 'openapi-types';
|
||||
import { isSchemaObject } from '../types/typeGuards';
|
||||
import {
|
||||
|
@ -4,7 +4,7 @@ import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||
import IAISlider from 'common/components/IAISlider';
|
||||
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
|
||||
import { setBoundingBoxDimensions } from 'features/canvas/store/canvasSlice';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
|
@ -18,7 +18,7 @@ import {
|
||||
setTileSize,
|
||||
} from 'features/parameters/store/generationSlice';
|
||||
import { systemSelector } from 'features/system/store/systemSelectors';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { ChangeEvent } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
@ -29,7 +29,7 @@ export default function ImageToImageSettings() {
|
||||
<VStack gap={2} w="full" alignItems="stretch">
|
||||
<ImageToImageSettingsHeader />
|
||||
<InitialImagePreview />
|
||||
<ImageToImageStrength label={t('parameters.img2imgStrength')} />
|
||||
<ImageToImageStrength />
|
||||
<ImageFit />
|
||||
</VStack>
|
||||
);
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
initialImageSelected,
|
||||
} from 'features/parameters/store/generationSlice';
|
||||
import { addToast } from 'features/system/store/systemSlice';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { DragEvent, useCallback, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { ImageType } from 'services/api';
|
||||
|
@ -8,7 +8,7 @@ import {
|
||||
setHiresFix,
|
||||
setHiresStrength,
|
||||
} from 'features/parameters/store/postprocessingSlice';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { ChangeEvent } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
|
@ -5,7 +5,7 @@ import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||
import { tabMap } from 'features/ui/store/tabMap';
|
||||
import { uiSelector } from 'features/ui/store/uiSelectors';
|
||||
import { openAccordionItemsChanged } from 'features/ui/store/uiSlice';
|
||||
import { map } from 'lodash';
|
||||
import { map } from 'lodash-es';
|
||||
import { ReactNode, useCallback } from 'react';
|
||||
import InvokeAccordionItem from './AccordionItems/InvokeAccordionItem';
|
||||
|
||||
|
@ -12,7 +12,7 @@ import {
|
||||
cancelTypeChanged,
|
||||
CancelType,
|
||||
} from 'features/system/store/systemSlice';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { useEffect, useCallback, memo } from 'react';
|
||||
import {
|
||||
ButtonSpinner,
|
||||
@ -170,7 +170,7 @@ const CancelButton = (
|
||||
|
||||
<Menu closeOnSelect={false}>
|
||||
<MenuButton
|
||||
as={IconButton}
|
||||
as={IAIIconButton}
|
||||
tooltip={t('parameters.cancel.setType')}
|
||||
aria-label={t('parameters.cancel.setType')}
|
||||
icon={<BiChevronDown />}
|
||||
|
@ -14,7 +14,7 @@ const ProcessButtons = () => {
|
||||
return (
|
||||
<Flex gap={2}>
|
||||
<InvokeButton />
|
||||
{activeTabName === 'img2img' && <LoopbackButton />}
|
||||
{/* {activeTabName === 'img2img' && <LoopbackButton />} */}
|
||||
<CancelButton />
|
||||
</Flex>
|
||||
);
|
||||
|
@ -12,7 +12,7 @@ import {
|
||||
} from 'features/parameters/store/generationSlice';
|
||||
import { activeTabNameSelector } from 'features/ui/store/uiSelectors';
|
||||
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
|
@ -6,7 +6,7 @@ import {
|
||||
selectResultsEntities,
|
||||
} from 'features/gallery/store/resultsSlice';
|
||||
import { selectUploadsById } from 'features/gallery/store/uploadsSlice';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
export const generationSelector = (state: RootState) => state.generation;
|
||||
|
||||
|
@ -4,7 +4,7 @@ import * as InvokeAI from 'app/types/invokeai';
|
||||
import { getPromptAndNegative } from 'common/util/getPromptAndNegative';
|
||||
import promptToString from 'common/util/promptToString';
|
||||
import { seedWeightsToString } from 'common/util/seedWeightPairs';
|
||||
import { clamp } from 'lodash';
|
||||
import { clamp } from 'lodash-es';
|
||||
|
||||
export interface GenerationState {
|
||||
cfgScale: number;
|
||||
@ -179,136 +179,126 @@ export const generationSlice = createSlice({
|
||||
state,
|
||||
action: PayloadAction<InvokeAI.Metadata>
|
||||
) => {
|
||||
const {
|
||||
sampler,
|
||||
prompt,
|
||||
seed,
|
||||
variations,
|
||||
steps,
|
||||
cfg_scale,
|
||||
threshold,
|
||||
perlin,
|
||||
seamless,
|
||||
_hires_fix,
|
||||
width,
|
||||
height,
|
||||
} = action.payload.image;
|
||||
|
||||
if (variations && variations.length > 0) {
|
||||
state.seedWeights = seedWeightsToString(variations);
|
||||
state.shouldGenerateVariations = true;
|
||||
state.variationAmount = 0;
|
||||
} else {
|
||||
state.shouldGenerateVariations = false;
|
||||
}
|
||||
|
||||
if (seed) {
|
||||
state.seed = seed;
|
||||
state.shouldRandomizeSeed = false;
|
||||
}
|
||||
|
||||
if (prompt) state.prompt = promptToString(prompt);
|
||||
if (sampler) state.sampler = sampler;
|
||||
if (steps) state.steps = steps;
|
||||
if (cfg_scale) state.cfgScale = cfg_scale;
|
||||
if (typeof threshold === 'undefined') {
|
||||
state.threshold = 0;
|
||||
} else {
|
||||
state.threshold = threshold;
|
||||
}
|
||||
if (typeof perlin === 'undefined') {
|
||||
state.perlin = 0;
|
||||
} else {
|
||||
state.perlin = perlin;
|
||||
}
|
||||
if (typeof seamless === 'boolean') state.seamless = seamless;
|
||||
// if (typeof hires_fix === 'boolean') state.hiresFix = hires_fix; // TODO: Needs to be fixed after reorg
|
||||
if (width) state.width = width;
|
||||
if (height) state.height = height;
|
||||
// const {
|
||||
// sampler,
|
||||
// prompt,
|
||||
// seed,
|
||||
// variations,
|
||||
// steps,
|
||||
// cfg_scale,
|
||||
// threshold,
|
||||
// perlin,
|
||||
// seamless,
|
||||
// _hires_fix,
|
||||
// width,
|
||||
// height,
|
||||
// } = action.payload.image;
|
||||
// if (variations && variations.length > 0) {
|
||||
// state.seedWeights = seedWeightsToString(variations);
|
||||
// state.shouldGenerateVariations = true;
|
||||
// state.variationAmount = 0;
|
||||
// } else {
|
||||
// state.shouldGenerateVariations = false;
|
||||
// }
|
||||
// if (seed) {
|
||||
// state.seed = seed;
|
||||
// state.shouldRandomizeSeed = false;
|
||||
// }
|
||||
// if (prompt) state.prompt = promptToString(prompt);
|
||||
// if (sampler) state.sampler = sampler;
|
||||
// if (steps) state.steps = steps;
|
||||
// if (cfg_scale) state.cfgScale = cfg_scale;
|
||||
// if (typeof threshold === 'undefined') {
|
||||
// state.threshold = 0;
|
||||
// } else {
|
||||
// state.threshold = threshold;
|
||||
// }
|
||||
// if (typeof perlin === 'undefined') {
|
||||
// state.perlin = 0;
|
||||
// } else {
|
||||
// state.perlin = perlin;
|
||||
// }
|
||||
// if (typeof seamless === 'boolean') state.seamless = seamless;
|
||||
// // if (typeof hires_fix === 'boolean') state.hiresFix = hires_fix; // TODO: Needs to be fixed after reorg
|
||||
// if (width) state.width = width;
|
||||
// if (height) state.height = height;
|
||||
},
|
||||
setAllImageToImageParameters: (
|
||||
state,
|
||||
action: PayloadAction<InvokeAI.Metadata>
|
||||
) => {
|
||||
const { type, strength, fit, init_image_path, mask_image_path } =
|
||||
action.payload.image;
|
||||
|
||||
if (type === 'img2img') {
|
||||
if (init_image_path) state.initialImage = init_image_path;
|
||||
if (mask_image_path) state.maskPath = mask_image_path;
|
||||
if (strength) state.img2imgStrength = strength;
|
||||
if (typeof fit === 'boolean') state.shouldFitToWidthHeight = fit;
|
||||
}
|
||||
// const { type, strength, fit, init_image_path, mask_image_path } =
|
||||
// action.payload.image;
|
||||
// if (type === 'img2img') {
|
||||
// if (init_image_path) state.initialImage = init_image_path;
|
||||
// if (mask_image_path) state.maskPath = mask_image_path;
|
||||
// if (strength) state.img2imgStrength = strength;
|
||||
// if (typeof fit === 'boolean') state.shouldFitToWidthHeight = fit;
|
||||
// }
|
||||
},
|
||||
setAllParameters: (state, action: PayloadAction<InvokeAI.Metadata>) => {
|
||||
const {
|
||||
type,
|
||||
sampler,
|
||||
prompt,
|
||||
seed,
|
||||
variations,
|
||||
steps,
|
||||
cfg_scale,
|
||||
threshold,
|
||||
perlin,
|
||||
seamless,
|
||||
_hires_fix,
|
||||
width,
|
||||
height,
|
||||
strength,
|
||||
fit,
|
||||
init_image_path,
|
||||
mask_image_path,
|
||||
} = action.payload.image;
|
||||
|
||||
if (type === 'img2img') {
|
||||
if (init_image_path) state.initialImage = init_image_path;
|
||||
if (mask_image_path) state.maskPath = mask_image_path;
|
||||
if (strength) state.img2imgStrength = strength;
|
||||
if (typeof fit === 'boolean') state.shouldFitToWidthHeight = fit;
|
||||
}
|
||||
|
||||
if (variations && variations.length > 0) {
|
||||
state.seedWeights = seedWeightsToString(variations);
|
||||
state.shouldGenerateVariations = true;
|
||||
state.variationAmount = 0;
|
||||
} else {
|
||||
state.shouldGenerateVariations = false;
|
||||
}
|
||||
|
||||
if (seed) {
|
||||
state.seed = seed;
|
||||
state.shouldRandomizeSeed = false;
|
||||
}
|
||||
|
||||
if (prompt) {
|
||||
const [promptOnly, negativePrompt] = getPromptAndNegative(prompt);
|
||||
if (promptOnly) state.prompt = promptOnly;
|
||||
negativePrompt
|
||||
? (state.negativePrompt = negativePrompt)
|
||||
: (state.negativePrompt = '');
|
||||
}
|
||||
|
||||
if (sampler) state.sampler = sampler;
|
||||
if (steps) state.steps = steps;
|
||||
if (cfg_scale) state.cfgScale = cfg_scale;
|
||||
if (typeof threshold === 'undefined') {
|
||||
state.threshold = 0;
|
||||
} else {
|
||||
state.threshold = threshold;
|
||||
}
|
||||
if (typeof perlin === 'undefined') {
|
||||
state.perlin = 0;
|
||||
} else {
|
||||
state.perlin = perlin;
|
||||
}
|
||||
if (typeof seamless === 'boolean') state.seamless = seamless;
|
||||
// if (typeof hires_fix === 'boolean') state.hiresFix = hires_fix; // TODO: Needs to be fixed after reorg
|
||||
if (width) state.width = width;
|
||||
if (height) state.height = height;
|
||||
|
||||
// state.shouldRunESRGAN = false; // TODO: Needs to be fixed after reorg
|
||||
// state.shouldRunFacetool = false; // TODO: Needs to be fixed after reorg
|
||||
// const {
|
||||
// type,
|
||||
// sampler,
|
||||
// prompt,
|
||||
// seed,
|
||||
// variations,
|
||||
// steps,
|
||||
// cfg_scale,
|
||||
// threshold,
|
||||
// perlin,
|
||||
// seamless,
|
||||
// _hires_fix,
|
||||
// width,
|
||||
// height,
|
||||
// strength,
|
||||
// fit,
|
||||
// init_image_path,
|
||||
// mask_image_path,
|
||||
// } = action.payload.image;
|
||||
// if (type === 'img2img') {
|
||||
// if (init_image_path) state.initialImage = init_image_path;
|
||||
// if (mask_image_path) state.maskPath = mask_image_path;
|
||||
// if (strength) state.img2imgStrength = strength;
|
||||
// if (typeof fit === 'boolean') state.shouldFitToWidthHeight = fit;
|
||||
// }
|
||||
// if (variations && variations.length > 0) {
|
||||
// state.seedWeights = seedWeightsToString(variations);
|
||||
// state.shouldGenerateVariations = true;
|
||||
// state.variationAmount = 0;
|
||||
// } else {
|
||||
// state.shouldGenerateVariations = false;
|
||||
// }
|
||||
// if (seed) {
|
||||
// state.seed = seed;
|
||||
// state.shouldRandomizeSeed = false;
|
||||
// }
|
||||
// if (prompt) {
|
||||
// const [promptOnly, negativePrompt] = getPromptAndNegative(prompt);
|
||||
// if (promptOnly) state.prompt = promptOnly;
|
||||
// negativePrompt
|
||||
// ? (state.negativePrompt = negativePrompt)
|
||||
// : (state.negativePrompt = '');
|
||||
// }
|
||||
// if (sampler) state.sampler = sampler;
|
||||
// if (steps) state.steps = steps;
|
||||
// if (cfg_scale) state.cfgScale = cfg_scale;
|
||||
// if (typeof threshold === 'undefined') {
|
||||
// state.threshold = 0;
|
||||
// } else {
|
||||
// state.threshold = threshold;
|
||||
// }
|
||||
// if (typeof perlin === 'undefined') {
|
||||
// state.perlin = 0;
|
||||
// } else {
|
||||
// state.perlin = perlin;
|
||||
// }
|
||||
// if (typeof seamless === 'boolean') state.seamless = seamless;
|
||||
// // if (typeof hires_fix === 'boolean') state.hiresFix = hires_fix; // TODO: Needs to be fixed after reorg
|
||||
// if (width) state.width = width;
|
||||
// if (height) state.height = height;
|
||||
// // state.shouldRunESRGAN = false; // TODO: Needs to be fixed after reorg
|
||||
// // state.shouldRunFacetool = false; // TODO: Needs to be fixed after reorg
|
||||
},
|
||||
resetParametersState: (state) => {
|
||||
return {
|
||||
|
@ -7,7 +7,7 @@ import {
|
||||
setShouldShowLogViewer,
|
||||
SystemState,
|
||||
} from 'features/system/store/systemSlice';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { Resizable } from 're-resizable';
|
||||
import { useLayoutEffect, useRef, useState } from 'react';
|
||||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
|
@ -24,7 +24,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import type { InvokeModelConfigProps } from 'app/types/invokeai';
|
||||
import type { RootState } from 'app/store/store';
|
||||
import type { FieldInputProps, FormikProps } from 'formik';
|
||||
import { isEqual, pickBy } from 'lodash';
|
||||
import { isEqual, pickBy } from 'lodash-es';
|
||||
import ModelConvert from './ModelConvert';
|
||||
import IAIFormHelperText from 'common/components/IAIForms/IAIFormHelperText';
|
||||
import IAIFormErrorMessage from 'common/components/IAIForms/IAIFormErrorMessage';
|
||||
|
@ -15,7 +15,7 @@ import { useTranslation } from 'react-i18next';
|
||||
|
||||
import type { InvokeDiffusersModelConfigProps } from 'app/types/invokeai';
|
||||
import type { RootState } from 'app/store/store';
|
||||
import { isEqual, pickBy } from 'lodash';
|
||||
import { isEqual, pickBy } from 'lodash-es';
|
||||
import IAIFormHelperText from 'common/components/IAIForms/IAIFormHelperText';
|
||||
import IAIFormErrorMessage from 'common/components/IAIForms/IAIFormErrorMessage';
|
||||
import IAIForm from 'common/components/IAIForm';
|
||||
|
@ -12,7 +12,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { systemSelector } from 'features/system/store/systemSelectors';
|
||||
import type { SystemState } from 'features/system/store/systemSlice';
|
||||
import { isEqual, map } from 'lodash';
|
||||
import { isEqual, map } from 'lodash-es';
|
||||
|
||||
import React, { useMemo, useState, useTransition } from 'react';
|
||||
import type { ChangeEvent, ReactNode } from 'react';
|
||||
|
@ -31,7 +31,7 @@ import type { FoundModel } from 'app/types/invokeai';
|
||||
import type { RootState } from 'app/store/store';
|
||||
import IAIInput from 'common/components/IAIInput';
|
||||
import { Field, Formik } from 'formik';
|
||||
import { forEach, remove } from 'lodash';
|
||||
import { forEach, remove } from 'lodash-es';
|
||||
import type { ChangeEvent, ReactNode } from 'react';
|
||||
import IAIForm from 'common/components/IAIForm';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { ChangeEvent, memo } from 'react';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||
|
@ -2,7 +2,7 @@ import { Progress } from '@chakra-ui/react';
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { SystemState } from 'features/system/store/systemSlice';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { PROGRESS_BAR_THICKNESS } from 'theme/util/constants';
|
||||
import { systemSelector } from '../store/systemSelectors';
|
||||
|
@ -37,7 +37,7 @@ import {
|
||||
setShouldUseSliders,
|
||||
} from 'features/ui/store/uiSlice';
|
||||
import { UIState } from 'features/ui/store/uiTypes';
|
||||
import { isEqual, map } from 'lodash';
|
||||
import { isEqual, map } from 'lodash-es';
|
||||
import { persistor } from 'app/store/persistor';
|
||||
import { ChangeEvent, cloneElement, ReactElement } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
@ -2,7 +2,7 @@ import { Text, Tooltip } from '@chakra-ui/react';
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||
import { errorSeen, SystemState } from 'features/system/store/systemSlice';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { systemSelector } from '../store/systemSelectors';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import type { PayloadAction } from '@reduxjs/toolkit';
|
||||
import { createSlice } from '@reduxjs/toolkit';
|
||||
import { AppConfig, PartialAppConfig } from 'app/types/invokeai';
|
||||
import { merge } from 'lodash';
|
||||
import { merge } from 'lodash-es';
|
||||
|
||||
const initialConfigState: AppConfig = {
|
||||
shouldTransformUrls: false,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { RootState } from 'app/store/store';
|
||||
import { reduce } from 'lodash';
|
||||
import { reduce } from 'lodash-es';
|
||||
|
||||
export const modelSelector = (state: RootState) => state.models;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { createEntityAdapter, PayloadAction } from '@reduxjs/toolkit';
|
||||
import { createSlice } from '@reduxjs/toolkit';
|
||||
import { RootState } from 'app/store/store';
|
||||
import { keys, sample } from 'lodash';
|
||||
import { keys, sample } from 'lodash-es';
|
||||
import { CkptModelInfo, DiffusersModelInfo } from 'services/api';
|
||||
import { receivedModels } from 'services/thunks/model';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { RootState } from 'app/store/store';
|
||||
import { isEqual, reduce, pickBy } from 'lodash';
|
||||
import { isEqual, reduce, pickBy } from 'lodash-es';
|
||||
|
||||
export const systemSelector = (state: RootState) => state.system;
|
||||
|
||||
|
@ -4,7 +4,7 @@ import IAIIconButton from 'common/components/IAIIconButton';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { requestCanvasRescale } from 'features/canvas/store/thunks/requestCanvasScale';
|
||||
import { setShouldShowGallery } from 'features/ui/store/uiSlice';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { MdPhotoLibrary } from 'react-icons/md';
|
||||
import { activeTabNameSelector, uiSelector } from '../store/uiSelectors';
|
||||
|
||||
|
@ -10,7 +10,7 @@ import {
|
||||
uiSelector,
|
||||
} from 'features/ui/store/uiSelectors';
|
||||
import { setShouldShowParametersPanel } from 'features/ui/store/uiSlice';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { FaSlidersH } from 'react-icons/fa';
|
||||
|
@ -10,7 +10,7 @@ import { DragEvent, ReactNode } from 'react';
|
||||
|
||||
import { setInitialCanvasImage } from 'features/canvas/store/canvasSlice';
|
||||
import useGetImageByUuid from 'features/gallery/hooks/useGetImageByUuid';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { APP_CONTENT_HEIGHT } from 'theme/util/constants';
|
||||
import ParametersPanel from './ParametersPanel';
|
||||
|
||||
|
@ -17,7 +17,7 @@ import PinParametersPanelButton from './PinParametersPanelButton';
|
||||
import { requestCanvasRescale } from 'features/canvas/store/thunks/requestCanvasScale';
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { activeTabNameSelector, uiSelector } from '../store/uiSelectors';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { lightboxSelector } from 'features/lightbox/store/lightboxSelectors';
|
||||
import useResolution from 'common/hooks/useResolution';
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { Slide } from '@chakra-ui/react';
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||
import { uiSelector } from 'features/ui/store/uiSelectors';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { memo, PropsWithChildren, useRef } from 'react';
|
||||
import PinParametersPanelButton from 'features/ui/components/PinParametersPanelButton';
|
||||
import {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Box, ChakraProps } from '@chakra-ui/react';
|
||||
import { throttle } from 'lodash';
|
||||
import { throttle } from 'lodash-es';
|
||||
import { ReactNode, useEffect, useRef } from 'react';
|
||||
|
||||
const scrollShadowBaseStyles: ChakraProps['sx'] = {
|
||||
|
@ -29,7 +29,7 @@ import ParametersAccordion, {
|
||||
import ProcessButtons from 'features/parameters/components/ProcessButtons/ProcessButtons';
|
||||
import NegativePromptInput from 'features/parameters/components/PromptInput/NegativePromptInput';
|
||||
import PromptInput from 'features/parameters/components/PromptInput/PromptInput';
|
||||
import { findIndex } from 'lodash';
|
||||
import { findIndex } from 'lodash-es';
|
||||
import { memo, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { PARAMETERS_PANEL_WIDTH } from 'theme/util/constants';
|
||||
|
@ -6,7 +6,7 @@ import IAICanvas from 'features/canvas/components/IAICanvas';
|
||||
import IAICanvasResizer from 'features/canvas/components/IAICanvasResizer';
|
||||
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
|
||||
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { useLayoutEffect } from 'react';
|
||||
import UnifiedCanvasToolbarBeta from './UnifiedCanvasToolbarBeta';
|
||||
import UnifiedCanvasToolSettingsBeta from './UnifiedCanvasToolSettingsBeta';
|
||||
|
@ -8,7 +8,7 @@ import {
|
||||
isStagingSelector,
|
||||
} from 'features/canvas/store/canvasSelectors';
|
||||
import { setBrushColor, setMaskColor } from 'features/canvas/store/canvasSlice';
|
||||
import { clamp, isEqual } from 'lodash';
|
||||
import { clamp, isEqual } from 'lodash-es';
|
||||
|
||||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
|
||||
|
@ -16,7 +16,7 @@ import EmptyTempFolderButtonModal from 'features/system/components/ClearTempFold
|
||||
import { FaWrench } from 'react-icons/fa';
|
||||
|
||||
import ClearCanvasHistoryButtonModal from 'features/canvas/components/ClearCanvasHistoryButtonModal';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export const canvasControlsSelector = createSelector(
|
||||
|
@ -3,7 +3,7 @@ import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
|
||||
|
||||
import { Flex } from '@chakra-ui/react';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import UnifiedCanvasBaseBrushSettings from './UnifiedCanvasToolSettings/UnifiedCanvasBaseBrushSettings';
|
||||
import UnifiedCanvasMaskBrushSettings from './UnifiedCanvasToolSettings/UnifiedCanvasMaskBrushSettings';
|
||||
import UnifiedCanvasMoveSettings from './UnifiedCanvasToolSettings/UnifiedCanvasMoveSettings';
|
||||
|
@ -10,7 +10,7 @@ import {
|
||||
CanvasLayer,
|
||||
LAYER_NAMES_DICT,
|
||||
} from 'features/canvas/store/canvasTypes';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { ChangeEvent } from 'react';
|
||||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
|
@ -12,7 +12,7 @@ import {
|
||||
setTool,
|
||||
} from 'features/canvas/store/canvasSlice';
|
||||
import { systemSelector } from 'features/system/store/systemSelectors';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
@ -7,7 +7,7 @@ import IAICanvasResizer from 'features/canvas/components/IAICanvasResizer';
|
||||
import IAICanvasToolbar from 'features/canvas/components/IAICanvasToolbar/IAICanvasToolbar';
|
||||
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
|
||||
import { requestCanvasRescale } from 'features/canvas/store/thunks/requestCanvasScale';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { useLayoutEffect } from 'react';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { RootState } from 'app/store/store';
|
||||
import { isEqual } from 'lodash';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
import { tabMap } from './tabMap';
|
||||
import { UIState } from './uiTypes';
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { isFulfilled, isRejected } from '@reduxjs/toolkit';
|
||||
import { createAppAsyncThunk } from 'app/store/storeUtils';
|
||||
import { imageSelected } from 'features/gallery/store/gallerySlice';
|
||||
import { clamp } from 'lodash';
|
||||
import { clamp } from 'lodash-es';
|
||||
import { ImagesService } from 'services/api';
|
||||
import { getHeaders } from 'services/util/getHeaders';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { createAppAsyncThunk } from 'app/store/storeUtils';
|
||||
import { Model } from 'features/system/store/modelSlice';
|
||||
import { reduce } from 'lodash';
|
||||
import { reduce } from 'lodash-es';
|
||||
import { ModelsService } from 'services/api';
|
||||
|
||||
export const IMAGES_PER_PAGE = 20;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user