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 = {
|
||||
trailingComma: 'es5',
|
||||
tabWidth: 2,
|
||||
endOfLine: 'crlf',
|
||||
semi: true,
|
||||
singleQuote: true,
|
||||
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" />
|
||||
<title>InvokeAI - A Stable Diffusion Toolkit</title>
|
||||
<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">
|
||||
</head>
|
||||
|
||||
|
@ -21,6 +21,7 @@ import {
|
||||
setInitialImage,
|
||||
setSeed,
|
||||
} from 'features/parameters/store/generationSlice';
|
||||
import { setAllPostProcessingParameters } from 'features/parameters/store/postprocessingSlice';
|
||||
import { postprocessingSelector } from 'features/parameters/store/postprocessingSelectors';
|
||||
import { systemSelector } from 'features/system/store/systemSelectors';
|
||||
import { SystemState } from 'features/system/store/systemSlice';
|
||||
@ -189,11 +190,12 @@ const CurrentImageButtons = () => {
|
||||
);
|
||||
|
||||
const handleClickUseAllParameters = () => {
|
||||
if (!currentImage) return;
|
||||
currentImage.metadata && dispatch(setAllParameters(currentImage.metadata));
|
||||
if (currentImage.metadata?.image.type === 'img2img') {
|
||||
if (!currentImage?.metadata) return;
|
||||
dispatch(setAllParameters(currentImage.metadata));
|
||||
dispatch(setAllPostProcessingParameters(currentImage.metadata));
|
||||
if (currentImage.metadata.image.type === 'img2img') {
|
||||
dispatch(setActiveTab('img2img'));
|
||||
} else if (currentImage.metadata?.image.type === 'txt2img') {
|
||||
} else if (currentImage.metadata.image.type === 'txt2img') {
|
||||
dispatch(setActiveTab('txt2img'));
|
||||
}
|
||||
};
|
||||
|
@ -10,6 +10,7 @@ import {
|
||||
setInitialImage,
|
||||
setSeed,
|
||||
} from 'features/parameters/store/generationSlice';
|
||||
import { setAllPostProcessingParameters } from 'features/parameters/store/postprocessingSlice';
|
||||
import { DragEvent, memo, useState } from 'react';
|
||||
import { FaCheck, FaTrashAlt } from 'react-icons/fa';
|
||||
import DeleteImageModal from './DeleteImageModal';
|
||||
@ -114,7 +115,10 @@ const HoverableImage = memo((props: HoverableImageProps) => {
|
||||
};
|
||||
|
||||
const handleUseAllParameters = () => {
|
||||
metadata && dispatch(setAllParameters(metadata));
|
||||
if (metadata) {
|
||||
dispatch(setAllParameters(metadata));
|
||||
dispatch(setAllPostProcessingParameters(metadata));
|
||||
}
|
||||
toast({
|
||||
title: t('toast.parametersSet'),
|
||||
status: 'success',
|
||||
|
@ -301,7 +301,6 @@ export const generationSlice = createSlice({
|
||||
state.perlin = perlin;
|
||||
}
|
||||
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 (height) state.height = height;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import type { PayloadAction } from '@reduxjs/toolkit';
|
||||
import { createSlice } from '@reduxjs/toolkit';
|
||||
import * as InvokeAI from 'app/invokeai';
|
||||
import { FACETOOL_TYPES } from 'app/constants';
|
||||
|
||||
export type UpscalingLevel = 2 | 4;
|
||||
@ -40,6 +41,16 @@ export const postprocessingSlice = createSlice({
|
||||
name: 'postprocessing',
|
||||
initialState,
|
||||
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>) => {
|
||||
state.facetoolStrength = action.payload;
|
||||
},
|
||||
@ -83,6 +94,7 @@ export const postprocessingSlice = createSlice({
|
||||
});
|
||||
|
||||
export const {
|
||||
setAllPostProcessingParameters,
|
||||
resetPostprocessingState,
|
||||
setCodeformerFidelity,
|
||||
setFacetoolStrength,
|
||||
|
Loading…
x
Reference in New Issue
Block a user