fix(gui): default mask brush to white/full replacement
This commit is contained in:
parent
4a6458d8f6
commit
63758b0e21
|
@ -160,8 +160,8 @@ export function Inpaint(props: InpaintProps) {
|
|||
const [clicks, setClicks] = useState<Array<Point>>([]);
|
||||
|
||||
const [painting, setPainting] = useState(false);
|
||||
const [brushColor, setBrushColor] = useState(0);
|
||||
const [brushSize, setBrushSize] = useState(DEFAULT_BRUSH);
|
||||
const [brushColor, setBrushColor] = useState(DEFAULT_BRUSH.color);
|
||||
const [brushSize, setBrushSize] = useState(DEFAULT_BRUSH.size);
|
||||
|
||||
const [mask, setMask] = useState<File>();
|
||||
const [source, setSource] = useState<File>();
|
||||
|
|
|
@ -4,7 +4,7 @@ import * as React from 'react';
|
|||
import { useQuery } from 'react-query';
|
||||
|
||||
import { ApiClient } from '../api/client.js';
|
||||
import { Config, ConfigParams, STALE_TIME } from '../config.js';
|
||||
import { ConfigParams, STALE_TIME } from '../config.js';
|
||||
import { MODEL_LABELS, PLATFORM_LABELS } from '../strings.js';
|
||||
import { Img2Img } from './Img2Img.js';
|
||||
import { Inpaint } from './Inpaint.js';
|
||||
|
|
|
@ -34,10 +34,11 @@ export interface Config {
|
|||
};
|
||||
}
|
||||
|
||||
export const DEFAULT_BRUSH = 8;
|
||||
export const DEFAULT_BRUSH = {
|
||||
color: 255,
|
||||
size: 8,
|
||||
};
|
||||
export const IMAGE_FILTER = '.bmp, .jpg, .jpeg, .png';
|
||||
export const IMAGE_STEP = 8;
|
||||
export const IMAGE_MAX = 512;
|
||||
export const STALE_TIME = 3_000;
|
||||
|
||||
export async function loadConfig(): Promise<Config> {
|
||||
|
|
Loading…
Reference in New Issue