Skip to content

Remove an object

Turn object removal on, accept the model licence, and pick a backend in ~/.krites/config.yaml:

remove:
  enabled: true
  accept_licence_risk: true   # read the licence note first; removal won't run without it
  backend: lama               # or: migan

Then erase a distraction (a stray guest, a bin, an exit sign) by inpainting a box you draw around it. The removal is a record you can undo; the original is untouched, and the fill is baked into pixels only on export. The studio's Object removal settings leaf sets the same three things.

Choose a backend

  • lama (the default) is the reference-quality eraser.
  • migan is a fast, tiny (28 MB) alternative.

On first use krites fetches the backend's pinned model and checks it against a digest compiled into krites, fetches the ONNX Runtime library, then runs the model on your machine. There's no runtime to install or path to set. The macOS app carries the runtime inside it, and every other build fetches it from the signed artefact channel; see the config reference.

Read the licence before you turn it on

Both models were trained on Places2, whose licence for derived weights is unsettled. They're fine for private use; read the licence note before you distribute anything commercially. That is why accept_licence_risk exists, and why removal refuses to run while it's false.

In the studio, open the frame in the loupe, pick the Remove object tool, and draw a box around the thing to erase. krites shows the inpainted result as a preview; Accept keeps it, Redraw lets you draw the box again, and Cancel drops it. Accepted removals persist across reloads.

Remove from the CLI

Name the frame and the region as a rectangle in fractions of the frame, x,y,w,h, each between 0 and 1, with the origin at the top left:

krites remove IMG_2043.CR2 --region 0.30,0.25,0.20,0.40 \
  --shoot ~/Pictures/smith-wedding

Undo it, along with any other edit on the frame:

krites reset frame IMG_2043.CR2 --shoot ~/Pictures/smith-wedding

reset frame also clears the frame's verdict, so re-cull or set a verdict before you next export.

Notes

  • Removals are applied first when export renders a frame (object removals, then straighten, then crop, then the look), so the fill is levelled, cropped and graded along with everything else.
  • Lightroom's XMP can't represent a removal, so a removal exists only in krites' own export.

Full detail: the remove command reference and the configuration reference.