Mesh Edge Collapse
Zip a strip of edges shut
- BPY_OBJ
- BPY_OBJ
If you've ever hit Ctrl+X on a selected edge in Blender to squash it down to a single point, you already know this node. Mesh Edge Collapse is a straight wrapper around Blender's edge_collapse operator: whatever edges are currently selected on the mesh get merged, edge by edge, down to one vertex each. Select a whole strip and the strip zips shut into a line of points instead of a band of geometry.
It's a blunt instrument, and that's the point. Where a manual vertex merge asks you to pick a target point, edge collapse just eats the whole selected span in one pass - handy for cleaning up junk topology that came out of an automated step (like the pack's own mesh-from-image-layer generation) where you'd rather nuke a messy strip than hand-fix every vertex.
Where this fits in Avatar Graph
Avatar Graph, from Avatech AI, is a ComfyUI extension for building 2.5D interactive avatars: segment a character image with its SAM node, turn each segment into a mesh, rig blink/mouth movement with shape keys, and drive the result live through Avatech's own web viewer. The README's documented node table covers the high-level steps - Segmentation, Create Mesh Layer, Mesh Modify Shape Key, Avatar Main Output - but it never mentions Mesh Edge Collapse or its nineteen siblings by name. That's because these aren't hand-written pack nodes; the repo's dev docs describe a generate_blender_types.py script that regenerates Blender operator bindings, and the naming here (Mesh_EdgeCollapse ↔ bpy.ops.mesh.edge_collapse) matches that 1:1. You're really looking at a slice of Blender's own Edit Mode toolkit, exposed raw inside a ComfyUI graph for anyone who needs to hand-repair mesh topology the packaged nodes don't cover.
Inputs and outputs
The schema is about as minimal as it gets: one optional BPY_OBJ in, one BPY_OBJ out. No numeric knobs at all. That's because this node doesn't need to be told what to collapse - the mesh object it receives already carries its Blender selection state (whichever edges are currently highlighted, the same orange-selected state you'd see in Edit Mode), set upstream by whatever selection or generation step ran before it. Wire the output straight into the next mesh-editing node, or into Avatar Main Output if this is the last topology fix before export.
Installing Avatar Graph
Fastest path is ComfyUI Manager - search "Avatar Graph" and install. Manually, it's cd ComfyUI/custom_nodes && git clone https://github.com/avatechai/avatar-graph-comfyui then, inside that folder, python -m pip install -r requirements.txt and a restart. (The README's own manual-install snippet actually points at a different org, avatechgg, for the git clone - use the canonical avatechai URL above; the pack listing and everything else in the repo agrees with that one.)
The real gotcha is Python version, not the node pack itself: bpy, Blender's Python API, only ships wheels for specific Python builds, and this pack needs 3.10.x. If you're on a newer ComfyUI portable install with Python 3.11/3.12, bpy will fail to install or import. Conda is the path of least resistance on Mac/Linux (conda create --name comfyui python=3.10); on Windows the author ships a whole prebuilt ComfyUI + Python 3.10 zip specifically because of this constraint, rather than expecting you to retrofit an existing install.
After install, restart with python main.py --enable-cors-header (add --force-fp16 on Mac) - that flag is what lets the live avatar preview talk to Avatech's hosted editor. Skip it and ComfyUI still runs fine; you just lose the real-time viewer and have to right-click Avatar Main Output → Save to pull a .glb/.gltf manually.
Common issues
No model downloads are involved here - the pack's dependency is bpy itself, plus the CORS-enabled launch flag for the live preview channel. The README carries its own upfront warning that "nodes and demo templates" are still actively changing, which is a fair explanation for why a node like this ships with zero built-in description.
The one thing worth double-checking before you blame the node: since it acts purely on selection state inherited from upstream, an empty or wrong selection means edge collapse quietly does nothing (or collapses the wrong strip). If your topology isn't changing, check what actually got selected further up the graph before assuming this node is broken.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |