mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
memoize outpainting options
This commit is contained in:
parent
8b08af714d
commit
c6112e3295
@ -15,8 +15,8 @@ import {
|
|||||||
setInfillMethod,
|
setInfillMethod,
|
||||||
} from 'features/options/store/optionsSlice';
|
} from 'features/options/store/optionsSlice';
|
||||||
import { systemSelector } from 'features/system/store/systemSelectors';
|
import { systemSelector } from 'features/system/store/systemSelectors';
|
||||||
import { ChangeEvent } from 'react';
|
|
||||||
import InpaintReplace from './InpaintReplace';
|
import InpaintReplace from './InpaintReplace';
|
||||||
|
import _ from 'lodash';
|
||||||
|
|
||||||
const selector = createSelector(
|
const selector = createSelector(
|
||||||
[optionsSelector, systemSelector],
|
[optionsSelector, systemSelector],
|
||||||
@ -43,6 +43,11 @@ const selector = createSelector(
|
|||||||
infillMethod,
|
infillMethod,
|
||||||
availableInfillMethods,
|
availableInfillMethods,
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
{
|
||||||
|
memoizeOptions: {
|
||||||
|
resultEqualityCheck: _.isEqual,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
// import { Feature } from 'app/features';
|
// import { Feature } from 'app/features';
|
||||||
import { Feature } from 'app/features';
|
import { Feature } from 'app/features';
|
||||||
import { RootState, useAppSelector } from 'app/store';
|
|
||||||
import ImageToImageStrength from 'features/options/components/AdvancedOptions/ImageToImage/ImageToImageStrength';
|
import ImageToImageStrength from 'features/options/components/AdvancedOptions/ImageToImage/ImageToImageStrength';
|
||||||
import BoundingBoxSettings, {
|
import BoundingBoxSettings, {
|
||||||
BoundingBoxSettingsHeader,
|
BoundingBoxSettingsHeader,
|
||||||
@ -12,7 +11,6 @@ import SeedHeader from 'features/options/components/AdvancedOptions/Seed/SeedHea
|
|||||||
import SeedOptions from 'features/options/components/AdvancedOptions/Seed/SeedOptions';
|
import SeedOptions from 'features/options/components/AdvancedOptions/Seed/SeedOptions';
|
||||||
import VariationsHeader from 'features/options/components/AdvancedOptions/Variations/VariationsHeader';
|
import VariationsHeader from 'features/options/components/AdvancedOptions/Variations/VariationsHeader';
|
||||||
import VariationsOptions from 'features/options/components/AdvancedOptions/Variations/VariationsOptions';
|
import VariationsOptions from 'features/options/components/AdvancedOptions/Variations/VariationsOptions';
|
||||||
import MainAdvancedOptionsCheckbox from 'features/options/components/MainOptions/MainAdvancedOptionsCheckbox';
|
|
||||||
import MainOptions from 'features/options/components/MainOptions/MainOptions';
|
import MainOptions from 'features/options/components/MainOptions/MainOptions';
|
||||||
import OptionsAccordion from 'features/options/components/OptionsAccordion';
|
import OptionsAccordion from 'features/options/components/OptionsAccordion';
|
||||||
import ProcessButtons from 'features/options/components/ProcessButtons/ProcessButtons';
|
import ProcessButtons from 'features/options/components/ProcessButtons/ProcessButtons';
|
||||||
@ -20,11 +18,7 @@ import PromptInput from 'features/options/components/PromptInput/PromptInput';
|
|||||||
import InvokeOptionsPanel from 'features/tabs/components/InvokeOptionsPanel';
|
import InvokeOptionsPanel from 'features/tabs/components/InvokeOptionsPanel';
|
||||||
|
|
||||||
export default function UnifiedCanvasPanel() {
|
export default function UnifiedCanvasPanel() {
|
||||||
const showAdvancedOptions = useAppSelector(
|
const unifiedCanvasAccordions = {
|
||||||
(state: RootState) => state.options.showAdvancedOptions
|
|
||||||
);
|
|
||||||
|
|
||||||
const imageToImageAccordions = {
|
|
||||||
boundingBox: {
|
boundingBox: {
|
||||||
header: <BoundingBoxSettingsHeader />,
|
header: <BoundingBoxSettingsHeader />,
|
||||||
feature: Feature.BOUNDING_BOX,
|
feature: Feature.BOUNDING_BOX,
|
||||||
@ -56,7 +50,7 @@ export default function UnifiedCanvasPanel() {
|
|||||||
label="Image To Image Strength"
|
label="Image To Image Strength"
|
||||||
styleClass="main-option-block image-to-image-strength-main-option"
|
styleClass="main-option-block image-to-image-strength-main-option"
|
||||||
/>
|
/>
|
||||||
<OptionsAccordion accordionInfo={imageToImageAccordions} />
|
<OptionsAccordion accordionInfo={unifiedCanvasAccordions} />
|
||||||
</InvokeOptionsPanel>
|
</InvokeOptionsPanel>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user