mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Reorganises app file structure
This commit is contained in:
parent
bc46c46835
commit
2ab868314f
@ -1,18 +1,18 @@
|
|||||||
import ProgressBar from 'features/system/ProgressBar';
|
import ProgressBar from 'features/system/components/ProgressBar';
|
||||||
import SiteHeader from 'features/system/SiteHeader';
|
import SiteHeader from 'features/system/components/SiteHeader';
|
||||||
import Console from 'features/system/Console';
|
import Console from 'features/system/components/Console';
|
||||||
import { keepGUIAlive } from './utils';
|
import { keepGUIAlive } from './utils';
|
||||||
import InvokeTabs from 'features/tabs/InvokeTabs';
|
import InvokeTabs from 'features/tabs/components/InvokeTabs';
|
||||||
import ImageUploader from 'common/components/ImageUploader';
|
import ImageUploader from 'common/components/ImageUploader';
|
||||||
import { RootState, useAppSelector } from 'app/store';
|
import { RootState, useAppSelector } from 'app/store';
|
||||||
|
|
||||||
import FloatingGalleryButton from 'features/tabs/FloatingGalleryButton';
|
import FloatingGalleryButton from 'features/tabs/components/FloatingGalleryButton';
|
||||||
import FloatingOptionsPanelButtons from 'features/tabs/FloatingOptionsPanelButtons';
|
import FloatingOptionsPanelButtons from 'features/tabs/components/FloatingOptionsPanelButtons';
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { GalleryState } from 'features/gallery/gallerySlice';
|
import { GalleryState } from 'features/gallery/store/gallerySlice';
|
||||||
import { OptionsState } from 'features/options/optionsSlice';
|
import { OptionsState } from 'features/options/store/optionsSlice';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
import { SystemState } from 'features/system/systemSlice';
|
import { SystemState } from 'features/system/store/systemSlice';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { Model } from './invokeai';
|
import { Model } from './invokeai';
|
||||||
import useToastWatcher from 'features/system/hooks/useToastWatcher';
|
import useToastWatcher from 'features/system/hooks/useToastWatcher';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// TODO: use Enums?
|
// TODO: use Enums?
|
||||||
|
|
||||||
import { InProgressImageType } from 'features/system/systemSlice';
|
import { InProgressImageType } from 'features/system/store/systemSlice';
|
||||||
|
|
||||||
// Valid samplers
|
// Valid samplers
|
||||||
export const SAMPLERS: Array<string> = [
|
export const SAMPLERS: Array<string> = [
|
||||||
|
4
frontend/src/app/invokeai.d.ts
vendored
4
frontend/src/app/invokeai.d.ts
vendored
@ -12,8 +12,8 @@
|
|||||||
* 'gfpgan'.
|
* 'gfpgan'.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Category as GalleryCategory } from 'features/gallery/gallerySlice';
|
import { Category as GalleryCategory } from 'features/gallery/store/gallerySlice';
|
||||||
import { InvokeTabName } from 'features/tabs/InvokeTabs';
|
import { InvokeTabName } from 'features/tabs/components/InvokeTabs';
|
||||||
import { IRect } from 'konva/lib/types';
|
import { IRect } from 'konva/lib/types';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { RootState } from 'app/store';
|
import { RootState } from 'app/store';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
import { OptionsState } from 'features/options/optionsSlice';
|
import { OptionsState } from 'features/options/store/optionsSlice';
|
||||||
import { SystemState } from 'features/system/systemSlice';
|
import { SystemState } from 'features/system/store/systemSlice';
|
||||||
import { validateSeedWeights } from 'common/util/seedWeightPairs';
|
import { validateSeedWeights } from 'common/util/seedWeightPairs';
|
||||||
import { initialCanvasImageSelector } from 'features/canvas/store/canvasSelectors';
|
import { initialCanvasImageSelector } from 'features/canvas/store/canvasSelectors';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { createAction } from '@reduxjs/toolkit';
|
import { createAction } from '@reduxjs/toolkit';
|
||||||
import { GalleryCategory } from 'features/gallery/gallerySlice';
|
import { GalleryCategory } from 'features/gallery/store/gallerySlice';
|
||||||
import { InvokeTabName } from 'features/tabs/InvokeTabs';
|
import { InvokeTabName } from 'features/tabs/components/InvokeTabs';
|
||||||
import * as InvokeAI from 'app/invokeai';
|
import * as InvokeAI from 'app/invokeai';
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,16 +9,16 @@ import {
|
|||||||
GalleryCategory,
|
GalleryCategory,
|
||||||
GalleryState,
|
GalleryState,
|
||||||
removeImage,
|
removeImage,
|
||||||
} from 'features/gallery/gallerySlice';
|
} from 'features/gallery/store/gallerySlice';
|
||||||
import { OptionsState } from 'features/options/optionsSlice';
|
import { OptionsState } from 'features/options/store/optionsSlice';
|
||||||
import {
|
import {
|
||||||
addLogEntry,
|
addLogEntry,
|
||||||
generationRequested,
|
generationRequested,
|
||||||
modelChangeRequested,
|
modelChangeRequested,
|
||||||
setCurrentStatus,
|
setCurrentStatus,
|
||||||
setIsProcessing,
|
setIsProcessing,
|
||||||
} from 'features/system/systemSlice';
|
} from 'features/system/store/systemSlice';
|
||||||
import { InvokeTabName } from 'features/tabs/InvokeTabs';
|
import { InvokeTabName } from 'features/tabs/components/InvokeTabs';
|
||||||
import * as InvokeAI from 'app/invokeai';
|
import * as InvokeAI from 'app/invokeai';
|
||||||
import { RootState } from 'app/store';
|
import { RootState } from 'app/store';
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ import {
|
|||||||
errorOccurred,
|
errorOccurred,
|
||||||
setModelList,
|
setModelList,
|
||||||
setIsCancelable,
|
setIsCancelable,
|
||||||
} from 'features/system/systemSlice';
|
} from 'features/system/store/systemSlice';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
addGalleryImages,
|
addGalleryImages,
|
||||||
@ -24,20 +24,20 @@ import {
|
|||||||
GalleryState,
|
GalleryState,
|
||||||
removeImage,
|
removeImage,
|
||||||
setIntermediateImage,
|
setIntermediateImage,
|
||||||
} from 'features/gallery/gallerySlice';
|
} from 'features/gallery/store/gallerySlice';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
clearInitialImage,
|
clearInitialImage,
|
||||||
setInitialImage,
|
setInitialImage,
|
||||||
setMaskPath,
|
setMaskPath,
|
||||||
} from 'features/options/optionsSlice';
|
} from 'features/options/store/optionsSlice';
|
||||||
import {
|
import {
|
||||||
requestImages,
|
requestImages,
|
||||||
requestNewImages,
|
requestNewImages,
|
||||||
requestSystemConfig,
|
requestSystemConfig,
|
||||||
} from './actions';
|
} from './actions';
|
||||||
import { addImageToStagingArea } from 'features/canvas/store/canvasSlice';
|
import { addImageToStagingArea } from 'features/canvas/store/canvasSlice';
|
||||||
import { tabMap } from 'features/tabs/InvokeTabs';
|
import { tabMap } from 'features/tabs/components/InvokeTabs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an object containing listener callbacks for socketio events.
|
* Returns an object containing listener callbacks for socketio events.
|
||||||
|
@ -7,9 +7,9 @@ import storage from 'redux-persist/lib/storage'; // defaults to localStorage for
|
|||||||
|
|
||||||
import { getPersistConfig } from 'redux-deep-persist';
|
import { getPersistConfig } from 'redux-deep-persist';
|
||||||
|
|
||||||
import optionsReducer from 'features/options/optionsSlice';
|
import optionsReducer from 'features/options/store/optionsSlice';
|
||||||
import galleryReducer from 'features/gallery/gallerySlice';
|
import galleryReducer from 'features/gallery/store/gallerySlice';
|
||||||
import systemReducer from 'features/system/systemSlice';
|
import systemReducer from 'features/system/store/systemSlice';
|
||||||
import canvasReducer from 'features/canvas/store/canvasSlice';
|
import canvasReducer from 'features/canvas/store/canvasSlice';
|
||||||
|
|
||||||
import { socketioMiddleware } from './socketio/middleware';
|
import { socketioMiddleware } from './socketio/middleware';
|
||||||
|
@ -5,7 +5,7 @@ import {
|
|||||||
PopoverTrigger,
|
PopoverTrigger,
|
||||||
Box,
|
Box,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { SystemState } from 'features/system/systemSlice';
|
import { SystemState } from 'features/system/store/systemSlice';
|
||||||
import { useAppSelector } from 'app/store';
|
import { useAppSelector } from 'app/store';
|
||||||
import { RootState } from 'app/store';
|
import { RootState } from 'app/store';
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
|
@ -11,10 +11,10 @@ import { useToast } from '@chakra-ui/react';
|
|||||||
// import { uploadImage } from 'app/socketio/actions';
|
// import { uploadImage } from 'app/socketio/actions';
|
||||||
import { UploadImagePayload } from 'app/invokeai';
|
import { UploadImagePayload } from 'app/invokeai';
|
||||||
import { ImageUploaderTriggerContext } from 'app/contexts/ImageUploaderTriggerContext';
|
import { ImageUploaderTriggerContext } from 'app/contexts/ImageUploaderTriggerContext';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
import { tabDict } from 'features/tabs/InvokeTabs';
|
import { tabDict } from 'features/tabs/components/InvokeTabs';
|
||||||
import ImageUploadOverlay from './ImageUploadOverlay';
|
import ImageUploadOverlay from './ImageUploadOverlay';
|
||||||
import { uploadImage } from 'features/gallery/util/uploadImage';
|
import { uploadImage } from 'features/gallery/store/thunks/uploadImage';
|
||||||
|
|
||||||
type ImageUploaderProps = {
|
type ImageUploaderProps = {
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { NUMPY_RAND_MAX, NUMPY_RAND_MIN } from 'app/constants';
|
import { NUMPY_RAND_MAX, NUMPY_RAND_MIN } from 'app/constants';
|
||||||
import { OptionsState } from 'features/options/optionsSlice';
|
import { OptionsState } from 'features/options/store/optionsSlice';
|
||||||
import { SystemState } from 'features/system/systemSlice';
|
import { SystemState } from 'features/system/store/systemSlice';
|
||||||
|
|
||||||
import { stringToSeedWeightsArray } from './seedWeightPairs';
|
import { stringToSeedWeightsArray } from './seedWeightPairs';
|
||||||
import randomInt from './randomInt';
|
import randomInt from './randomInt';
|
||||||
import { InvokeTabName } from 'features/tabs/InvokeTabs';
|
import { InvokeTabName } from 'features/tabs/components/InvokeTabs';
|
||||||
import {
|
import {
|
||||||
CanvasState,
|
CanvasState,
|
||||||
isCanvasMaskLine,
|
isCanvasMaskLine,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { RootState, useAppSelector } from 'app/store';
|
import { RootState, useAppSelector } from 'app/store';
|
||||||
import { GalleryState } from 'features/gallery/gallerySlice';
|
import { GalleryState } from 'features/gallery/store/gallerySlice';
|
||||||
import { ImageConfig } from 'konva/lib/shapes/Image';
|
import { ImageConfig } from 'konva/lib/shapes/Image';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Spinner } from '@chakra-ui/react';
|
import { Spinner } from '@chakra-ui/react';
|
||||||
import { useLayoutEffect, useRef } from 'react';
|
import { useLayoutEffect, useRef } from 'react';
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store';
|
import { useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
import {
|
import {
|
||||||
resizeAndScaleCanvas,
|
resizeAndScaleCanvas,
|
||||||
resizeCanvas,
|
resizeCanvas,
|
||||||
|
@ -3,7 +3,7 @@ import { useHotkeys } from 'react-hotkeys-hook';
|
|||||||
import { FaRedo } from 'react-icons/fa';
|
import { FaRedo } from 'react-icons/fa';
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store';
|
import { useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import IAIIconButton from 'common/components/IAIIconButton';
|
import IAIIconButton from 'common/components/IAIIconButton';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
|
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
|
||||||
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
@ -32,7 +32,7 @@ import {
|
|||||||
} from 'features/canvas/store/canvasSelectors';
|
} from 'features/canvas/store/canvasSelectors';
|
||||||
import { useHotkeys } from 'react-hotkeys-hook';
|
import { useHotkeys } from 'react-hotkeys-hook';
|
||||||
import { getCanvasBaseLayer } from 'features/canvas/util/konvaInstanceProvider';
|
import { getCanvasBaseLayer } from 'features/canvas/util/konvaInstanceProvider';
|
||||||
import { systemSelector } from 'features/system/systemSelectors';
|
import { systemSelector } from 'features/system/store/systemSelectors';
|
||||||
|
|
||||||
export const selector = createSelector(
|
export const selector = createSelector(
|
||||||
[canvasSelector, isStagingSelector, systemSelector],
|
[canvasSelector, isStagingSelector, systemSelector],
|
||||||
|
@ -6,7 +6,7 @@ import IAIIconButton from 'common/components/IAIIconButton';
|
|||||||
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
|
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
|
||||||
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
import { undo } from 'features/canvas/store/canvasSlice';
|
import { undo } from 'features/canvas/store/canvasSlice';
|
||||||
|
|
||||||
const canvasUndoSelector = createSelector(
|
const canvasUndoSelector = createSelector(
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { useHotkeys } from 'react-hotkeys-hook';
|
import { useHotkeys } from 'react-hotkeys-hook';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
import {
|
import {
|
||||||
setShouldShowBoundingBox,
|
setShouldShowBoundingBox,
|
||||||
setTool,
|
setTool,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store';
|
import { useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
import Konva from 'konva';
|
import Konva from 'konva';
|
||||||
import { KonvaEventObject } from 'konva/lib/Node';
|
import { KonvaEventObject } from 'konva/lib/Node';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store';
|
import { useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
import Konva from 'konva';
|
import Konva from 'konva';
|
||||||
import { KonvaEventObject } from 'konva/lib/Node';
|
import { KonvaEventObject } from 'konva/lib/Node';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store';
|
import { useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
import Konva from 'konva';
|
import Konva from 'konva';
|
||||||
import { Vector2d } from 'konva/lib/types';
|
import { Vector2d } from 'konva/lib/types';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store';
|
import { useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
import Konva from 'konva';
|
import Konva from 'konva';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { MutableRefObject, useCallback } from 'react';
|
import { MutableRefObject, useCallback } from 'react';
|
||||||
|
@ -6,8 +6,8 @@ import layerToDataURL from '../../util/layerToDataURL';
|
|||||||
import downloadFile from '../../util/downloadFile';
|
import downloadFile from '../../util/downloadFile';
|
||||||
import copyImage from '../../util/copyImage';
|
import copyImage from '../../util/copyImage';
|
||||||
import { getCanvasBaseLayer } from '../../util/konvaInstanceProvider';
|
import { getCanvasBaseLayer } from '../../util/konvaInstanceProvider';
|
||||||
import { addToast } from 'features/system/systemSlice';
|
import { addToast } from 'features/system/store/systemSlice';
|
||||||
import { addImage } from 'features/gallery/gallerySlice';
|
import { addImage } from 'features/gallery/store/gallerySlice';
|
||||||
import { setMergedCanvas } from '../canvasSlice';
|
import { setMergedCanvas } from '../canvasSlice';
|
||||||
|
|
||||||
type MergeAndUploadCanvasConfig = {
|
type MergeAndUploadCanvasConfig = {
|
||||||
|
@ -12,14 +12,14 @@ import {
|
|||||||
setPrompt,
|
setPrompt,
|
||||||
setSeed,
|
setSeed,
|
||||||
setShouldShowImageDetails,
|
setShouldShowImageDetails,
|
||||||
} from 'features/options/optionsSlice';
|
} from 'features/options/store/optionsSlice';
|
||||||
import DeleteImageModal from './DeleteImageModal';
|
import DeleteImageModal from './DeleteImageModal';
|
||||||
import { SystemState } from 'features/system/systemSlice';
|
import { SystemState } from 'features/system/store/systemSlice';
|
||||||
import IAIButton from 'common/components/IAIButton';
|
import IAIButton from 'common/components/IAIButton';
|
||||||
import { runESRGAN, runFacetool } from 'app/socketio/actions';
|
import { runESRGAN, runFacetool } from 'app/socketio/actions';
|
||||||
import IAIIconButton from 'common/components/IAIIconButton';
|
import IAIIconButton from 'common/components/IAIIconButton';
|
||||||
import UpscaleOptions from 'features/options/AdvancedOptions/Upscale/UpscaleOptions';
|
import UpscaleOptions from 'features/options/components/AdvancedOptions/Upscale/UpscaleOptions';
|
||||||
import FaceRestoreOptions from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions';
|
import FaceRestoreOptions from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreOptions';
|
||||||
import { useHotkeys } from 'react-hotkeys-hook';
|
import { useHotkeys } from 'react-hotkeys-hook';
|
||||||
import { ButtonGroup, Link, useToast } from '@chakra-ui/react';
|
import { ButtonGroup, Link, useToast } from '@chakra-ui/react';
|
||||||
import {
|
import {
|
||||||
@ -39,8 +39,8 @@ import {
|
|||||||
setDoesCanvasNeedScaling,
|
setDoesCanvasNeedScaling,
|
||||||
setInitialCanvasImage,
|
setInitialCanvasImage,
|
||||||
} from 'features/canvas/store/canvasSlice';
|
} from 'features/canvas/store/canvasSlice';
|
||||||
import { GalleryState } from './gallerySlice';
|
import { GalleryState } from 'features/gallery/store/gallerySlice';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
import IAIPopover from 'common/components/IAIPopover';
|
import IAIPopover from 'common/components/IAIPopover';
|
||||||
|
|
||||||
const systemSelector = createSelector(
|
const systemSelector = createSelector(
|
@ -1,4 +1,4 @@
|
|||||||
@use '../../styles/Mixins/' as *;
|
@use '../../../styles/Mixins/' as *;
|
||||||
|
|
||||||
.current-image-area {
|
.current-image-area {
|
||||||
display: flex;
|
display: flex;
|
@ -2,11 +2,11 @@ import { RootState, useAppSelector } from 'app/store';
|
|||||||
import CurrentImageButtons from './CurrentImageButtons';
|
import CurrentImageButtons from './CurrentImageButtons';
|
||||||
import { MdPhoto } from 'react-icons/md';
|
import { MdPhoto } from 'react-icons/md';
|
||||||
import CurrentImagePreview from './CurrentImagePreview';
|
import CurrentImagePreview from './CurrentImagePreview';
|
||||||
import { GalleryState } from './gallerySlice';
|
import { GalleryState } from 'features/gallery/store/gallerySlice';
|
||||||
import { OptionsState } from 'features/options/optionsSlice';
|
import { OptionsState } from 'features/options/store/optionsSlice';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
|
|
||||||
export const currentImageDisplaySelector = createSelector(
|
export const currentImageDisplaySelector = createSelector(
|
||||||
[
|
[
|
@ -7,10 +7,10 @@ import {
|
|||||||
GalleryState,
|
GalleryState,
|
||||||
selectNextImage,
|
selectNextImage,
|
||||||
selectPrevImage,
|
selectPrevImage,
|
||||||
} from './gallerySlice';
|
} from 'features/gallery/store/gallerySlice';
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { OptionsState, setIsLightBoxOpen } from 'features/options/optionsSlice';
|
import { OptionsState, setIsLightBoxOpen } from 'features/options/store/optionsSlice';
|
||||||
import ImageMetadataViewer from './ImageMetaDataViewer/ImageMetadataViewer';
|
import ImageMetadataViewer from './ImageMetaDataViewer/ImageMetadataViewer';
|
||||||
|
|
||||||
export const imagesSelector = createSelector(
|
export const imagesSelector = createSelector(
|
@ -25,7 +25,7 @@ import {
|
|||||||
import { useAppDispatch, useAppSelector } from 'app/store';
|
import { useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import { deleteImage } from 'app/socketio/actions';
|
import { deleteImage } from 'app/socketio/actions';
|
||||||
import { RootState } from 'app/store';
|
import { RootState } from 'app/store';
|
||||||
import { setShouldConfirmOnDelete, SystemState } from 'features/system/systemSlice';
|
import { setShouldConfirmOnDelete, SystemState } from 'features/system/store/systemSlice';
|
||||||
import * as InvokeAI from 'app/invokeai';
|
import * as InvokeAI from 'app/invokeai';
|
||||||
import { useHotkeys } from 'react-hotkeys-hook';
|
import { useHotkeys } from 'react-hotkeys-hook';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
@ -7,7 +7,7 @@ import {
|
|||||||
useToast,
|
useToast,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store';
|
import { useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import { setCurrentImage } from './gallerySlice';
|
import { setCurrentImage } from 'features/gallery/store/gallerySlice';
|
||||||
import { FaCheck, FaTrashAlt } from 'react-icons/fa';
|
import { FaCheck, FaTrashAlt } from 'react-icons/fa';
|
||||||
import DeleteImageModal from './DeleteImageModal';
|
import DeleteImageModal from './DeleteImageModal';
|
||||||
import { memo, useState } from 'react';
|
import { memo, useState } from 'react';
|
||||||
@ -19,7 +19,7 @@ import {
|
|||||||
setIsLightBoxOpen,
|
setIsLightBoxOpen,
|
||||||
setPrompt,
|
setPrompt,
|
||||||
setSeed,
|
setSeed,
|
||||||
} from 'features/options/optionsSlice';
|
} from 'features/options/store/optionsSlice';
|
||||||
import * as InvokeAI from 'app/invokeai';
|
import * as InvokeAI from 'app/invokeai';
|
||||||
import * as ContextMenu from '@radix-ui/react-context-menu';
|
import * as ContextMenu from '@radix-ui/react-context-menu';
|
||||||
import {
|
import {
|
||||||
@ -28,7 +28,7 @@ import {
|
|||||||
setDoesCanvasNeedScaling,
|
setDoesCanvasNeedScaling,
|
||||||
setInitialCanvasImage,
|
setInitialCanvasImage,
|
||||||
} from 'features/canvas/store/canvasSlice';
|
} from 'features/canvas/store/canvasSlice';
|
||||||
import { hoverableImageSelector } from './gallerySliceSelectors';
|
import { hoverableImageSelector } from 'features/gallery/store/gallerySliceSelectors';
|
||||||
import { getCanvasBaseLayer } from 'features/canvas/util/konvaInstanceProvider';
|
import { getCanvasBaseLayer } from 'features/canvas/util/konvaInstanceProvider';
|
||||||
|
|
||||||
interface HoverableImageProps {
|
interface HoverableImageProps {
|
@ -1,4 +1,4 @@
|
|||||||
@use '../../styles/Mixins/' as *;
|
@use '../../../styles/Mixins/' as *;
|
||||||
|
|
||||||
.image-gallery-wrapper-enter {
|
.image-gallery-wrapper-enter {
|
||||||
transform: translateX(150%);
|
transform: translateX(150%);
|
@ -25,13 +25,13 @@ import {
|
|||||||
setShouldAutoSwitchToNewImages,
|
setShouldAutoSwitchToNewImages,
|
||||||
setShouldHoldGalleryOpen,
|
setShouldHoldGalleryOpen,
|
||||||
setShouldPinGallery,
|
setShouldPinGallery,
|
||||||
} from './gallerySlice';
|
} from 'features/gallery/store/gallerySlice';
|
||||||
import HoverableImage from './HoverableImage';
|
import HoverableImage from './HoverableImage';
|
||||||
import { setShouldShowGallery } from 'features/gallery/gallerySlice';
|
import { setShouldShowGallery } from 'features/gallery/store/gallerySlice';
|
||||||
import { ButtonGroup, useToast } from '@chakra-ui/react';
|
import { ButtonGroup, useToast } from '@chakra-ui/react';
|
||||||
import { CSSTransition } from 'react-transition-group';
|
import { CSSTransition } from 'react-transition-group';
|
||||||
import { Direction } from 're-resizable/lib/resizer';
|
import { Direction } from 're-resizable/lib/resizer';
|
||||||
import { imageGallerySelector } from './gallerySliceSelectors';
|
import { imageGallerySelector } from 'features/gallery/store/gallerySliceSelectors';
|
||||||
import { FaImage, FaUser, FaWrench } from 'react-icons/fa';
|
import { FaImage, FaUser, FaWrench } from 'react-icons/fa';
|
||||||
import IAIPopover from 'common/components/IAIPopover';
|
import IAIPopover from 'common/components/IAIPopover';
|
||||||
import IAISlider from 'common/components/IAISlider';
|
import IAISlider from 'common/components/IAISlider';
|
@ -1,4 +1,4 @@
|
|||||||
@use '../../../styles/Mixins/' as *;
|
@use '../../../../styles/Mixins/' as *;
|
||||||
|
|
||||||
.image-metadata-viewer {
|
.image-metadata-viewer {
|
||||||
position: absolute;
|
position: absolute;
|
@ -33,7 +33,7 @@ import {
|
|||||||
setWidth,
|
setWidth,
|
||||||
setInitialImage,
|
setInitialImage,
|
||||||
setShouldShowImageDetails,
|
setShouldShowImageDetails,
|
||||||
} from 'features/options/optionsSlice';
|
} from 'features/options/store/optionsSlice';
|
||||||
import promptToString from 'common/util/promptToString';
|
import promptToString from 'common/util/promptToString';
|
||||||
import { seedWeightsToString } from 'common/util/seedWeightPairs';
|
import { seedWeightsToString } from 'common/util/seedWeightPairs';
|
||||||
import { FaCopy } from 'react-icons/fa';
|
import { FaCopy } from 'react-icons/fa';
|
@ -3,7 +3,7 @@ import type { PayloadAction } from '@reduxjs/toolkit';
|
|||||||
import _, { clamp } from 'lodash';
|
import _, { clamp } from 'lodash';
|
||||||
import * as InvokeAI from 'app/invokeai';
|
import * as InvokeAI from 'app/invokeai';
|
||||||
import { IRect } from 'konva/lib/types';
|
import { IRect } from 'konva/lib/types';
|
||||||
import { InvokeTabName } from 'features/tabs/InvokeTabs';
|
import { InvokeTabName } from 'features/tabs/components/InvokeTabs';
|
||||||
|
|
||||||
export type GalleryCategory = 'user' | 'result';
|
export type GalleryCategory = 'user' | 'result';
|
||||||
|
|
@ -1,8 +1,8 @@
|
|||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { RootState } from 'app/store';
|
import { RootState } from 'app/store';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
import { OptionsState } from 'features/options/optionsSlice';
|
import { OptionsState } from 'features/options/store/optionsSlice';
|
||||||
import { SystemState } from 'features/system/systemSlice';
|
import { SystemState } from 'features/system/store/systemSlice';
|
||||||
import { GalleryState } from './gallerySlice';
|
import { GalleryState } from './gallerySlice';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
@ -2,9 +2,9 @@ import { AnyAction, ThunkAction } from '@reduxjs/toolkit';
|
|||||||
import { RootState } from 'app/store';
|
import { RootState } from 'app/store';
|
||||||
import * as InvokeAI from 'app/invokeai';
|
import * as InvokeAI from 'app/invokeai';
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
import { setInitialCanvasImage } from 'features/canvas/store/canvasSlice';
|
import { setInitialCanvasImage } from 'features/canvas/store/canvasSlice';
|
||||||
import { setInitialImage } from 'features/options/optionsSlice';
|
import { setInitialImage } from 'features/options/store/optionsSlice';
|
||||||
import { addImage } from '../gallerySlice';
|
import { addImage } from '../gallerySlice';
|
||||||
|
|
||||||
type UploadImageConfig = {
|
type UploadImageConfig = {
|
@ -1,4 +1,4 @@
|
|||||||
@use '../../styles/Mixins/' as *;
|
@use '../../../styles/Mixins/' as *;
|
||||||
|
|
||||||
.lightbox-container {
|
.lightbox-container {
|
||||||
width: 100%;
|
width: 100%;
|
@ -1,15 +1,15 @@
|
|||||||
import { IconButton } from '@chakra-ui/react';
|
import { IconButton } from '@chakra-ui/react';
|
||||||
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import IAIIconButton from 'common/components/IAIIconButton';
|
import IAIIconButton from 'common/components/IAIIconButton';
|
||||||
import CurrentImageButtons from 'features/gallery/CurrentImageButtons';
|
import CurrentImageButtons from 'features/gallery/components/CurrentImageButtons';
|
||||||
import { imagesSelector } from 'features/gallery/CurrentImagePreview';
|
import { imagesSelector } from 'features/gallery/components/CurrentImagePreview';
|
||||||
import {
|
import {
|
||||||
selectNextImage,
|
selectNextImage,
|
||||||
selectPrevImage,
|
selectPrevImage,
|
||||||
} from 'features/gallery/gallerySlice';
|
} from 'features/gallery/store/gallerySlice';
|
||||||
import ImageGallery from 'features/gallery/ImageGallery';
|
import ImageGallery from 'features/gallery/components/ImageGallery';
|
||||||
import ImageMetadataViewer from 'features/gallery/ImageMetaDataViewer/ImageMetadataViewer';
|
import ImageMetadataViewer from 'features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer';
|
||||||
import { setIsLightBoxOpen } from 'features/options/optionsSlice';
|
import { setIsLightBoxOpen } from 'features/options/store/optionsSlice';
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { useHotkeys } from 'react-hotkeys-hook';
|
import { useHotkeys } from 'react-hotkeys-hook';
|
||||||
import { BiExit } from 'react-icons/bi';
|
import { BiExit } from 'react-icons/bi';
|
@ -1,4 +1,4 @@
|
|||||||
@use '../../../styles/Mixins/' as *;
|
@use '../../../../styles/Mixins/' as *;
|
||||||
|
|
||||||
.advanced-settings {
|
.advanced-settings {
|
||||||
display: grid;
|
display: grid;
|
@ -6,7 +6,7 @@ import {
|
|||||||
useAppSelector,
|
useAppSelector,
|
||||||
} from 'app/store';
|
} from 'app/store';
|
||||||
import IAISwitch from 'common/components/IAISwitch';
|
import IAISwitch from 'common/components/IAISwitch';
|
||||||
import { setShouldRunFacetool } from 'features/options/optionsSlice';
|
import { setShouldRunFacetool } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
export default function FaceRestoreHeader() {
|
export default function FaceRestoreHeader() {
|
||||||
const isGFPGANAvailable = useAppSelector(
|
const isGFPGANAvailable = useAppSelector(
|
@ -9,11 +9,11 @@ import {
|
|||||||
setCodeformerFidelity,
|
setCodeformerFidelity,
|
||||||
setFacetoolStrength,
|
setFacetoolStrength,
|
||||||
setFacetoolType,
|
setFacetoolType,
|
||||||
} from 'features/options/optionsSlice';
|
} from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { isEqual } from 'lodash';
|
import { isEqual } from 'lodash';
|
||||||
import { SystemState } from 'features/system/systemSlice';
|
import { SystemState } from 'features/system/store/systemSlice';
|
||||||
import IAINumberInput from 'common/components/IAINumberInput';
|
import IAINumberInput from 'common/components/IAINumberInput';
|
||||||
import IAISelect from 'common/components/IAISelect';
|
import IAISelect from 'common/components/IAISelect';
|
||||||
import { FACETOOL_TYPES } from 'app/constants';
|
import { FACETOOL_TYPES } from 'app/constants';
|
@ -5,7 +5,7 @@ import {
|
|||||||
useAppSelector,
|
useAppSelector,
|
||||||
} from 'app/store';
|
} from 'app/store';
|
||||||
import IAISwitch from 'common/components/IAISwitch';
|
import IAISwitch from 'common/components/IAISwitch';
|
||||||
import { setShouldFitToWidthHeight } from 'features/options/optionsSlice';
|
import { setShouldFitToWidthHeight } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
export default function ImageFit() {
|
export default function ImageFit() {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import IAISlider from 'common/components/IAISlider';
|
import IAISlider from 'common/components/IAISlider';
|
||||||
import { setImg2imgStrength } from 'features/options/optionsSlice';
|
import { setImg2imgStrength } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
interface ImageToImageStrengthProps {
|
interface ImageToImageStrengthProps {
|
||||||
label?: string;
|
label?: string;
|
@ -1,9 +1,9 @@
|
|||||||
import React, { ChangeEvent } from 'react';
|
import React, { ChangeEvent } from 'react';
|
||||||
import { useAppDispatch, useAppSelector } from '../../../../app/store';
|
import { useAppDispatch, useAppSelector } from '../../../../../app/store';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import IAISwitch from '../../../../common/components/IAISwitch';
|
import IAISwitch from '../../../../../common/components/IAISwitch';
|
||||||
import IAISlider from '../../../../common/components/IAISlider';
|
import IAISlider from '../../../../../common/components/IAISlider';
|
||||||
import { Flex } from '@chakra-ui/react';
|
import { Flex } from '@chakra-ui/react';
|
||||||
import {
|
import {
|
||||||
setInpaintReplace,
|
setInpaintReplace,
|
@ -6,7 +6,7 @@ import {
|
|||||||
useAppSelector,
|
useAppSelector,
|
||||||
} from 'app/store';
|
} from 'app/store';
|
||||||
import IAISwitch from 'common/components/IAISwitch';
|
import IAISwitch from 'common/components/IAISwitch';
|
||||||
import { setHiresFix } from 'features/options/optionsSlice';
|
import { setHiresFix } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hires Fix Toggle
|
* Hires Fix Toggle
|
@ -6,7 +6,7 @@ import {
|
|||||||
useAppSelector,
|
useAppSelector,
|
||||||
} from 'app/store';
|
} from 'app/store';
|
||||||
import IAISwitch from 'common/components/IAISwitch';
|
import IAISwitch from 'common/components/IAISwitch';
|
||||||
import { setSeamless } from 'features/options/optionsSlice';
|
import { setSeamless } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Seamless tiling toggle
|
* Seamless tiling toggle
|
@ -5,7 +5,7 @@ import {
|
|||||||
useAppSelector,
|
useAppSelector,
|
||||||
} from 'app/store';
|
} from 'app/store';
|
||||||
import IAINumberInput from 'common/components/IAINumberInput';
|
import IAINumberInput from 'common/components/IAINumberInput';
|
||||||
import { setPerlin } from 'features/options/optionsSlice';
|
import { setPerlin } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
export default function Perlin() {
|
export default function Perlin() {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
@ -6,7 +6,7 @@ import {
|
|||||||
useAppSelector,
|
useAppSelector,
|
||||||
} from 'app/store';
|
} from 'app/store';
|
||||||
import IAISwitch from 'common/components/IAISwitch';
|
import IAISwitch from 'common/components/IAISwitch';
|
||||||
import { setShouldRandomizeSeed } from 'features/options/optionsSlice';
|
import { setShouldRandomizeSeed } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
export default function RandomizeSeed() {
|
export default function RandomizeSeed() {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
@ -6,7 +6,7 @@ import {
|
|||||||
useAppSelector,
|
useAppSelector,
|
||||||
} from 'app/store';
|
} from 'app/store';
|
||||||
import IAINumberInput from 'common/components/IAINumberInput';
|
import IAINumberInput from 'common/components/IAINumberInput';
|
||||||
import { setSeed } from 'features/options/optionsSlice';
|
import { setSeed } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
export default function Seed() {
|
export default function Seed() {
|
||||||
const seed = useAppSelector((state: RootState) => state.options.seed);
|
const seed = useAppSelector((state: RootState) => state.options.seed);
|
@ -3,7 +3,7 @@ import React from 'react';
|
|||||||
import { NUMPY_RAND_MAX, NUMPY_RAND_MIN } from 'app/constants';
|
import { NUMPY_RAND_MAX, NUMPY_RAND_MIN } from 'app/constants';
|
||||||
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import randomInt from 'common/util/randomInt';
|
import randomInt from 'common/util/randomInt';
|
||||||
import { setSeed } from 'features/options/optionsSlice';
|
import { setSeed } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
export default function ShuffleSeed() {
|
export default function ShuffleSeed() {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
@ -5,7 +5,7 @@ import {
|
|||||||
useAppSelector,
|
useAppSelector,
|
||||||
} from 'app/store';
|
} from 'app/store';
|
||||||
import IAINumberInput from 'common/components/IAINumberInput';
|
import IAINumberInput from 'common/components/IAINumberInput';
|
||||||
import { setThreshold } from 'features/options/optionsSlice';
|
import { setThreshold } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
export default function Threshold() {
|
export default function Threshold() {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
@ -6,7 +6,7 @@ import {
|
|||||||
useAppSelector,
|
useAppSelector,
|
||||||
} from 'app/store';
|
} from 'app/store';
|
||||||
import IAISwitch from 'common/components/IAISwitch';
|
import IAISwitch from 'common/components/IAISwitch';
|
||||||
import { setShouldRunESRGAN } from 'features/options/optionsSlice';
|
import { setShouldRunESRGAN } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
export default function UpscaleHeader() {
|
export default function UpscaleHeader() {
|
||||||
const isESRGANAvailable = useAppSelector(
|
const isESRGANAvailable = useAppSelector(
|
@ -6,12 +6,12 @@ import {
|
|||||||
setUpscalingStrength,
|
setUpscalingStrength,
|
||||||
UpscalingLevel,
|
UpscalingLevel,
|
||||||
OptionsState,
|
OptionsState,
|
||||||
} from 'features/options/optionsSlice';
|
} from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
import { UPSCALING_LEVELS } from 'app/constants';
|
import { UPSCALING_LEVELS } from 'app/constants';
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { isEqual } from 'lodash';
|
import { isEqual } from 'lodash';
|
||||||
import { SystemState } from 'features/system/systemSlice';
|
import { SystemState } from 'features/system/store/systemSlice';
|
||||||
import { ChangeEvent } from 'react';
|
import { ChangeEvent } from 'react';
|
||||||
import IAINumberInput from 'common/components/IAINumberInput';
|
import IAINumberInput from 'common/components/IAINumberInput';
|
||||||
import IAISelect from 'common/components/IAISelect';
|
import IAISelect from 'common/components/IAISelect';
|
@ -5,7 +5,7 @@ import {
|
|||||||
useAppSelector,
|
useAppSelector,
|
||||||
} from 'app/store';
|
} from 'app/store';
|
||||||
import IAISwitch from 'common/components/IAISwitch';
|
import IAISwitch from 'common/components/IAISwitch';
|
||||||
import { setShouldGenerateVariations } from 'features/options/optionsSlice';
|
import { setShouldGenerateVariations } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
export default function GenerateVariations() {
|
export default function GenerateVariations() {
|
||||||
const shouldGenerateVariations = useAppSelector(
|
const shouldGenerateVariations = useAppSelector(
|
@ -6,7 +6,7 @@ import {
|
|||||||
} from 'app/store';
|
} from 'app/store';
|
||||||
import IAIInput from 'common/components/IAIInput';
|
import IAIInput from 'common/components/IAIInput';
|
||||||
import { validateSeedWeights } from 'common/util/seedWeightPairs';
|
import { validateSeedWeights } from 'common/util/seedWeightPairs';
|
||||||
import { setSeedWeights } from 'features/options/optionsSlice';
|
import { setSeedWeights } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
export default function SeedWeights() {
|
export default function SeedWeights() {
|
||||||
const seedWeights = useAppSelector(
|
const seedWeights = useAppSelector(
|
@ -5,7 +5,7 @@ import {
|
|||||||
useAppSelector,
|
useAppSelector,
|
||||||
} from 'app/store';
|
} from 'app/store';
|
||||||
import IAINumberInput from 'common/components/IAINumberInput';
|
import IAINumberInput from 'common/components/IAINumberInput';
|
||||||
import { setVariationAmount } from 'features/options/optionsSlice';
|
import { setVariationAmount } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
export default function VariationAmount() {
|
export default function VariationAmount() {
|
||||||
const variationAmount = useAppSelector(
|
const variationAmount = useAppSelector(
|
@ -1,7 +1,7 @@
|
|||||||
import React, { ChangeEvent } from 'react';
|
import React, { ChangeEvent } from 'react';
|
||||||
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import IAICheckbox from 'common/components/IAICheckbox';
|
import IAICheckbox from 'common/components/IAICheckbox';
|
||||||
import { setShowAdvancedOptions } from 'features/options/optionsSlice';
|
import { setShowAdvancedOptions } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
export default function MainAdvancedOptionsCheckbox() {
|
export default function MainAdvancedOptionsCheckbox() {
|
||||||
const showAdvancedOptions = useAppSelector(
|
const showAdvancedOptions = useAppSelector(
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import IAINumberInput from 'common/components/IAINumberInput';
|
import IAINumberInput from 'common/components/IAINumberInput';
|
||||||
import { setCfgScale } from 'features/options/optionsSlice';
|
import { setCfgScale } from 'features/options/store/optionsSlice';
|
||||||
import { inputWidth } from './MainOptions';
|
import { inputWidth } from './MainOptions';
|
||||||
|
|
||||||
export default function MainCFGScale() {
|
export default function MainCFGScale() {
|
@ -2,8 +2,8 @@ import React, { ChangeEvent } from 'react';
|
|||||||
import { HEIGHTS } from 'app/constants';
|
import { HEIGHTS } from 'app/constants';
|
||||||
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import IAISelect from 'common/components/IAISelect';
|
import IAISelect from 'common/components/IAISelect';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
import { setHeight } from 'features/options/optionsSlice';
|
import { setHeight } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
export default function MainHeight() {
|
export default function MainHeight() {
|
||||||
const height = useAppSelector((state: RootState) => state.options.height);
|
const height = useAppSelector((state: RootState) => state.options.height);
|
@ -3,8 +3,8 @@ import _ from 'lodash';
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import IAINumberInput from 'common/components/IAINumberInput';
|
import IAINumberInput from 'common/components/IAINumberInput';
|
||||||
import { mayGenerateMultipleImagesSelector } from 'features/options/optionsSelectors';
|
import { mayGenerateMultipleImagesSelector } from 'features/options/store/optionsSelectors';
|
||||||
import { OptionsState, setIterations } from 'features/options/optionsSlice';
|
import { OptionsState, setIterations } from 'features/options/store/optionsSlice';
|
||||||
import { inputWidth } from './MainOptions';
|
import { inputWidth } from './MainOptions';
|
||||||
|
|
||||||
const mainIterationsSelector = createSelector(
|
const mainIterationsSelector = createSelector(
|
@ -1,4 +1,4 @@
|
|||||||
@use '../../../styles/Mixins/' as *;
|
@use '../../../../styles/Mixins/' as *;
|
||||||
|
|
||||||
.main-options {
|
.main-options {
|
||||||
display: grid;
|
display: grid;
|
@ -2,7 +2,7 @@ import React, { ChangeEvent } from 'react';
|
|||||||
import { SAMPLERS } from 'app/constants';
|
import { SAMPLERS } from 'app/constants';
|
||||||
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import IAISelect from 'common/components/IAISelect';
|
import IAISelect from 'common/components/IAISelect';
|
||||||
import { setSampler } from 'features/options/optionsSlice';
|
import { setSampler } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
export default function MainSampler() {
|
export default function MainSampler() {
|
||||||
const sampler = useAppSelector((state: RootState) => state.options.sampler);
|
const sampler = useAppSelector((state: RootState) => state.options.sampler);
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import IAINumberInput from 'common/components/IAINumberInput';
|
import IAINumberInput from 'common/components/IAINumberInput';
|
||||||
import { setSteps } from 'features/options/optionsSlice';
|
import { setSteps } from 'features/options/store/optionsSlice';
|
||||||
import { inputWidth } from './MainOptions';
|
import { inputWidth } from './MainOptions';
|
||||||
|
|
||||||
export default function MainSteps() {
|
export default function MainSteps() {
|
@ -2,8 +2,8 @@ import React, { ChangeEvent } from 'react';
|
|||||||
import { WIDTHS } from 'app/constants';
|
import { WIDTHS } from 'app/constants';
|
||||||
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import IAISelect from 'common/components/IAISelect';
|
import IAISelect from 'common/components/IAISelect';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
import { setWidth } from 'features/options/optionsSlice';
|
import { setWidth } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
export default function MainWidth() {
|
export default function MainWidth() {
|
||||||
const width = useAppSelector((state: RootState) => state.options.width);
|
const width = useAppSelector((state: RootState) => state.options.width);
|
@ -1,6 +1,6 @@
|
|||||||
import { Accordion, ExpandedIndex } from '@chakra-ui/react';
|
import { Accordion, ExpandedIndex } from '@chakra-ui/react';
|
||||||
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import { setOpenAccordions } from 'features/system/systemSlice';
|
import { setOpenAccordions } from 'features/system/store/systemSlice';
|
||||||
import InvokeAccordionItem, {
|
import InvokeAccordionItem, {
|
||||||
InvokeAccordionItemProps,
|
InvokeAccordionItemProps,
|
||||||
} from './AccordionItems/InvokeAccordionItem';
|
} from './AccordionItems/InvokeAccordionItem';
|
@ -6,7 +6,7 @@ import IAIIconButton, {
|
|||||||
} from 'common/components/IAIIconButton';
|
} from 'common/components/IAIIconButton';
|
||||||
import { useHotkeys } from 'react-hotkeys-hook';
|
import { useHotkeys } from 'react-hotkeys-hook';
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { SystemState } from 'features/system/systemSlice';
|
import { SystemState } from 'features/system/store/systemSlice';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
const cancelButtonSelector = createSelector(
|
const cancelButtonSelector = createSelector(
|
@ -9,7 +9,7 @@ import IAIIconButton, {
|
|||||||
IAIIconButtonProps,
|
IAIIconButtonProps,
|
||||||
} from 'common/components/IAIIconButton';
|
} from 'common/components/IAIIconButton';
|
||||||
import IAIPopover from 'common/components/IAIPopover';
|
import IAIPopover from 'common/components/IAIPopover';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
|
|
||||||
interface InvokeButton
|
interface InvokeButton
|
||||||
extends Omit<IAIButtonProps | IAIIconButtonProps, 'aria-label'> {
|
extends Omit<IAIButtonProps | IAIIconButtonProps, 'aria-label'> {
|
@ -2,7 +2,7 @@ import { createSelector } from '@reduxjs/toolkit';
|
|||||||
import { FaRecycle } from 'react-icons/fa';
|
import { FaRecycle } from 'react-icons/fa';
|
||||||
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import IAIIconButton from 'common/components/IAIIconButton';
|
import IAIIconButton from 'common/components/IAIIconButton';
|
||||||
import { OptionsState, setShouldLoopback } from 'features/options/optionsSlice';
|
import { OptionsState, setShouldLoopback } from 'features/options/store/optionsSlice';
|
||||||
|
|
||||||
const loopbackSelector = createSelector(
|
const loopbackSelector = createSelector(
|
||||||
(state: RootState) => state.options,
|
(state: RootState) => state.options,
|
@ -1,4 +1,4 @@
|
|||||||
@use '../../../styles/Mixins/' as *;
|
@use '../../../../styles/Mixins/' as *;
|
||||||
|
|
||||||
.process-buttons {
|
.process-buttons {
|
||||||
display: flex;
|
display: flex;
|
@ -3,11 +3,11 @@ import { ChangeEvent, KeyboardEvent, useRef } from 'react';
|
|||||||
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import { generateImage } from 'app/socketio/actions';
|
import { generateImage } from 'app/socketio/actions';
|
||||||
|
|
||||||
import { OptionsState, setPrompt } from 'features/options/optionsSlice';
|
import { OptionsState, setPrompt } from 'features/options/store/optionsSlice';
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { useHotkeys } from 'react-hotkeys-hook';
|
import { useHotkeys } from 'react-hotkeys-hook';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
import { readinessSelector } from 'app/selectors/readinessSelector';
|
import { readinessSelector } from 'app/selectors/readinessSelector';
|
||||||
|
|
||||||
const promptInputSelector = createSelector(
|
const promptInputSelector = createSelector(
|
@ -1,7 +1,7 @@
|
|||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { RootState } from 'app/store';
|
import { RootState } from 'app/store';
|
||||||
import { tabMap } from 'features/tabs/InvokeTabs';
|
import { tabMap } from 'features/tabs/components/InvokeTabs';
|
||||||
import { OptionsState } from './optionsSlice';
|
import { OptionsState } from './optionsSlice';
|
||||||
|
|
||||||
export const activeTabNameSelector = createSelector(
|
export const activeTabNameSelector = createSelector(
|
@ -4,7 +4,7 @@ import * as InvokeAI from 'app/invokeai';
|
|||||||
import promptToString from 'common/util/promptToString';
|
import promptToString from 'common/util/promptToString';
|
||||||
import { seedWeightsToString } from 'common/util/seedWeightPairs';
|
import { seedWeightsToString } from 'common/util/seedWeightPairs';
|
||||||
import { FACETOOL_TYPES } from 'app/constants';
|
import { FACETOOL_TYPES } from 'app/constants';
|
||||||
import { InvokeTabName, tabMap } from 'features/tabs/InvokeTabs';
|
import { InvokeTabName, tabMap } from 'features/tabs/components/InvokeTabs';
|
||||||
|
|
||||||
export type UpscalingLevel = 2 | 4;
|
export type UpscalingLevel = 2 | 4;
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
import { IconButton, Tooltip } from '@chakra-ui/react';
|
import { IconButton, Tooltip } from '@chakra-ui/react';
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store';
|
import { useAppDispatch, useAppSelector } from 'app/store';
|
||||||
import { RootState } from 'app/store';
|
import { RootState } from 'app/store';
|
||||||
import { errorSeen, setShouldShowLogViewer, SystemState } from './systemSlice';
|
import { errorSeen, setShouldShowLogViewer, SystemState } from 'features/system/store/systemSlice';
|
||||||
import { useLayoutEffect, useRef, useState } from 'react';
|
import { useLayoutEffect, useRef, useState } from 'react';
|
||||||
import { FaAngleDoubleDown, FaCode, FaMinus } from 'react-icons/fa';
|
import { FaAngleDoubleDown, FaCode, FaMinus } from 'react-icons/fa';
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
@ -1,4 +1,4 @@
|
|||||||
@use '../../../styles/Mixins/' as *;
|
@use '../../../../styles/Mixins/' as *;
|
||||||
|
|
||||||
.hotkeys-modal {
|
.hotkeys-modal {
|
||||||
width: 36rem;
|
width: 36rem;
|
@ -1,4 +1,4 @@
|
|||||||
@use '../../styles/Mixins/' as *;
|
@use '../../../styles/Mixins/' as *;
|
||||||
|
|
||||||
.modal {
|
.modal {
|
||||||
background-color: var(--background-color-secondary);
|
background-color: var(--background-color-secondary);
|
@ -1,4 +1,4 @@
|
|||||||
@use '../../styles/Mixins/' as *;
|
@use '../../../styles/Mixins/' as *;
|
||||||
|
|
||||||
.progress-bar {
|
.progress-bar {
|
||||||
background-color: var(--root-bg-color);
|
background-color: var(--root-bg-color);
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user