Removes force_outpaint param

This commit is contained in:
psychedelicious 2022-11-24 15:20:28 +11:00 committed by blessedcoolant
parent 52c79fa097
commit 7f1b95fbda
3 changed files with 8 additions and 35 deletions

View File

@ -60,7 +60,6 @@ export const frontendToBackendParameters = (
seed, seed,
seedWeights, seedWeights,
shouldFitToWidthHeight, shouldFitToWidthHeight,
shouldForceOutpaint,
shouldGenerateVariations, shouldGenerateVariations,
shouldRandomizeSeed, shouldRandomizeSeed,
shouldRunESRGAN, shouldRunESRGAN,
@ -190,8 +189,8 @@ export const frontendToBackendParameters = (
generationParameters.seam_strength = seamStrength; generationParameters.seam_strength = seamStrength;
generationParameters.seam_steps = seamSteps; generationParameters.seam_steps = seamSteps;
generationParameters.tile_size = tileSize; generationParameters.tile_size = tileSize;
generationParameters.force_outpaint = shouldForceOutpaint;
generationParameters.infill_method = infillMethod; generationParameters.infill_method = infillMethod;
generationParameters.force_outpaint = false;
} }
if (shouldGenerateVariations) { if (shouldGenerateVariations) {

View File

@ -1,22 +1,20 @@
import { Box, Flex } from '@chakra-ui/react'; import { Flex } from '@chakra-ui/react';
import { createSelector } from '@reduxjs/toolkit'; import { createSelector } from '@reduxjs/toolkit';
import { useAppDispatch, useAppSelector } from 'app/store'; import { useAppDispatch, useAppSelector } from 'app/store';
import IAISelect from 'common/components/IAISelect'; import IAISelect from 'common/components/IAISelect';
import IAISlider from 'common/components/IAISlider'; import IAISlider from 'common/components/IAISlider';
import IAISwitch from 'common/components/IAISwitch';
import { optionsSelector } from 'features/options/store/optionsSelectors'; import { optionsSelector } from 'features/options/store/optionsSelectors';
import { import {
setSeamSize,
setSeamBlur,
setSeamStrength,
setSeamSteps,
setTileSize,
setShouldForceOutpaint,
setInfillMethod, setInfillMethod,
setSeamBlur,
setSeamSize,
setSeamSteps,
setSeamStrength,
setTileSize,
} 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 InpaintReplace from './InpaintReplace';
import _ from 'lodash'; import _ from 'lodash';
import InpaintReplace from './InpaintReplace';
const selector = createSelector( const selector = createSelector(
[optionsSelector, systemSelector], [optionsSelector, systemSelector],
@ -27,7 +25,6 @@ const selector = createSelector(
seamStrength, seamStrength,
seamSteps, seamSteps,
tileSize, tileSize,
shouldForceOutpaint,
infillMethod, infillMethod,
} = options; } = options;
@ -39,7 +36,6 @@ const selector = createSelector(
seamStrength, seamStrength,
seamSteps, seamSteps,
tileSize, tileSize,
shouldForceOutpaint,
infillMethod, infillMethod,
availableInfillMethods, availableInfillMethods,
}; };
@ -59,7 +55,6 @@ const CompositionOptions = () => {
seamStrength, seamStrength,
seamSteps, seamSteps,
tileSize, tileSize,
shouldForceOutpaint,
infillMethod, infillMethod,
availableInfillMethods, availableInfillMethods,
} = useAppSelector(selector); } = useAppSelector(selector);
@ -134,13 +129,6 @@ const CompositionOptions = () => {
withSliderMarks withSliderMarks
withReset withReset
/> />
<IAISwitch
label={'Force Outpaint'}
isChecked={shouldForceOutpaint}
onChange={(e) => {
dispatch(setShouldForceOutpaint(e.target.checked));
}}
/>
<IAISelect <IAISelect
label="Infill Method" label="Infill Method"
value={infillMethod} value={infillMethod}
@ -172,11 +160,3 @@ const CompositionOptions = () => {
}; };
export default CompositionOptions; export default CompositionOptions;
export const OutpaintingHeader = () => {
return (
<Box flex="1" textAlign="left">
Outpainting Composition
</Box>
);
};

View File

@ -37,7 +37,6 @@ export interface OptionsState {
seed: number; seed: number;
seedWeights: string; seedWeights: string;
shouldFitToWidthHeight: boolean; shouldFitToWidthHeight: boolean;
shouldForceOutpaint: boolean;
shouldGenerateVariations: boolean; shouldGenerateVariations: boolean;
shouldHoldOptionsPanelOpen: boolean; shouldHoldOptionsPanelOpen: boolean;
shouldLoopback: boolean; shouldLoopback: boolean;
@ -84,7 +83,6 @@ const initialOptionsState: OptionsState = {
seed: 0, seed: 0,
seedWeights: '', seedWeights: '',
shouldFitToWidthHeight: true, shouldFitToWidthHeight: true,
shouldForceOutpaint: false,
shouldGenerateVariations: false, shouldGenerateVariations: false,
shouldHoldOptionsPanelOpen: false, shouldHoldOptionsPanelOpen: false,
shouldLoopback: false, shouldLoopback: false,
@ -395,9 +393,6 @@ export const optionsSlice = createSlice({
setTileSize: (state, action: PayloadAction<number>) => { setTileSize: (state, action: PayloadAction<number>) => {
state.tileSize = action.payload; state.tileSize = action.payload;
}, },
setShouldForceOutpaint: (state, action: PayloadAction<boolean>) => {
state.shouldForceOutpaint = action.payload;
},
setInfillMethod: (state, action: PayloadAction<string>) => { setInfillMethod: (state, action: PayloadAction<string>) => {
state.infillMethod = action.payload; state.infillMethod = action.payload;
}, },
@ -438,7 +433,6 @@ export const {
setSeed, setSeed,
setSeedWeights, setSeedWeights,
setShouldFitToWidthHeight, setShouldFitToWidthHeight,
setShouldForceOutpaint,
setShouldGenerateVariations, setShouldGenerateVariations,
setShouldHoldOptionsPanelOpen, setShouldHoldOptionsPanelOpen,
setShouldLoopback, setShouldLoopback,