ExportGLTF
The terminal node that actually writes your avatar to disk
- bpy_objects
- blendshapes
Every Avatar Graph workflow that produces something you can actually open in Blender, a game engine, or a browser-based viewer ends at this node. Everything upstream - segmenting a face, building flat mesh layers with bpy (Blender's Python API running headless inside ComfyUI), rigging shape keys, wiring them into the Shape Flow runtime - is scene-building. ExportGLTF is the one that calls Blender's own export_scene.gltf operator and writes a real file to your ComfyUI output folder. It's marked as an output node, meaning it terminates a branch of the graph rather than passing anything further along.
The inputs that matter
bpy_objects(BPY_OBJS, required) - the object or objects to export. This has to be a group type, not a single object; if you only have one mesh, you'll need something upstream (likeGroup Ops) to wrap it into aBPY_OBJSlist first.filename(STRING, default"out") - no extension, the node appends one for you based onmodel_type.model_type(enum:GLB/GLTF_EMBEDDED) -GLBis the compact single binary file, the one you want for most downstream use (game engines, most viewers).GLTF_EMBEDDEDis a single.gltfJSON file with the binary data base64-encoded inline - still one file, just text-based and larger; useful if you need to inspect or hand-edit the JSON.write_mode(enum:Overwrite/Increment) - this one actually matters for your workflow:Overwritereplacesfilename.exton every run,Incrementappends a counter (filename_0.ext,filename_1.ext, …) so repeated runs pile up instead of clobbering each other. If you're iterating on shape keys and want to compare exports side by side, switch to Increment - Overwrite will quietly erase your last attempt.blendshapes(optional, typeblendshapes) - wire inExportBlendshapes' output here if you need the exported morph targets to line up with names your Shape Flow graph references at runtime. Skip it and you just get the raw geometry.
There's no meaningful output socket to wire elsewhere - this is where the graph ends. The file lands in ComfyUI's standard output directory under the name you gave it.
How to install it
Via ComfyUI Manager: search "Avatar Graph," install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui
pip install -r requirements.txt
The hard requirement: bpy==3.6.0 in requirements.txt only builds on Python 3.10.x. Nothing else works. Windows users get Avatech's own bundled Python 3.10 ComfyUI zip in the README; Mac/Linux users should build a dedicated conda env (conda create --name comfyui python=3.10) rather than trying to shoehorn it into an existing 3.11/3.12 install. The requirements file also pulls segment-anything, mediapipe, and opencv-contrib-python - a heavier, slower install than most custom node packs.
Common issues & troubleshooting
"Operator bpy.ops.export_scene.gltf poll() failed" or similar. Under the hood this is Blender doing the export, and Blender's own export operator needs a valid, selected mesh object - if bpy_objects is empty or contains something that isn't actually mesh geometry (a leftover empty, a broken object from an earlier step), the export will fail with a Blender-flavored error rather than a ComfyUI one.
Can't find the exported file. It's written under ComfyUI's output/ directory, named <filename>.<ext> (or <filename>_N.<ext> under Increment mode) - not wherever your workflow's other outputs land if you've customized paths elsewhere.
Nothing happens visually. ExportGLTF writes a file; it doesn't render a live preview by itself. The live avatar preview in Avatech's own web viewer (editor.avatech.ai) is a separate integration that needs ComfyUI started with --enable-cors-header - without that flag you still get a working glTF/GLB file, you just don't get the in-browser live view.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| bpy_objects | BPY_OBJS | — | |
| filename | STRING | out | — |
| model_type | COMBO | 2 options: GLB, GLTF_EMBEDDED | |
| write_mode | COMBO | 2 options: Overwrite, Increment | |
| blendshapesopt | blendshapes | — |
Outputs (0)
No outputs