Nodes/Melite Autorig Nodes/๐Ÿ’พ Save Rigged Model
ComfyUI Node

๐Ÿ’พ Save Rigged Model

Save Rigged Model

By JayDataEngineerยทCreated 2 months agoยทUpdated 4 days agoยท 1
๐Ÿ’พ Save Rigged Model
    • rigged_path
    โ—„rigged_pathโ–บ

    Some nodes are glue, and this is the most glue-shaped node in the pack. It takes one string and gives back the same string.

    The reason it exists is a quirk of how ComfyUI decides what to return to the frontend. An auto-rig node can write a fully rigged GLB to disk and still show you nothing, because the backend only serialises results for nodes that declare OUTPUT_NODE = True. The upstream SkinToken rig node writes the file but doesn't set that flag, so its work is invisible - no preview, no output entry, and in some setups the node doesn't even execute unless something downstream pulls on it. SaveRiggedModel sits after it, gets counted as an output, and surfaces the result.

    So: this is the node you put between the rigger and everything else.

    What it actually does

    Two things, and neither is complicated.

    First, it passes rigged_path straight through. Same string out as in. That's the real output, and it's what you wire into KimodoExportFBX or a save/preview node.

    Second, it computes the file's location relative to ComfyUI's output/ directory and hands that to the frontend as a small UI payload - filename, subfolder, type. That's the pattern 3D nodes use to tell the web UI "here's a mesh, go load it from /view". ComfyUI's UI dicts get flattened to a list of keys, which is why the payload is shaped as a list of one dict; that survives the round trip where a bare dict wouldn't.

    Note it does not copy, move, or re-encode anything. The rigged file was already written by the node upstream. Nothing lands on disk from this node at all.

    Inputs and output

    • rigged_path - required STRING, and a wired socket (forceInput), so you connect it rather than type it. Connect the rigger's output.
    • rigged_path - one output, same STRING, same value.

    That's the whole interface. The naming is a little unfortunate: the output has the same name as the input, so when you're scanning a graph it looks like a no-op. It is one, functionally. Think of it as an "emit this to the graph" node.

    Install

    cd /path/to/ComfyUI/custom_nodes
    git clone https://github.com/JayDataEngineer/melite-autorig-nodes.git
    

    Restart, or Manager โ†’ search "melite". No dependencies of its own; it's pure standard library. No Blender, no GPU.

    Where people get burned

    The preview can 404 without an env var. To describe the file to the frontend, the node needs to know where your ComfyUI lives. It reads the COMFYUI_ROOT environment variable and falls back to /root/ComfyUI. If your install is elsewhere and that variable is unset, the computed relative path escapes output/ - the code notices and drops the subfolder rather than emitting something nonsensical, which means the frontend asks for the file at the top level of output/ and gets nothing. Rigger outputs typically live in a subfolder like output/3D/, so the preview silently fails to appear.

    The string output is unaffected - your graph still works, it's only the on-screen mesh that goes missing. If you want the preview:

    export COMFYUI_ROOT=/home/you/ComfyUI
    

    Set it before launching ComfyUI, since the node reads it per-execution but there's no point doing it after the fact.

    Nothing is validated. It's a pass-through, so a bad or empty path flows straight into the next node and fails there, with that node's error message rather than this one's. If you're debugging a "file not found" three nodes downstream, look back here first.

    The 3D preview isn't stock ComfyUI. The three_model UI key is what a frontend viewer listens for; plain ComfyUI won't grow a viewport because of it. If all you get is a string, that's expected - wire the output to a display node or use ComfyUI's core Load3D to look at the file.

    CategoryMelite/AutoRig

    Inputs (1)

    NameTypeDefaultDescription
    rigged_pathSTRINGPath to the rigged GLB/FBX (from SkinTokenRigTrimesh).

    Outputs (1)

    NameTypeDescription
    rigged_pathSTRINGโ€”