Nodes/IF_Trellis/Trellis Model Loader 💾
ComfyUI Node Runs on cloud

Trellis Model Loader 💾

Loading TRELLIS Without Fighting the Backend

By if-ai·Created 2 years ago·Updated about a year ago· 451
Trellis Model Loader 💾
    • model
    model_name
    dinov2_modeldinov2_vitl14_reg
    use_fp16true
    attn_backendflash_attn
    sparse_backendspconv
    spconv_algoimplicit_gemm
    smooth_ktrue

    This node does exactly one job, and it's the job nobody wants to do twice: build the TRELLIS image-to-3D pipeline and hand it to the node that actually generates. There's no API, no key, no secret sauce - it downloads the model on first run, sets up the attention and sparse backends, and passes a ready-to-go pipeline through its single output. If you've ever wired a UNETLoader into an KSampler, you already know the shape of this relationship.

    It's the first thing in any IF_Trellis workflow. The IF_TrellisImageTo3D node needs a TRELLIS_MODEL on its model input, and this loader is the only thing that produces one. Wire the loader's model output straight across and you're done - the pack's bundled example workflows (single and multi) are wired exactly like that.

    The first run is the one that surprises people. The loader checks models/checkpoints/TRELLIS-image-large, and if it's not there it pulls the whole JeffreyXiang/TRELLIS-image-large repo from Hugging Face plus the DINOv2 image encoder (dinov2_vitl14_reg). That's a multi-gigabyte download with no progress bar in the ComfyUI graph - the node just sits there. Go make a coffee.

    The inputs that matter, in order of how much you'll touch them:

    • attn_backend - the attention implementation. The dropdown only lists backends actually installed on your machine (the node queries what's there), with flash_attn as default when it's available. If it isn't, you'll see xformers or sdpa, and both are fine. The loader also falls back to sdpa with a console warning if your pick fails to initialize - it's graceful, not fatal.
    • use_fp16 - default on, and on an 8GB card you want it on. It halves the model's memory footprint for a negligible quality hit on this kind of generation.
    • spconv_algo - implicit_gemm is default and, per the tooltip, slower but more robust. If you hit sparse-convolution errors, this is the setting to blame first; native or auto are there if you want to experiment.
    • sparse_backend - spconv, the only option that ships with the pack. Leave it.
    • smooth_k - only relevant if you're somehow on the sage attention backend. Ignore it otherwise.

    Its install story is the same heavy one that defines this pack: git clone --recurse-submodules (the submodules are mandatory), a micromamba environment, Visual Studio Build Tools on Windows, CUDA 12.4, and a pile of compiled dependencies (nvdiffrast, diffoctreerast, kaolin, spconv, SageAttention). Windows is the tested path; the Linux requirements file exists but the README is candid that it's not battle-tested. The portable ComfyUI embedded Python is explicitly unsupported, and you want an NVIDIA GPU with at least 8GB of VRAM. If the pack installed, this node just works - its whole job is to be the part you don't think about.

    If you see "failed to set backend, falling back" warnings, that's this node being defensive, not broken - check which backends actually compiled and pick from what's in the dropdown. And if the model download dies partway, clear the partial models/checkpoints/TRELLIS-image-large folder before retrying, or the loader can get confused by a half-written repo. Otherwise: load, wire, generate.

    CategoryImpactFrames💥🎞️/Trellis

    Inputs (7)

    NameTypeDefaultDescription
    model_nameCOMBO1 options: TRELLIS-image-large
    dinov2_modelCOMBOdinov2_vitl14_regSelect which Dinov2 model to use.
    use_fp16BOOLEANtrue
    attn_backendCOMBOflash_attnSelect attention backend.
    sparse_backendCOMBOspconvSelect sparse backend.
    spconv_algoCOMBOimplicit_gemmSpconv algorithm. 'implicit_gemm' is slower but more robust.
    smooth_kBOOLEANtrueSmooth-k for SageAttention. Only relevant if attn_backend=sage.

    Outputs (1)

    NameTypeDescription
    modelTRELLIS_MODEL