mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
* Added parameters to new more verbose React app and rebuilt the app.
This commit is contained in:
parent
c06dc5b85b
commit
0c1a2b68bf
backend/modules
frontend
dist
src
@ -66,7 +66,6 @@ def create_cmd_parser():
|
|||||||
"""
|
"""
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description='Example: dream> a fantastic alien landscape -W1024 -H960 -s100 -n12',
|
description='Example: dream> a fantastic alien landscape -W1024 -H960 -s100 -n12',
|
||||||
exit_on_error=True,
|
|
||||||
)
|
)
|
||||||
parser.add_argument('prompt', nargs='?', default='')
|
parser.add_argument('prompt', nargs='?', default='')
|
||||||
parser.add_argument('-s', '--steps', type=int, help='Number of steps')
|
parser.add_argument('-s', '--steps', type=int, help='Number of steps')
|
||||||
|
488
frontend/dist/assets/index.cc197870.js
vendored
Normal file
488
frontend/dist/assets/index.cc197870.js
vendored
Normal file
File diff suppressed because one or more lines are too long
695
frontend/dist/assets/index.cc5cde43.js
vendored
695
frontend/dist/assets/index.cc5cde43.js
vendored
File diff suppressed because one or more lines are too long
2
frontend/dist/index.html
vendored
2
frontend/dist/index.html
vendored
@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Stable Diffusion Dream Server</title>
|
<title>Stable Diffusion Dream Server</title>
|
||||||
<script type="module" crossorigin src="/assets/index.cc5cde43.js"></script>
|
<script type="module" crossorigin src="/assets/index.cc197870.js"></script>
|
||||||
<link rel="stylesheet" href="/assets/index.447eb2a9.css">
|
<link rel="stylesheet" href="/assets/index.447eb2a9.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -21,6 +21,8 @@ export const frontendToBackendParameters = (
|
|||||||
iterations,
|
iterations,
|
||||||
steps,
|
steps,
|
||||||
cfgScale,
|
cfgScale,
|
||||||
|
threshold,
|
||||||
|
perlin,
|
||||||
height,
|
height,
|
||||||
width,
|
width,
|
||||||
sampler,
|
sampler,
|
||||||
@ -49,6 +51,8 @@ export const frontendToBackendParameters = (
|
|||||||
iterations,
|
iterations,
|
||||||
steps,
|
steps,
|
||||||
cfg_scale: cfgScale,
|
cfg_scale: cfgScale,
|
||||||
|
threshold,
|
||||||
|
perlin,
|
||||||
height,
|
height,
|
||||||
width,
|
width,
|
||||||
sampler_name: sampler,
|
sampler_name: sampler,
|
||||||
@ -111,6 +115,8 @@ export const backendToFrontendParameters = (parameters: {
|
|||||||
iterations,
|
iterations,
|
||||||
steps,
|
steps,
|
||||||
cfg_scale,
|
cfg_scale,
|
||||||
|
threshold,
|
||||||
|
perlin,
|
||||||
height,
|
height,
|
||||||
width,
|
width,
|
||||||
sampler_name,
|
sampler_name,
|
||||||
@ -171,6 +177,8 @@ export const backendToFrontendParameters = (parameters: {
|
|||||||
sd.iterations = iterations;
|
sd.iterations = iterations;
|
||||||
sd.steps = steps;
|
sd.steps = steps;
|
||||||
sd.cfgScale = cfg_scale;
|
sd.cfgScale = cfg_scale;
|
||||||
|
sd.threshold = threshold;
|
||||||
|
sd.perlin = perlin;
|
||||||
sd.height = height;
|
sd.height = height;
|
||||||
sd.width = width;
|
sd.width = width;
|
||||||
sd.sampler = sampler_name;
|
sd.sampler = sampler_name;
|
||||||
|
@ -9,6 +9,8 @@ export interface SDMetadata {
|
|||||||
prompt?: string;
|
prompt?: string;
|
||||||
steps?: number;
|
steps?: number;
|
||||||
cfgScale?: number;
|
cfgScale?: number;
|
||||||
|
threshold?: number;
|
||||||
|
perlin?: number;
|
||||||
height?: number;
|
height?: number;
|
||||||
width?: number;
|
width?: number;
|
||||||
sampler?: string;
|
sampler?: string;
|
||||||
|
@ -3,7 +3,7 @@ import { Flex } from '@chakra-ui/react';
|
|||||||
import { RootState } from '../../app/store';
|
import { RootState } from '../../app/store';
|
||||||
import { useAppDispatch, useAppSelector } from '../../app/hooks';
|
import { useAppDispatch, useAppSelector } from '../../app/hooks';
|
||||||
|
|
||||||
import { setCfgScale, setSampler, setSteps, SDState } from '../sd/sdSlice';
|
import { setCfgScale, setSampler, setThreshold, setPerlin, setSteps, SDState } from '../sd/sdSlice';
|
||||||
|
|
||||||
import SDNumberInput from '../../components/SDNumberInput';
|
import SDNumberInput from '../../components/SDNumberInput';
|
||||||
import SDSelect from '../../components/SDSelect';
|
import SDSelect from '../../components/SDSelect';
|
||||||
@ -19,6 +19,8 @@ const sdSelector = createSelector(
|
|||||||
steps: sd.steps,
|
steps: sd.steps,
|
||||||
cfgScale: sd.cfgScale,
|
cfgScale: sd.cfgScale,
|
||||||
sampler: sd.sampler,
|
sampler: sd.sampler,
|
||||||
|
threshold: sd.threshold,
|
||||||
|
perlin: sd.perlin,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -29,7 +31,7 @@ const sdSelector = createSelector(
|
|||||||
);
|
);
|
||||||
|
|
||||||
const SamplerOptions = () => {
|
const SamplerOptions = () => {
|
||||||
const { steps, cfgScale, sampler } = useAppSelector(sdSelector);
|
const { steps, cfgScale, sampler, threshold, perlin } = useAppSelector(sdSelector);
|
||||||
|
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
|
|
||||||
@ -55,6 +57,18 @@ const SamplerOptions = () => {
|
|||||||
onChange={(e) => dispatch(setSampler(e.target.value))}
|
onChange={(e) => dispatch(setSampler(e.target.value))}
|
||||||
validValues={SAMPLERS}
|
validValues={SAMPLERS}
|
||||||
/>
|
/>
|
||||||
|
<SDNumberInput
|
||||||
|
label='Threshold'
|
||||||
|
step={0.1}
|
||||||
|
onChange={(v) => dispatch(setThreshold(Number(v)))}
|
||||||
|
value={threshold}
|
||||||
|
/>
|
||||||
|
<SDNumberInput
|
||||||
|
label='Perlin'
|
||||||
|
step={0.1}
|
||||||
|
onChange={(v) => dispatch(setPerlin(Number(v)))}
|
||||||
|
value={perlin}
|
||||||
|
/>
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -23,6 +23,8 @@ export interface SDState {
|
|||||||
height: number;
|
height: number;
|
||||||
width: number;
|
width: number;
|
||||||
sampler: string;
|
sampler: string;
|
||||||
|
threshold: number;
|
||||||
|
perlin: number;
|
||||||
seed: number;
|
seed: number;
|
||||||
img2imgStrength: number;
|
img2imgStrength: number;
|
||||||
gfpganStrength: number;
|
gfpganStrength: number;
|
||||||
@ -50,6 +52,8 @@ const initialSDState: SDState = {
|
|||||||
height: 512,
|
height: 512,
|
||||||
width: 512,
|
width: 512,
|
||||||
sampler: 'k_lms',
|
sampler: 'k_lms',
|
||||||
|
threshold: 0,
|
||||||
|
perlin: 0,
|
||||||
seed: 0,
|
seed: 0,
|
||||||
seamless: false,
|
seamless: false,
|
||||||
shouldUseInitImage: false,
|
shouldUseInitImage: false,
|
||||||
@ -93,6 +97,12 @@ export const sdSlice = createSlice({
|
|||||||
setCfgScale: (state, action: PayloadAction<number>) => {
|
setCfgScale: (state, action: PayloadAction<number>) => {
|
||||||
state.cfgScale = action.payload;
|
state.cfgScale = action.payload;
|
||||||
},
|
},
|
||||||
|
setThreshold: (state, action: PayloadAction<number>) => {
|
||||||
|
state.threshold = action.payload;
|
||||||
|
},
|
||||||
|
setPerlin: (state, action: PayloadAction<number>) => {
|
||||||
|
state.perlin = action.payload;
|
||||||
|
},
|
||||||
setHeight: (state, action: PayloadAction<number>) => {
|
setHeight: (state, action: PayloadAction<number>) => {
|
||||||
state.height = action.payload;
|
state.height = action.payload;
|
||||||
},
|
},
|
||||||
@ -182,6 +192,8 @@ export const sdSlice = createSlice({
|
|||||||
prompt,
|
prompt,
|
||||||
steps,
|
steps,
|
||||||
cfgScale,
|
cfgScale,
|
||||||
|
threshold,
|
||||||
|
perlin,
|
||||||
height,
|
height,
|
||||||
width,
|
width,
|
||||||
sampler,
|
sampler,
|
||||||
@ -201,6 +213,8 @@ export const sdSlice = createSlice({
|
|||||||
state.prompt = prompt ?? state.prompt;
|
state.prompt = prompt ?? state.prompt;
|
||||||
state.steps = steps || state.steps;
|
state.steps = steps || state.steps;
|
||||||
state.cfgScale = cfgScale || state.cfgScale;
|
state.cfgScale = cfgScale || state.cfgScale;
|
||||||
|
state.threshold = threshold || state.threshold;
|
||||||
|
state.perlin = perlin || state.perlin;
|
||||||
state.width = width || state.width;
|
state.width = width || state.width;
|
||||||
state.height = height || state.height;
|
state.height = height || state.height;
|
||||||
state.sampler = sampler || state.sampler;
|
state.sampler = sampler || state.sampler;
|
||||||
@ -254,6 +268,8 @@ export const {
|
|||||||
setIterations,
|
setIterations,
|
||||||
setSteps,
|
setSteps,
|
||||||
setCfgScale,
|
setCfgScale,
|
||||||
|
setThreshold,
|
||||||
|
setPerlin,
|
||||||
setHeight,
|
setHeight,
|
||||||
setWidth,
|
setWidth,
|
||||||
setSampler,
|
setSampler,
|
||||||
|
Loading…
Reference in New Issue
Block a user