Image remove text
Wipe text off an image without loading a single checkpoint
- image
- IMAGE
You've got a render stamped with a "Made with…" watermark, or a screenshot full of captions you want gone. The fashionable 2026 answer is to feed it to Qwen-Image-Edit or Flux Kontext and tell the model to delete the text - which works, and also reinterprets the whole frame while it's at it. This node is the opposite extreme: a one-node text eraser that loads no diffusion model, uses no VRAM worth mentioning, and just finds the text and paints over it. If the background behind the words is plain, it's the fastest thing in the graph.
ImageRemoveText from huwenkai26/comfyui-remove-text is a tiny utility from an equally tiny repo - a handful of files, basically one commit, and a README that is, we'll get to this, not fully accurate. What it does: auto-detect text with DBNet, then fill it in with classical OpenCV inpainting. No API, no key, no 5GB model. The whole detection model is a 3.6MB ONNX file that ships inside the pack.
How it works
The pipeline is short. Your image gets resized so its short side is 960px, then DBNet (a real, paper-grade text-detection model, running through onnxruntime on CPU) finds the text regions and hands back bounding boxes. Each box becomes a white rectangle on a mask, and cv2.inpaint with the Telea algorithm and radius 3 fills those rectangles from the surrounding pixels. The result comes back as an IMAGE tensor at the original resolution.
Two things worth knowing up front. First, it's not generative inpainting - it extrapolates texture from what's around the text, it doesn't invent what was behind the words. Second, the README talks about adjustable short_size and inpaint_radius parameters and batch processing. The shipped node has none of that. The detection scale (960) and the inpaint radius (3) are hardcoded, and the node accepts exactly one image. When you add it and see a bare single-input widget, you're not missing anything - the knobs just never made it into the code.
Inputs and outputs
There's exactly one of each, so this is quick:
- image (IMAGE) - one image, batch size 1. Wire it from LoadImage, or straight off your sampler's VAE decode.
- IMAGE output - the cleaned image, same size, ready for PreviewImage, SaveImage, or another img2img pass.
That's the whole node. If you need to scrub a folder or a video, you'll have to loop it one frame at a time - feeding it a batch throws an exception, README's "supports batch" claim notwithstanding.
Install
Easiest route is ComfyUI Manager - search for "Text Remove Node" or comfyui-remove-text and click install. Manual install is equally boring:
cd ComfyUI/custom_nodes
git clone https://github.com/huwenkai26/comfyui-remove-text
pip install -r requirements.txt
The requirements are onnxruntime, opencv-python, pyclipper, shapely, plus the usual torch/torchvision/Pillow suspects. Restart ComfyUI and you'll find the node under the image category, titled "Image remove text."
No separate model download needed: models/dbnet.onnx is committed to the repository, so it's on disk the moment you clone. The README's "first use may need to download the model" is a leftover - just confirm that file exists and you're set.
Where it falls short
- Batch error - "Only images with batch_size==1 are supported!" is the one error you'll actually see. Split your batch first.
- Rectangular smudges - it removes whole bounding boxes, not glyph outlines, and Telea inpaint only borrows from immediate neighbors. Flat or low-detail backgrounds vanish cleanly; text over grass, fabric, or a face leaves a visible rectangle. That's the moment to reach for proper masked inpainting or an edit model instead.
- CPU-only detection - DBNet runs on
CPUExecutionProviderregardless of your GPU. Fine for a single still; don't build a realtime pipeline on it.
For the narrow job - scrubbing small watermarks and captions off clean images, in one node, zero VRAM, zero downloads - this is genuinely handy. For text sitting on top of stuff that matters, save yourself the smudge and call a modern edit model. Knowing which is which is half the battle, and this node is clearly the "good enough, free, and instant" side.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |