ComfyUI Node

Object Eraser

The clean way to delete things from a photo

By Runware·Created 2 years ago·Updated about a month ago· 140
Object Eraser
  • image
  • mask
  • advancedFeatures.watermark.image
  • image
positivePrompt
seed0
steps4
CFGScale1.00
numberResults1
advancedFeaturesfalse
advancedFeatures.watermark.bgColor
advancedFeatures.watermark.displayPosition(default)
advancedFeatures.watermark.fontColor
advancedFeatures.watermark.opacityfalse
advancedFeatures.watermark.opacity_value0.10
advancedFeatures.watermark.text
safetyfalse
safety.checkContentfalse
ttlfalse
ttl_value60
outputFormatJPG
outputQuality95

Watermark on a stock photo. Tourists in the background. A power line slicing the sky. The classic fix is masked inpainting - tell the model what to regenerate and it fills the gap. Object Eraser is that, purpose-built and cloud-hosted: you paint over the thing you want gone, and the model regenerates that region to match its surroundings. It's the node you'll reach for constantly once you know it exists.

How it works

An imageInference node running an eraser model on Runware's cloud. Two required inputs:

  • image (IMAGE) - the source photo.
  • mask (IMAGE) - what to remove. Important: it's an IMAGE, not the MASK type. Your mask should be an image where the object is marked. Use a hand-drawn mask node, a MediaPipe region mask from this same pack, or convert an existing MASK with core MaskToImage.

The widget knobs are minimal because the model is tuned to erase, not to interpret: steps is locked low (default 4, max 5) - eraser models are fast and don't want a long denoise; CFGScale (default 1, range 1–10) controls prompt adherence; positivePrompt is optional but useful ("remove the reflection" or "clean sky"); seed and numberResults (up to 20!) give you retries and variants. There's a safety toggle (with safety.checkContent) if you want the content check, plus outputFormat/outputQuality for the file side.

Output is an image - the cleaned photo. Everything outside your mask should come back bit-identical, which is the whole value: the eraser rebuilds only the masked region, exactly the strength of masked inpainting that the KB's notes hammer home - instruction-editing models change the whole frame; this one leaves the rest alone.

Install

Part of ComfyUI-Runware:

cd ComfyUI/custom_nodes
git clone https://github.com/Runware/ComfyUI-Runware
pip install -r ComfyUI-Runware/requirements.txt

Restart (or ComfyUI Manager → search "Runware"). No local model files - it's all cloud-side. You need a Runware API key: Settings → Runware API key, RUNWARE_API_KEY, or runware auth login.

Gotchas

Pay-per-run; the title bar shows cost and a NSFW flag. Where people get burned: painting too little (leaving a fringe of the object) or too much (forcing the model to invent a big region, which gets blurry). Paint generously around the object but not past it. And the mask-is-IMAGE gotcha again - a MASK-typed socket won't plug straight in. On the plus side, numberResults up to 20 means a bad erase is cheap to retry; just don't run all 20 by accident and then check the title-bar bill.

CategoryRunware/Image/runware

Inputs (21)

NameTypeDefaultDescription
imageIMAGE
maskIMAGE
advancedFeatures.watermark.imageoptIMAGE
positivePromptoptSTRINGText prompt describing elements to include in the generated output.
seedoptINT00–9223372036854776000Random seed for reproducible generation. When not provided, a random seed is generated in the unsigned 32-bit range.
stepsoptINT41–5Total number of denoising steps. Higher values generally produce more detailed results but take longer.
CFGScaleoptFLOAT1.001–10Guidance scale representing how closely the output will resemble the prompt. Higher values produce results more aligned with the prompt.
numberResultsoptINT11–20Number of results to generate. Each result uses a different seed, producing variations of the same parameters.
advancedFeaturesoptBOOLEANfalseEnable to set advancedFeatures. Off uses the model's default.
advancedFeatures.watermark.bgColoroptSTRINGBackground color in hex format.
advancedFeatures.watermark.displayPositionoptCOMBO(default)Watermark position.
advancedFeatures.watermark.fontColoroptSTRINGText color in hex format.
advancedFeatures.watermark.opacityoptBOOLEANfalseEnable to set advancedFeatures.watermark.opacity. Off uses the model's default.
advancedFeatures.watermark.opacity_valueoptFLOAT0.100.1–1Watermark opacity.
advancedFeatures.watermark.textoptSTRINGWatermark text.
safetyoptBOOLEANfalseEnable to set safety. Off uses the model's default.
safety.checkContentoptBOOLEANfalseEnable or disable content safety checking.
ttloptBOOLEANfalseEnable to set ttl. Off uses the model's default.
ttl_valueoptINT60Time-to-live (TTL) in seconds for generated content. Only applies when `outputType` is `URL`.
outputFormatoptCOMBOJPGFile format for the generated image.
outputQualityoptINT9520–99Compression quality of the output. Higher values preserve quality but increase file size.

Outputs (1)

NameTypeDescription
imageIMAGE