mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
* working * added selector for method * refactoring graph * added ersgan method * fixing yarn build * add tooltips * a conjuction * rephrase * removed manual sliders, set HRF to calculate dimensions automatically to match 512^2 pixels * working * working * working * fixed tooltip * add hrf to use all parameters * adding hrf method to parameters * working on parameter recall * working on parameter recall * cleaning * fix(ui): fix unnecessary casts in addHrfToGraph * chore(ui): use camelCase in addHrfToGraph * fix(ui): do not add HRF metadata unless HRF is added to graph * fix(ui): remove unused imports in addHrfToGraph * feat(ui): do not hide HRF params when disabled, only disable them * fix(ui): remove unused vars in addHrfToGraph * feat(ui): default HRF str to 0.35, method ESRGAN * fix(ui): use isValidBoolean to check hrfEnabled param * fix(nodes): update CoreMetadataInvocation fields for HRF * feat(ui): set hrf strength default to 0.45 * fix(ui): set default hrf strength in configSlice * feat(ui): use translations for HRF features --------- Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
104 lines
2.1 KiB
TypeScript
104 lines
2.1 KiB
TypeScript
import type { PayloadAction } from '@reduxjs/toolkit';
|
|
import { createSlice } from '@reduxjs/toolkit';
|
|
import { AppConfig, PartialAppConfig } from 'app/types/invokeai';
|
|
import { merge } from 'lodash-es';
|
|
|
|
export const initialConfigState: AppConfig = {
|
|
shouldUpdateImagesOnConnect: false,
|
|
shouldFetchMetadataFromApi: false,
|
|
disabledTabs: [],
|
|
disabledFeatures: ['lightbox', 'faceRestore', 'batches', 'bulkDownload'],
|
|
disabledSDFeatures: [
|
|
'variation',
|
|
'symmetry',
|
|
'hires',
|
|
'perlinNoise',
|
|
'noiseThreshold',
|
|
],
|
|
nodesAllowlist: undefined,
|
|
nodesDenylist: undefined,
|
|
canRestoreDeletedImagesFromBin: true,
|
|
sd: {
|
|
disabledControlNetModels: [],
|
|
disabledControlNetProcessors: [],
|
|
iterations: {
|
|
initial: 1,
|
|
min: 1,
|
|
sliderMax: 1000,
|
|
inputMax: 10000,
|
|
fineStep: 1,
|
|
coarseStep: 1,
|
|
},
|
|
width: {
|
|
initial: 512,
|
|
min: 64,
|
|
sliderMax: 1536,
|
|
inputMax: 4096,
|
|
fineStep: 8,
|
|
coarseStep: 64,
|
|
},
|
|
height: {
|
|
initial: 512,
|
|
min: 64,
|
|
sliderMax: 1536,
|
|
inputMax: 4096,
|
|
fineStep: 8,
|
|
coarseStep: 64,
|
|
},
|
|
steps: {
|
|
initial: 30,
|
|
min: 1,
|
|
sliderMax: 100,
|
|
inputMax: 500,
|
|
fineStep: 1,
|
|
coarseStep: 1,
|
|
},
|
|
guidance: {
|
|
initial: 7,
|
|
min: 1,
|
|
sliderMax: 20,
|
|
inputMax: 200,
|
|
fineStep: 0.1,
|
|
coarseStep: 0.5,
|
|
},
|
|
img2imgStrength: {
|
|
initial: 0.7,
|
|
min: 0,
|
|
sliderMax: 1,
|
|
inputMax: 1,
|
|
fineStep: 0.01,
|
|
coarseStep: 0.05,
|
|
},
|
|
hrfStrength: {
|
|
initial: 0.45,
|
|
min: 0,
|
|
sliderMax: 1,
|
|
inputMax: 1,
|
|
fineStep: 0.01,
|
|
coarseStep: 0.05,
|
|
},
|
|
dynamicPrompts: {
|
|
maxPrompts: {
|
|
initial: 100,
|
|
min: 1,
|
|
sliderMax: 1000,
|
|
inputMax: 10000,
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
export const configSlice = createSlice({
|
|
name: 'config',
|
|
initialState: initialConfigState,
|
|
reducers: {
|
|
configChanged: (state, action: PayloadAction<PartialAppConfig>) => {
|
|
merge(state, action.payload);
|
|
},
|
|
},
|
|
});
|
|
|
|
export const { configChanged } = configSlice.actions;
|
|
|
|
export default configSlice.reducer;
|