Nodes/ComfyUI-TrellisMac/Load TrellisMac Pipeline
ComfyUI Node

Load TrellisMac Pipeline

The Node That Downloads 16GB Before You've Done Anything

By dmvvilela·Created 2 months ago·Updated 2 months ago· 1
Load TrellisMac Pipeline
    • pipeline
    model_pathmicrosoft/TRELLIS.2-4B
    reloadfalse
    trellis_mac_path

    TrellisMacLoader is the front door to the only clean path I've seen for running Microsoft's TRELLIS.2 image-to-3D on an Apple Silicon Mac. Wire its pipeline output into the Generate node, hit Queue, and the first time through it quietly pulls down ~16 GB of model weights. The second run is instant, because it caches the loaded pipeline for the whole ComfyUI session. That's the whole point of it: pay the download once, never think about it again.

    Why this node has to exist at all: the mainstream ComfyUI-Trellis2 pack is CUDA-hardcoded. It imports cumesh, nvdiffrast, pymeshlab at the top level and calls .cuda() everywhere, so on a Mac it just dies. The standing community verdict for a long time was "TRELLIS isn't a good fit for Apple Silicon, full stop." This pack works around that by wrapping trellis-mac, a separate repo that carries TRELLIS.2's Metal backends and patched pipeline - and this loader is where all of that gets stitched into ComfyUI.

    How it works. Three jobs, in order. First it locates your trellis-mac checkout, trying TRELLIS_MAC_PATH (env var), then config.json written next to the plugin, then a heuristic that walks up the directory tree looking for a sibling trellis-mac/. Then it configures the attention and convolution backends for MPS - SDPA attention, flex_gemm conv with a none fallback - using runtime setters rather than env vars, because ComfyUI imports torch before any node code runs and env-var timing would be too late. Finally it loads microsoft/TRELLIS.2-4B from HuggingFace and moves it to MPS.

    The inputs that matter. Three fields:

    • model_path - defaults to microsoft/TRELLIS.2-4B. Leave it unless you've downloaded the weights to a local folder.
    • reload - set to true to force a fresh load and clear the session cache. Useful after you change something and want to re-test, but you'll rarely need it.
    • trellis_mac_path - optional, and the one you'll actually touch. Fill it in once and it persists to config.json, so you can forget the env var.

    Output: pipeline, a TRELLIS_PIPELINE socket that only plugs into the Generate node. If you find yourself staring at it, that's working as intended.

    Installing. The honest version: this is a two-repo setup, not a one-click. First get trellis-mac running on its own:

    git clone https://github.com/shivampkumar/trellis-mac
    cd trellis-mac && ./setup.sh
    

    Then get the pack into custom_nodes/ (clone or symlink) and run its installer with the same Python that launches ComfyUI - not trellis-mac's own venv, which often lacks ComfyUI deps like SQLAlchemy:

    /path/to/ComfyUI/.venv/bin/python custom_nodes/ComfyUI-TrellisMac/install.py \
      --trellis-mac /path/to/trellis-mac
    

    Two gated HuggingFace models, facebook/dinov3-vitl16-pretrain-lvd1689m and briaai/RMBG-2.0, need you to accept their licenses and run hf auth login before the download - skip that and the loader dies at load time with an auth error. And ComfyUI has to start with PYTORCH_ENABLE_MPS_FALLBACK=1, which the included launch_comfy_trellis.command handles for you (or launchctl setenv PYTORCH_ENABLE_MPS_FALLBACK 1 before you reopen ComfyUI).

    Where people get burned. The classic is "Could not locate trellis-mac" - that's path resolution failing, so set the env var or type the path into the node. "Nodes don't show up in ComfyUI" means an import error in the startup log, almost always a missing package; rerun install.py with the right Python and check the log. And that first 16 GB pull isn't a hang - it's the model. Give it a long coffee, then it's cached.

    CategoryTrellisMac

    Inputs (3)

    NameTypeDefaultDescription
    model_pathSTRINGmicrosoft/TRELLIS.2-4B
    reloadBOOLEANfalse
    trellis_mac_pathoptSTRING

    Outputs (1)

    NameTypeDescription
    pipelineTRELLIS_PIPELINE