_.without
Strip unwanted values out of a list
- py_list
- values
- LIST
_.without is the "get these out of here" node. It returns a copy of an array with every instance of the values you name removed. Prompt tags you never want to ship? Filenames that shouldn't reach the saver? Give _.without the list and a blacklist, and it hands back a clean copy.
It's a member of the auto-generated ovum/underscore family in comfy-ovum, sfinktah's grab-bag pack. Family disclaimer, stated plainly in the README: the underscore nodes are "an absolute disaster to use in production," WIP, not recommended for live workflows. _.without is a low-risk one - it makes a copy, so it won't mutate your source list - but the generic * inputs mean you should double-check what you're feeding it.
How it works
Underscore semantics: scan the input array, drop any element that equals one of the given values, keep everything else in order, return a new list. It doesn't touch the original. The node wraps underscore3, the vendored Python port of Underscore.js, in the standard generated shell - same chain behavior as its siblings: pass a _.CHAIN to continue a pipeline, pass a plain list to get the result directly.
Inputs and output
py_list- the array to filter (type*, optional; also accepts a_.CHAIN).values- the values to remove. Like other vararg inputs in this family, the tooltip tells you to provide multiple values as a JSON array:["low quality", "blurry"]. A single string is a single value, not a comma list - that's the classic gotcha here.- Output:
LIST.
Install
Manager: search comfy-ovum, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum
Restart. No model downloads; underscore3 ships inside the repo, so nothing extra to install.
When it's the right tool
Any time you're assembling a tag list from multiple sources and want to enforce a small blacklist - drop the negative prompt tags that snuck into a positive, filter out a couple of file paths before a batch op, remove a known-bad seed from a list. For anything more structured (matching on keys rather than whole values), _.where is the better fit. And remember: it's a copy-returning filter, so your upstream list stays intact for anything else that reads it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| py_listopt | * | Primary input object (expected array). You can still pass any JSON-serializable value. Also accepts _.CHAIN to continue chaining. | |
| valuesopt | * | values: JSON allowed for arrays/objects where applicable. For multiple values, provide a JSON array (e.g., [1,2,3]). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LIST | LIST | — |