Image Inpainting Studio
Mark a small damaged or unwanted area with a brush, eraser or exact numeric rectangle. A pinned OpenCV LaMa ONNX model predicts replacement pixels using surrounding image context. The result copies the original and replaces RGB only at selected mask pixels. This is reconstruction, unlike blurring a region or removing a background.
Key features
- Brush and erase a mask, or specify a precise rectangle by keyboard
- Pin and SHA-256-check the licensed OpenCV LaMa model before running it
- Reconstruct marked RGB pixels from image context while copying all unmarked RGBA bytes exactly
- Compare original and result, export result/mask/original PNG, cancel a run and restore the original
- Show empty/oversized/lost mask, download, integrity, runtime and inference failures explicitly
How to use
- Upload an opaque PNG, JPEG or WebP under 15 MB and 2.25 megapixels, or load the built-in example.
- Brush the small area to repair, erase mistakes or add a mask rectangle with numeric fields.
- Click Repair to download and verify the model, then wait for local WebAssembly inference.
- Review the result against the original. Save the PNG or restore the original and revise the mask.
Use cases
- Rebuild a small scratch across a textured wall
- Remove a tiny unwanted mark from a photograph
- Repair a narrow damaged area without changing pixels elsewhere
Frequently asked questions
Will the original photo be uploaded?
No. Only the model binary and WebAssembly runtime are fetched. The photo, mask and result are processed in browser memory and are not uploaded by this tool.
Why is the first run slow or unavailable offline?
The first click downloads the roughly 92.6 MB ONNX model and ONNX WebAssembly runtime. Download, initialization and inference time depend on connection and device memory. The tool does not promise offline first use.
Are pixels outside the mask unchanged?
Yes. The output begins as a byte-for-byte copy of the original RGBA image; only RGB channels inside the thresholded original mask are replaced. Existing alpha bytes are retained.
Will it perfectly restore any object or image size?
No. The model sees a 512 × 512 letterboxed preview, so large photos and complex/large masks lose detail. Masks covering over 20% of the image are rejected, and the result should be inspected before use.
What happens if the model fails or I cancel?
An error or cancellation stops the run and leaves the original untouched. You can retry or save the original. No blur or color fill is substituted as a fake repair.
Privacy
Your photo and mask stay in this browser; they are never posted to this site or the model host. After you click Repair, the browser downloads a 92.6 MB model from Hugging Face and an ONNX WebAssembly runtime from jsDelivr, verifies the model SHA-256, and runs it locally. The first repair needs network access; offline first use is unavailable.
Comments & questions