1
0
Fork 0

fix(gui): default mask brush to white/full replacement

This commit is contained in:
Sean Sube 2023-01-09 23:26:01 -06:00
parent 4a6458d8f6
commit 63758b0e21
3 changed files with 7 additions and 6 deletions

View File

@ -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>();

View 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';

View File

@ -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> {