ComfyUI Node

Load NLF

The robust body estimator's loader — fast, but GPU-only and hands-free

By ameliacode·Created 5 months ago·Updated 2 months ago· 5
Load NLF
  • smplx_model
  • model
model_sourcelocal
model_path/tmp/ComfyUI/models/nlf
hf_token
deviceauto

Load NLF is the front door to the "Body: NLF" path of this pack. NLF - Neural Localizer Fields, NeurIPS 2024, from the isarandi/nlf repo - is the estimator you reach for when you want a robust single-image body and global pose without much fuss. The loader is a small node: it grabs the weights, hands you an NLF_MODEL, and you feed that into the Body: NLF estimator node.

One honest caveat up front: NLF's released model is SMPL-only, not SMPL-X. So this pipeline gives you a neutral-shape SMPL-X body with flat hands and no face. That's not a bug - the pack handles it by letting you graft dedicated hand and face estimates on top (WiLoR for hands, SMIRK for expression). If you want everything in one pass, Multi-HMR does that; NLF is the "I care about the body, I'll add hands/face if I need them" option.

What you set

Same shape as every loader in this pack:

  • model_source - local (default) or huggingface.
  • model_path - for local, the folder holding the weights: ComfyUI/models/nlf/. It expects nlf_l_multi_0.3.2.torchscript, a single TorchScript file you grab from the isarandi/nlf releases (CC-BY-NC).
  • hf_token - only if you point model_source at a gated HF repo.
  • smplx_model - this is the one to get right. NLF predicts body pose, but to produce SMPL-X geometry it needs the body model, so you must wire in the smplx_model output from Load SMPLx. No Load SMPLx, no Load NLF.
  • device - auto / cuda / cpu. Here's the catch the README calls out: NLF is GPU-only. device=auto will pick your GPU and if that's not an option this estimator won't run. Multi-HMR, by contrast, tolerates CPU. So if you're on a CPU-only box, this isn't your path.

Output is a single model connection (type NLF_MODEL) that goes into Body: NLF.

Installing

The pack install is the same as every node in it - ComfyUI Manager (search SMPLx Estimator) or the manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/ameliacode/ComfyUI-SMPLx-Estimator.git
cd ComfyUI-SMPLx-Estimator
pip install -r requirements.txt
python install.py

Then restart. install.py clones the NLF source into vendor/ automatically - it's loaded by path, so you don't pip-install it separately. What you do need to fetch by hand is the .torchscript weight (and the SMPL-X .npz, which is registration-walled at smpl-x.is.tue.mpg.de - see the Load SMPLx article, it bites everyone once).

Gotchas

  • Don't confuse vendor and weights. If you see the NLF source cloned but Body: NLF still errors, you almost certainly forgot nlf_l_multi_0.3.2.torchscript in models/nlf/. The loader raises a FileNotFoundError telling you exactly which file and where.
  • Flat hands are the default. The "Body: NLF → flat hands" thing surprises people. It's inherent to NLF being SMPL-only; the pack expects you to either pose hands in the editor or wire a Hand: WiLoR result into the estimator's smplx_hands.
  • Heavy deps land regardless. pip install -r requirements.txt pulls the whole pack's dependency set (torch, opencv, scipy, plus einops, roma, ultralytics, timm and friends for the other estimators) even if you only use NLF. Nothing to do about it; just know the first install is chunky.

If you have a GPU and want a dependable body estimate that you'll then finish by hand (or with WiLoR/SMIRK), this loader + Body: NLF is a solid, boring choice. Just don't come for it with a CPU-only box.

CategorySMPLx Estimator/loaders

Inputs (5)

NameTypeDefaultDescription
model_sourceCOMBOlocal2 options: local, huggingface
model_pathSTRING/tmp/ComfyUI/models/nlflocal: folder holding the weight file(s). huggingface: leave model_path; set hf_token for gated/private repos.
hf_tokenSTRINGHuggingFace access token.
smplx_modelSMPLX_MODEL
deviceCOMBOauto3 options: auto, cuda, cpu

Outputs (1)

NameTypeDescription
modelNLF_MODEL