feat(gui): add LPW flag to model settings
This commit is contained in:
parent
fb376c6b62
commit
c47209cfbf
|
@ -26,6 +26,11 @@ export interface ModelParams {
|
|||
* The correction model to use.
|
||||
*/
|
||||
correction: string;
|
||||
|
||||
/**
|
||||
* Use the long prompt weighting pipeline.
|
||||
*/
|
||||
lpw: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -285,6 +290,7 @@ export function appendModelToURL(url: URL, params: ModelParams) {
|
|||
url.searchParams.append('platform', params.platform);
|
||||
url.searchParams.append('upscaling', params.upscaling);
|
||||
url.searchParams.append('correction', params.correction);
|
||||
url.searchParams.append('lpw', String(params.lpw));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { mustExist } from '@apextoaster/js-utils';
|
||||
import { Stack } from '@mui/material';
|
||||
import { Checkbox, FormControlLabel, Stack } from '@mui/material';
|
||||
import * as React from 'react';
|
||||
import { useContext } from 'react';
|
||||
import { useQuery } from 'react-query';
|
||||
|
@ -84,6 +84,17 @@ export function ModelControl() {
|
|||
});
|
||||
}}
|
||||
/>
|
||||
|
||||
<FormControlLabel
|
||||
label='Long Prompt Weighting'
|
||||
control={<Checkbox
|
||||
checked={params.lpw}
|
||||
value='check'
|
||||
onChange={(event) => {
|
||||
setModel({
|
||||
lpw: params.lpw === false,
|
||||
});
|
||||
}}
|
||||
/>}
|
||||
/>
|
||||
</Stack>;
|
||||
}
|
||||
|
|
|
@ -426,6 +426,7 @@ export function createStateSlices(server: ServerParams) {
|
|||
platform: server.platform.default,
|
||||
upscaling: server.upscaling.default,
|
||||
correction: server.correction.default,
|
||||
lpw: false,
|
||||
},
|
||||
setModel(params) {
|
||||
set((prev) => ({
|
||||
|
|
Loading…
Reference in New Issue