Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Inpaint: Clear takes the red off the canvas

Claude76e207fc1f2f
diff --git a/src/components/layers/tools.tsx b/src/components/layers/tools.tsx
index c0af2b31..ac7f13c0 100644
--- a/src/components/layers/tools.tsx
+++ b/src/components/layers/tools.tsx
@@ -924,10 +924,10 @@ function InpaintTool() {
return () => clearTimeout(t);
}, [paint, paintVersion]);
+ // A fresh canvas, not the old one wiped: the stage keeps its red copy per canvas and stroke count.
const clear = () => {
if (!paint) return;
- paint.canvas.getContext("2d")!.clearRect(0, 0, paint.canvas.width, paint.canvas.height);
- setPaint({ ...paint });
+ setPaint({ ...paint, canvas: blankCanvas(paint.canvas.width, paint.canvas.height)[0] });
setPainted(null);
};