UR Remove Prompt Builder
The name is a lie — this node removes nothing, it writes your prompts
- segmentation_prompt
- remove_positive_prompt
- remove_negative_prompt
Read the name carefully: this node does not remove anything. It's a prompt formatter. Give it a description of the thing you want gone, and it hands back three ready-made prompt strings aimed at different stages of a remove pipeline. No model runs, no API is called, nothing is deleted. It's the pack's way of keeping prompt phrasing consistent so you don't have to remember what a segmentation model expects versus what an inpaint model expects.
That might sound underwhelming, but it's genuinely the right shape for this pack. UniversalRemove deliberately ships no detector and no segmenter - the author's stated design boundary is that finding the target is a detection/segmentation problem that should stay pluggable. This node is the glue that makes your own text-to-mask model and your own inpaint model agree on the words.
How it works
Pure string templating, and the source is short enough to read in one sitting. You feed in what you're removing, and it composes three outputs:
- segmentation_prompt - just your target, verbatim. This goes to whatever text-prompted segmenter you use (a Grounded SAM-style setup, a SAM node with text prompts, whatever outputs a
MASK). The idea is that the same phrase that selects the object gets reused downstream. - remove_positive_prompt - a sentence built around "Remove {target} from the masked region," plus extra clauses depending on your settings.
- remove_negative_prompt - the builder's baked-in denylist: artifacts, ghosting, duplicate subject, warped anatomy, broken perspective, extra text, watermark, subtitle, logo, blur, low quality, plus anything you add.
The inputs that matter
Three of them do the real work:
- target_prompt - the object to remove. Default is
object to remove, which is a great way to produce a useless prompt if you forget to change it. - fill_mode - how the model should think about what goes behind the removed thing.
background_reconstructasks for a plausible background,clean_platewants a clean plate matching the surrounding scene,direct_replacejust wants visually coherent content. Pick based on whether you're erasing a watermark (clean plate) or a person (background reconstruct). - masked_edit_only - on by default, and it matters more than people expect. It appends "only modify the masked region and keep unmasked content unchanged" to the positive prompt. The whole reason masked editing still exists in the age of instruction-editing models is bit-identical unmasked pixels; this is that philosophy as a prompt clause.
scene_hint, preserve_prompt, and extra_negative_prompt are optional context slots. Scene hint describes the environment ("night city street") so the reconstruction has something to match; preserve is for things like "keep the lighting and camera framing."
Wiring it up
- segmentation_prompt → your text-segmentation node →
MASK→ UR Mask Processor / UR Keyframe Prep. - remove_positive_prompt and remove_negative_prompt → the text encoder of your keyframe inpaint/edit model.
Common issues
The trap is expecting agency from a string. People wire this up, run, and wonder why nothing got removed - because the removal happens downstream in your inpaint model, not here. Second, remember the segmentation prompt and the remove prompt are consumed by different models, so don't paste the same string into both. And third: that baked-in negative list is opinionated. It's tuned for object removal and it's mostly fine, but if your model already has strong negatives you might find it redundant rather than harmful. It's a convenience, not a doctrine.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| target_prompt | STRING | object to remove | — |
| scene_hint | STRING | — | |
| preserve_prompt | STRING | — | |
| extra_negative_prompt | STRING | — | |
| fill_mode | COMBO | 3 options: background_reconstruct, clean_plate, direct_replace | |
| masked_edit_only | BOOLEAN | true | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| segmentation_prompt | STRING | — |
| remove_positive_prompt | STRING | — |
| remove_negative_prompt | STRING | — |