add option to show intermediate latent space

This commit is contained in:
damian
2022-11-01 11:17:43 +01:00
committed by Lincoln Stein
parent be1393a41c
commit cdb107dcda
9 changed files with 751 additions and 7 deletions

690
frontend/dist/assets/index.ae92a637.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -62,7 +62,7 @@ export const frontendToBackendParameters = (
shouldRandomizeSeed,
} = optionsState;
const { shouldDisplayInProgress } = systemState;
const { shouldDisplayInProgress, shouldDisplayInProgressLatents } = systemState;
const generationParameters: { [k: string]: any } = {
prompt,
@@ -76,6 +76,7 @@ export const frontendToBackendParameters = (
sampler_name: sampler,
seed,
progress_images: shouldDisplayInProgress,
progress_latents: shouldDisplayInProgressLatents,
};
generationParameters.seed = shouldRandomizeSeed

View File

@@ -21,6 +21,7 @@ import {
setShouldConfirmOnDelete,
setShouldDisplayGuides,
setShouldDisplayInProgress,
setShouldDisplayInProgressLatents,
SystemState,
} from '../systemSlice';
import ModelList from './ModelList';
@@ -31,12 +32,14 @@ const systemSelector = createSelector(
(system: SystemState) => {
const {
shouldDisplayInProgress,
shouldDisplayInProgressLatents,
shouldConfirmOnDelete,
shouldDisplayGuides,
model_list,
} = system;
return {
shouldDisplayInProgress,
shouldDisplayInProgressLatents,
shouldConfirmOnDelete,
shouldDisplayGuides,
models: _.map(model_list, (_model, key) => key),
@@ -73,6 +76,7 @@ const SettingsModal = ({ children }: SettingsModalProps) => {
const {
shouldDisplayInProgress,
shouldDisplayInProgressLatents,
shouldConfirmOnDelete,
shouldDisplayGuides,
} = useAppSelector(systemSelector);
@@ -108,6 +112,12 @@ const SettingsModal = ({ children }: SettingsModalProps) => {
dispatcher={setShouldDisplayInProgress}
/>
<SettingsModalItem
settingTitle="Display In-Progress Latents (quick; lo-res)"
isChecked={shouldDisplayInProgressLatents}
dispatcher={setShouldDisplayInProgressLatents}
/>
<SettingsModalItem
settingTitle="Confirm on Delete"
isChecked={shouldConfirmOnDelete}

View File

@@ -19,6 +19,7 @@ export interface SystemState
extends InvokeAI.SystemStatus,
InvokeAI.SystemConfig {
shouldDisplayInProgress: boolean;
shouldDisplayInProgressLatents: boolean;
log: Array<LogEntry>;
shouldShowLogViewer: boolean;
isGFPGANAvailable: boolean;
@@ -44,6 +45,7 @@ const initialSystemState = {
log: [],
shouldShowLogViewer: false,
shouldDisplayInProgress: false,
shouldDisplayInProgressLatents: false,
shouldDisplayGuides: true,
isGFPGANAvailable: true,
isESRGANAvailable: true,
@@ -76,6 +78,9 @@ export const systemSlice = createSlice({
setShouldDisplayInProgress: (state, action: PayloadAction<boolean>) => {
state.shouldDisplayInProgress = action.payload;
},
setShouldDisplayInProgressLatents: (state, action: PayloadAction<boolean>) => {
state.shouldDisplayInProgressLatents = action.payload;
},
setIsProcessing: (state, action: PayloadAction<boolean>) => {
state.isProcessing = action.payload;
},
@@ -183,6 +188,7 @@ export const systemSlice = createSlice({
export const {
setShouldDisplayInProgress,
setShouldDisplayInProgressLatents,
setIsProcessing,
addLogEntry,
setShouldShowLogViewer,