Mesh Delete Loose
Sweeps up floating vertices and dangling edges nobody's using
- BPY_OBJ
- BPY_OBJ
This is a hygiene node, not a shaping one - it doesn't change the visible silhouette of a healthy mesh at all. Mesh_Delete_Loose wraps bpy.ops.mesh.delete_loose, and unlike Mesh_Delete, it doesn't act on your current selection - it scans the whole mesh for geometry that isn't actually connected to anything useful and removes it.
How it works
"Loose" geometry is stuff that isn't doing any structural work: a vertex with no edges attached, an edge with no face attached, or (rarer) a face genuinely isolated from the rest of the mesh. This kind of debris tends to show up after boolean operations, remeshing, or generation steps that don't guarantee clean output - exactly the kind of pipeline Avatar Graph's segmentation-to-mesh flow runs. Running this operator strips it out without touching any geometry that's actually part of the connected, visible shape.
The inputs and outputs that matter
BPY_OBJ(optional) - the mesh to clean up.use_verts(defaulttrue) - remove loose vertices (ones with no edges connected at all).use_edges(defaulttrue) - remove loose edges (ones with no face using them).use_faces(defaultfalse) - remove loose faces, off by default since a genuinely isolated face is rare and this is the one category most likely to be an intentional part of a mesh rather than debris.
Output is a single BPY_OBJ, with whichever categories you enabled swept clean.
How to install it
Search Avatar Graph in ComfyUI Manager, or clone manually:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui
python -m pip install -r requirements.txt
then restart. bpy==3.6.0 needs Python 3.10.x - README's prebuilt Python-3.10 zip on Windows, dedicated conda environment (conda create --name comfyui python=3.10) on Mac/Linux. opencv-python, mediapipe, and segment-anything also install.
Common issues & troubleshooting
Nothing seems to get removed, even on a mesh you're sure has stray bits. Check which of use_verts / use_edges / use_faces are actually enabled for your call - use_faces is off by default, so an isolated face-only fragment survives unless you explicitly turn it on.
Geometry you wanted to keep disappeared. This is unlikely if the mesh is genuinely well-formed, but if you had truly isolated, single vertices placed deliberately (a marker point, a reference location) with no edges attached, use_verts will remove them along with actual debris - there's no way to distinguish "intentional loose vertex" from "leftover junk" at the operator level, so keep that in mind if your workflow uses bare vertices as markers.
Worth running as a standard step after generation-heavy nodes. If your graph builds meshes from segmented image regions or runs boolean-style operations, this is a cheap, low-risk node to run right after - it won't touch connected geometry, so there's little downside to including it as a routine cleanup pass before anything more destructive (like a dissolve or a decimate) runs on the result.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| use_vertsopt | BOOLEAN | true | — |
| use_edgesopt | BOOLEAN | true | — |
| use_facesopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |