Nodes/ComfyUI-MorphGS/MorphGS: Preprocess Character
ComfyUI Node

MorphGS: Preprocess Character

Your Rigged Character, in the One Format MorphGS Will Actually Read

By Yuvaraj0739X·Created 3 days ago·Updated about 21 hours ago· 0
MorphGS: Preprocess Character
    • character_name
    • log
    character_source_path
    character_namemy_character
    target_height1.6
    force_reprocessfalse

    MorphGS does video-to-4D motion transfer: you hand it a rigged character and a clip of someone (or something) moving, it learns that motion and renders your character performing it as gaussian splats. This node is step one of that pipeline, and it's the step you can't skip or fake - MorphGS will not read your .fbx and neither will ComfyUI, so something has to convert a normal rigged mesh into MorphGS's odd two-file character format. That's this node.

    What it's actually doing

    The pack is a wrapper, not a reimplementation. MorphGS needs its own pinned torch/CUDA build plus compiled CUDA extensions, which is exactly the situation docs/knowledge/comfyui-ecosystem.md describes as ComfyUI's root operational problem: custom nodes all install into one environment and there is no isolation. This pack sidesteps that entirely by never importing MorphGS - every node shells out as a subprocess into a separate conda/venv install. Its own requirements.txt is two lines, numpy and opencv-python. The CUDA misery lives in the MorphGS environment where it belongs.

    Inside that subprocess, the node does two things.

    First, conversion. If character_source_path ends in .fbx, .glb or .gltf, the file is copied into the pipeline as demo/characters/<character_name>/_source.<ext> and then run through a headless Blender script that writes mesh.obj plus rigging/mesh_ori_rig.txt - a RigNet-format rig carrying joints, root, hierarchy and per-vertex skin weights. That file is a full rig, not just a skeleton, which is why downstream nodes can rebuild an armature from nothing but it.

    Second, preprocessing. MorphGS's own preprocess_tgt.py renders a 360-view ring of the character and extracts DINOv2 features into <character_name>/feature/. Those features are what training compares renders against, so this is genuinely required work, not a cache you can skip.

    The inputs that matter

    character_source_path is a bare text field, not a file picker, so paste an absolute path that the ComfyUI process itself can read. Anything Blender can import with an armature and a skinned mesh works - Mixamo exports, SkinTokens/TokenRig .glb output, your own Blender rig.

    character_name is the identity key for the whole rest of the graph. It becomes a directory name and gets baked into the experiment name <scene>_to_<character>, so keep it boring - lowercase, underscores. If you rename it, you're a stranger to every stage downstream.

    target_height is the only real tuning knob, and it's in metres. The Blender script measures your mesh and applies scale_fix = target_height / measured_height rather than assuming a fixed cm-to-m conversion (different exporters bake that differently, which is why so many converter scripts are silently 100x wrong). Set it to your subject's real-world height: 1.6 for a human, something lower for a dog or a child. MorphGS normalises the scene, so consistency matters more than the exact number.

    force_reprocess does what it says - re-runs the Blender conversion and feature extraction even though the outputs already exist.

    Two outputs: character_name, wire it into Train & Render, and log, which is worth actually reading. It contains the measured height and the applied scale factor, and that line is how you catch a mesh that came in at 180 units tall.

    Installing it

    Through ComfyUI Manager, search ComfyUI-MorphGS and restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Yuvaraj0739X/ComfyUI-MorphGS
    

    Then set your environment before launching ComfyUI - the defaults assume MorphGS lives at /workspace/MorphGS in a conda env called morphgs:

    export MORPHGS_HOME=/workspace/MorphGS
    export MORPHGS_CONDA_ENV=morphgs
    export MORPHGS_CONDA_BASE=/opt/conda
    export MORPHGS_BLENDER_BIN=blender
    

    Blender 4.2+ has to be on PATH (the same install ComfyUI-SkinTokens' headless Blender server uses, so one Blender serves both packs). DINOv2 comes down automatically via torch.hub on first run, so that first preprocessing pass needs network access - unlike the video path, there's nothing to download here.

    Where people get burned

    No armature, no luck. The conversion script grabs the first mesh object and the first armature object in the file. A .glb with geometry but no skeleton fails inside Blender rather than giving you a friendly node error - the pack surfaces the subprocess output verbatim, so read it.

    The failure mode you won't see. Some AI-generated meshes carry small disconnected components - unwelded accessories, stray geometry. Their Laplacian blocks go degenerate and crash MorphGS's Cholesky-based skinning smoothing later on. The converter welds near-coincident vertices and drops anything under 50 verts, which is why chunky generated meshes often just work here.

    A note on caching. Every node in this pack skips a stage whose outputs already exist, and every node is also an OUTPUT_NODE - which is the fix for a real ComfyUI trap: queue a node with nothing consuming its output and the execution engine prunes it, so nothing happens at all. Here you can queue this node alone while you're still wiring up the graph. If you want it to redo work anyway, tick force_reprocess.

    CategoryMorphGS

    Inputs (4)

    NameTypeDefaultDescription
    character_source_pathSTRING
    character_nameSTRINGmy_character
    target_heightFLOAT1.60.1–10
    force_reprocessBOOLEANfalse

    Outputs (2)

    NameTypeDescription
    character_nameSTRING
    logSTRING