mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
remove tiledVAE option and make it true
This commit is contained in:
parent
582f384fff
commit
54eda9163c
@ -1647,7 +1647,6 @@
|
|||||||
"outputImageSize": "Output Image Size",
|
"outputImageSize": "Output Image Size",
|
||||||
"sharpness": "Sharpness",
|
"sharpness": "Sharpness",
|
||||||
"structure": "Structure",
|
"structure": "Structure",
|
||||||
"tiledVAE": "Tiled VAE",
|
|
||||||
"toInstall": "to install",
|
"toInstall": "to install",
|
||||||
"upscaleModel": "Upcale Model",
|
"upscaleModel": "Upcale Model",
|
||||||
"visit": "Visit",
|
"visit": "Visit",
|
||||||
|
@ -38,8 +38,7 @@ export const getOutputImageSize = (initialImage: ImageDTO) => {
|
|||||||
export const buildMultidiffusionUpscsaleGraph = async (state: RootState): Promise<GraphType> => {
|
export const buildMultidiffusionUpscsaleGraph = async (state: RootState): Promise<GraphType> => {
|
||||||
const { model, cfgScale: cfg_scale, scheduler, steps, vaePrecision, seed, vae } = state.generation;
|
const { model, cfgScale: cfg_scale, scheduler, steps, vaePrecision, seed, vae } = state.generation;
|
||||||
const { positivePrompt, negativePrompt } = state.controlLayers.present;
|
const { positivePrompt, negativePrompt } = state.controlLayers.present;
|
||||||
const { upscaleModel, upscaleInitialImage, sharpness, structure, creativity, tiledVAE, tileControlnetModel } =
|
const { upscaleModel, upscaleInitialImage, sharpness, structure, creativity, tileControlnetModel } = state.upscale;
|
||||||
state.upscale;
|
|
||||||
|
|
||||||
assert(model, 'No model found in state');
|
assert(model, 'No model found in state');
|
||||||
assert(upscaleModel, 'No upscale model found in state');
|
assert(upscaleModel, 'No upscale model found in state');
|
||||||
@ -50,22 +49,23 @@ export const buildMultidiffusionUpscsaleGraph = async (state: RootState): Promis
|
|||||||
|
|
||||||
const g = new Graph();
|
const g = new Graph();
|
||||||
|
|
||||||
// const unsharpMaskNode1 = g.addNode({
|
const unsharpMaskNode1 = g.addNode({
|
||||||
// id: `${UNSHARP_MASK}_1`,
|
id: `${UNSHARP_MASK}_1`,
|
||||||
// type: 'unsharp_mask',
|
type: 'unsharp_mask',
|
||||||
// image: upscaleInitialImage,
|
image: upscaleInitialImage,
|
||||||
// radius: 2,
|
radius: 2,
|
||||||
// strength: (sharpness + 10) * 3.75 + 25,
|
strength: (sharpness + 10) * 3.75 + 25,
|
||||||
// });
|
});
|
||||||
|
|
||||||
const upscaleNode = g.addNode({
|
const upscaleNode = g.addNode({
|
||||||
id: SPANDREL,
|
id: SPANDREL,
|
||||||
type: 'spandrel_image_to_image',
|
type: 'spandrel_image_to_image',
|
||||||
image_to_image_model: upscaleModel,
|
image_to_image_model: upscaleModel,
|
||||||
tile_size: 500,
|
tile_size: 500,
|
||||||
image: upscaleInitialImage,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
g.addEdge(unsharpMaskNode1, 'image', upscaleNode, 'image');
|
||||||
|
|
||||||
const unsharpMaskNode2 = g.addNode({
|
const unsharpMaskNode2 = g.addNode({
|
||||||
id: `${UNSHARP_MASK}_2`,
|
id: `${UNSHARP_MASK}_2`,
|
||||||
type: 'unsharp_mask',
|
type: 'unsharp_mask',
|
||||||
@ -98,7 +98,7 @@ export const buildMultidiffusionUpscsaleGraph = async (state: RootState): Promis
|
|||||||
id: IMAGE_TO_LATENTS,
|
id: IMAGE_TO_LATENTS,
|
||||||
type: 'i2l',
|
type: 'i2l',
|
||||||
fp32: vaePrecision === 'fp32',
|
fp32: vaePrecision === 'fp32',
|
||||||
tiled: tiledVAE,
|
tiled: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
g.addEdge(resizeNode, 'image', i2lNode, 'image');
|
g.addEdge(resizeNode, 'image', i2lNode, 'image');
|
||||||
@ -107,7 +107,7 @@ export const buildMultidiffusionUpscsaleGraph = async (state: RootState): Promis
|
|||||||
type: 'l2i',
|
type: 'l2i',
|
||||||
id: LATENTS_TO_IMAGE,
|
id: LATENTS_TO_IMAGE,
|
||||||
fp32: vaePrecision === 'fp32',
|
fp32: vaePrecision === 'fp32',
|
||||||
tiled: tiledVAE,
|
tiled: true,
|
||||||
board: getBoardField(state),
|
board: getBoardField(state),
|
||||||
is_intermediate: false,
|
is_intermediate: false,
|
||||||
});
|
});
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
import { FormControl, FormLabel, Switch } from '@invoke-ai/ui-library';
|
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
|
||||||
import { tiledVAEChanged } from 'features/parameters/store/upscaleSlice';
|
|
||||||
import { useCallback } from 'react';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
export const ParamTiledVAEToggle = () => {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
const tiledVAE = useAppSelector((s) => s.upscale.tiledVAE);
|
|
||||||
const dispatch = useAppDispatch();
|
|
||||||
|
|
||||||
const handleChange = useCallback(
|
|
||||||
(event: React.ChangeEvent<HTMLInputElement>) => {
|
|
||||||
dispatch(tiledVAEChanged(event.target.checked));
|
|
||||||
},
|
|
||||||
[dispatch]
|
|
||||||
);
|
|
||||||
return (
|
|
||||||
<FormControl>
|
|
||||||
<Switch isChecked={tiledVAE} onChange={handleChange} />
|
|
||||||
<FormLabel>{t('upscaling.tiledVAE')}</FormLabel>
|
|
||||||
</FormControl>
|
|
||||||
);
|
|
||||||
};
|
|
@ -11,7 +11,6 @@ interface UpscaleState {
|
|||||||
sharpness: number;
|
sharpness: number;
|
||||||
structure: number;
|
structure: number;
|
||||||
creativity: number;
|
creativity: number;
|
||||||
tiledVAE: boolean;
|
|
||||||
tileControlnetModel: ControlNetModelConfig | null;
|
tileControlnetModel: ControlNetModelConfig | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,7 +21,6 @@ const initialUpscaleState: UpscaleState = {
|
|||||||
sharpness: 0,
|
sharpness: 0,
|
||||||
structure: 0,
|
structure: 0,
|
||||||
creativity: 0,
|
creativity: 0,
|
||||||
tiledVAE: false,
|
|
||||||
tileControlnetModel: null,
|
tileControlnetModel: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -36,9 +34,6 @@ export const upscaleSlice = createSlice({
|
|||||||
upscaleInitialImageChanged: (state, action: PayloadAction<ImageDTO | null>) => {
|
upscaleInitialImageChanged: (state, action: PayloadAction<ImageDTO | null>) => {
|
||||||
state.upscaleInitialImage = action.payload;
|
state.upscaleInitialImage = action.payload;
|
||||||
},
|
},
|
||||||
tiledVAEChanged: (state, action: PayloadAction<boolean>) => {
|
|
||||||
state.tiledVAE = action.payload;
|
|
||||||
},
|
|
||||||
structureChanged: (state, action: PayloadAction<number>) => {
|
structureChanged: (state, action: PayloadAction<number>) => {
|
||||||
state.structure = action.payload;
|
state.structure = action.payload;
|
||||||
},
|
},
|
||||||
@ -57,7 +52,6 @@ export const upscaleSlice = createSlice({
|
|||||||
export const {
|
export const {
|
||||||
upscaleModelChanged,
|
upscaleModelChanged,
|
||||||
upscaleInitialImageChanged,
|
upscaleInitialImageChanged,
|
||||||
tiledVAEChanged,
|
|
||||||
structureChanged,
|
structureChanged,
|
||||||
creativityChanged,
|
creativityChanged,
|
||||||
sharpnessChanged,
|
sharpnessChanged,
|
||||||
|
@ -5,7 +5,6 @@ import ParamCreativity from 'features/parameters/components/Upscale/ParamCreativ
|
|||||||
import ParamSharpness from 'features/parameters/components/Upscale/ParamSharpness';
|
import ParamSharpness from 'features/parameters/components/Upscale/ParamSharpness';
|
||||||
import ParamSpandrelModel from 'features/parameters/components/Upscale/ParamSpandrelModel';
|
import ParamSpandrelModel from 'features/parameters/components/Upscale/ParamSpandrelModel';
|
||||||
import ParamStructure from 'features/parameters/components/Upscale/ParamStructure';
|
import ParamStructure from 'features/parameters/components/Upscale/ParamStructure';
|
||||||
import { ParamTiledVAEToggle } from 'features/parameters/components/Upscale/ParamTiledVAEToggle';
|
|
||||||
import { selectUpscalelice } from 'features/parameters/store/upscaleSlice';
|
import { selectUpscalelice } from 'features/parameters/store/upscaleSlice';
|
||||||
import { useExpanderToggle } from 'features/settingsAccordions/hooks/useExpanderToggle';
|
import { useExpanderToggle } from 'features/settingsAccordions/hooks/useExpanderToggle';
|
||||||
import { useStandaloneAccordionToggle } from 'features/settingsAccordions/hooks/useStandaloneAccordionToggle';
|
import { useStandaloneAccordionToggle } from 'features/settingsAccordions/hooks/useStandaloneAccordionToggle';
|
||||||
@ -55,7 +54,6 @@ export const UpscaleSettingsAccordion = memo(() => {
|
|||||||
<ParamSharpness />
|
<ParamSharpness />
|
||||||
<ParamCreativity />
|
<ParamCreativity />
|
||||||
<ParamStructure />
|
<ParamStructure />
|
||||||
<ParamTiledVAEToggle />
|
|
||||||
</Flex>
|
</Flex>
|
||||||
</Expander>
|
</Expander>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user