mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fix High Resolution not Pulling for Use All Parameters
This commit is contained in:
parent
68c2722c02
commit
fd722ddf7d
@ -1,6 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
trailingComma: 'es5',
|
trailingComma: 'es5',
|
||||||
tabWidth: 2,
|
tabWidth: 2,
|
||||||
|
endOfLine: 'crlf',
|
||||||
semi: true,
|
semi: true,
|
||||||
singleQuote: true,
|
singleQuote: true,
|
||||||
overrides: [
|
overrides: [
|
||||||
|
File diff suppressed because one or more lines are too long
2
invokeai/frontend/dist/index.html
vendored
2
invokeai/frontend/dist/index.html
vendored
@ -5,7 +5,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>InvokeAI - A Stable Diffusion Toolkit</title>
|
<title>InvokeAI - A Stable Diffusion Toolkit</title>
|
||||||
<link rel="shortcut icon" type="icon" href="./assets/favicon-0d253ced.ico" />
|
<link rel="shortcut icon" type="icon" href="./assets/favicon-0d253ced.ico" />
|
||||||
<script type="module" crossorigin src="./assets/index-c33fa9da.js"></script>
|
<script type="module" crossorigin src="./assets/index-6dcf2dc0.js"></script>
|
||||||
<link rel="stylesheet" href="./assets/index-14cb2922.css">
|
<link rel="stylesheet" href="./assets/index-14cb2922.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ import {
|
|||||||
setInitialImage,
|
setInitialImage,
|
||||||
setSeed,
|
setSeed,
|
||||||
} from 'features/parameters/store/generationSlice';
|
} from 'features/parameters/store/generationSlice';
|
||||||
|
import { setAllPostProcessingParameters } from 'features/parameters/store/postprocessingSlice';
|
||||||
import { postprocessingSelector } from 'features/parameters/store/postprocessingSelectors';
|
import { postprocessingSelector } from 'features/parameters/store/postprocessingSelectors';
|
||||||
import { systemSelector } from 'features/system/store/systemSelectors';
|
import { systemSelector } from 'features/system/store/systemSelectors';
|
||||||
import { SystemState } from 'features/system/store/systemSlice';
|
import { SystemState } from 'features/system/store/systemSlice';
|
||||||
@ -189,11 +190,12 @@ const CurrentImageButtons = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const handleClickUseAllParameters = () => {
|
const handleClickUseAllParameters = () => {
|
||||||
if (!currentImage) return;
|
if (!currentImage?.metadata) return;
|
||||||
currentImage.metadata && dispatch(setAllParameters(currentImage.metadata));
|
dispatch(setAllParameters(currentImage.metadata));
|
||||||
if (currentImage.metadata?.image.type === 'img2img') {
|
dispatch(setAllPostProcessingParameters(currentImage.metadata));
|
||||||
|
if (currentImage.metadata.image.type === 'img2img') {
|
||||||
dispatch(setActiveTab('img2img'));
|
dispatch(setActiveTab('img2img'));
|
||||||
} else if (currentImage.metadata?.image.type === 'txt2img') {
|
} else if (currentImage.metadata.image.type === 'txt2img') {
|
||||||
dispatch(setActiveTab('txt2img'));
|
dispatch(setActiveTab('txt2img'));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -10,6 +10,7 @@ import {
|
|||||||
setInitialImage,
|
setInitialImage,
|
||||||
setSeed,
|
setSeed,
|
||||||
} from 'features/parameters/store/generationSlice';
|
} from 'features/parameters/store/generationSlice';
|
||||||
|
import { setAllPostProcessingParameters } from 'features/parameters/store/postprocessingSlice';
|
||||||
import { DragEvent, memo, useState } from 'react';
|
import { DragEvent, memo, useState } from 'react';
|
||||||
import { FaCheck, FaTrashAlt } from 'react-icons/fa';
|
import { FaCheck, FaTrashAlt } from 'react-icons/fa';
|
||||||
import DeleteImageModal from './DeleteImageModal';
|
import DeleteImageModal from './DeleteImageModal';
|
||||||
@ -114,7 +115,10 @@ const HoverableImage = memo((props: HoverableImageProps) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleUseAllParameters = () => {
|
const handleUseAllParameters = () => {
|
||||||
metadata && dispatch(setAllParameters(metadata));
|
if (metadata) {
|
||||||
|
dispatch(setAllParameters(metadata));
|
||||||
|
dispatch(setAllPostProcessingParameters(metadata));
|
||||||
|
}
|
||||||
toast({
|
toast({
|
||||||
title: t('toast.parametersSet'),
|
title: t('toast.parametersSet'),
|
||||||
status: 'success',
|
status: 'success',
|
||||||
|
@ -301,7 +301,6 @@ export const generationSlice = createSlice({
|
|||||||
state.perlin = perlin;
|
state.perlin = perlin;
|
||||||
}
|
}
|
||||||
if (typeof seamless === 'boolean') state.seamless = seamless;
|
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 (width) state.width = width;
|
||||||
if (height) state.height = height;
|
if (height) state.height = height;
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import type { PayloadAction } from '@reduxjs/toolkit';
|
import type { PayloadAction } from '@reduxjs/toolkit';
|
||||||
import { createSlice } from '@reduxjs/toolkit';
|
import { createSlice } from '@reduxjs/toolkit';
|
||||||
|
import * as InvokeAI from 'app/invokeai';
|
||||||
import { FACETOOL_TYPES } from 'app/constants';
|
import { FACETOOL_TYPES } from 'app/constants';
|
||||||
|
|
||||||
export type UpscalingLevel = 2 | 4;
|
export type UpscalingLevel = 2 | 4;
|
||||||
@ -40,6 +41,16 @@ export const postprocessingSlice = createSlice({
|
|||||||
name: 'postprocessing',
|
name: 'postprocessing',
|
||||||
initialState,
|
initialState,
|
||||||
reducers: {
|
reducers: {
|
||||||
|
setAllPostProcessingParameters: (
|
||||||
|
state,
|
||||||
|
action: PayloadAction<InvokeAI.Metadata>
|
||||||
|
) => {
|
||||||
|
const { type, hires_fix } = action.payload.image;
|
||||||
|
|
||||||
|
if (type === 'txt2img' && typeof hires_fix === 'boolean')
|
||||||
|
state.hiresFix = hires_fix;
|
||||||
|
// Strength of img2img used in hires_fix is not currently exposed in the Metadata for the final image.
|
||||||
|
},
|
||||||
setFacetoolStrength: (state, action: PayloadAction<number>) => {
|
setFacetoolStrength: (state, action: PayloadAction<number>) => {
|
||||||
state.facetoolStrength = action.payload;
|
state.facetoolStrength = action.payload;
|
||||||
},
|
},
|
||||||
@ -83,6 +94,7 @@ export const postprocessingSlice = createSlice({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export const {
|
export const {
|
||||||
|
setAllPostProcessingParameters,
|
||||||
resetPostprocessingState,
|
resetPostprocessingState,
|
||||||
setCodeformerFidelity,
|
setCodeformerFidelity,
|
||||||
setFacetoolStrength,
|
setFacetoolStrength,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user