feat: enhance Comfy API handling and add tests for branded non-Z diffusion models
This commit is contained in:
@@ -106,7 +106,7 @@ function matches(data: ImageData, pixel: number, key: number[], tolerance: numbe
|
||||
}
|
||||
|
||||
function postProcessSelection(selected: Uint8Array, width: number, height: number, settings: EditorState["tools"]["magicWand"]) {
|
||||
let next = selectionToMaskValues(selected);
|
||||
let next: Uint8ClampedArray = selectionToMaskValues(selected);
|
||||
const despeckle = Math.round(Math.max(0, Math.min(20, settings.despeckle)));
|
||||
const choke = Math.round(Math.max(-20, Math.min(20, settings.choke)));
|
||||
const feather = Math.round(Math.max(0, Math.min(20, settings.feather)));
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { Dispatch } from "@commands/dispatcher";
|
||||
import { commandIds } from "@commands/ids";
|
||||
|
||||
export function useCanvasResize(canvasRef: RefObject<HTMLCanvasElement | null>, dispatch: Dispatch) {
|
||||
const lastSize = useRef<{ w: number; h: number }>();
|
||||
const lastSize = useRef<{ w: number; h: number } | undefined>(undefined);
|
||||
|
||||
useEffect(() => {
|
||||
const canvas = canvasRef.current;
|
||||
|
||||
Reference in New Issue
Block a user