diff --git a/gui/src/components/Inpaint.tsx b/gui/src/components/Inpaint.tsx index b3c2d633..6f50c67e 100644 --- a/gui/src/components/Inpaint.tsx +++ b/gui/src/components/Inpaint.tsx @@ -160,8 +160,8 @@ export function Inpaint(props: InpaintProps) { const [clicks, setClicks] = useState>([]); 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(); const [source, setSource] = useState(); diff --git a/gui/src/components/OnnxWeb.tsx b/gui/src/components/OnnxWeb.tsx index 24331e1b..382a07b4 100644 --- a/gui/src/components/OnnxWeb.tsx +++ b/gui/src/components/OnnxWeb.tsx @@ -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'; diff --git a/gui/src/config.ts b/gui/src/config.ts index f2d7f2e7..8ad9a6db 100644 --- a/gui/src/config.ts +++ b/gui/src/config.ts @@ -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 {