Smart Model Advisor (LMSL / TDS SDK)
A Second Opinion on the Checkpoint You Just Picked
- verdict
- advice
- report
Every "will this fit?" question in ComfyUI gets answered the same way: you load the model, hit Queue, and find out. If it fits, great. If it doesn't, you get an OOM traceback, or worse, a snail-paced run where half the weights live in system RAM. Smart Model Advisor is an attempt to answer that question before the run, in text, inside the graph.
Fair warning up front, because it decides whether this node is useful to you: it's a thin front end onto a separate thing called the TDS SDK. Without that SDK, the node loads, executes, and tells you nothing.
What it's for
The pack it ships in - lmsl-smart-offload - is mostly about memory scheduling: deciding which model to evict when VRAM runs out. The Advisor is the other half of that problem, because scheduling only helps if the model you picked can run at all. On 12GB cards, model choice is where most of the pain lives: SDXL is comfortable, fp8 Flux is marginal, video models only at reduced resolution - and once you add a text encoder as a second budget, "it's 12GB of weights" stops predicting anything.
So the Advisor takes the filename you typed into a loader, looks it up in a catalog of your local weights plus a hardware-aware feasibility match, and hands back a judgment plus, when it's worried, a few same-family alternatives.
How it works
On startup the pack probes in a background thread: it imports tds.sdk from a sibling custom_nodes/TDS checkout (or whatever TDS_ROOT points at), calls the SDK's setup engine once - VRAM probe, weight scan, feasibility matching - and caches the result. If it fails, the pack degrades to pure scheduling and logs why.
When the Advisor executes, it reduces your input to a basename and looks it up in that cached index. The statuses you'll see:
- ok - estimated to fit within budget. Pass.
- tight - fits, small headroom. This is the warning state worth reading.
- offload - bigger than your VRAM but inside "VRAM + half your RAM", so it will run with heavy offloading, just slowly. Deliberately not counted as a warning.
- oom - past even the offload ceiling. This is the one that produces substitute suggestions.
- unknown / untracked - the entry exists but its size wasn't parsed, or the file isn't in the catalog at all. Both pass silently, and
untrackedis not an endorsement.
The inputs and outputs
Two inputs, and only one you have to think about.
model_name(required, text) - the exact filename, e.g.wan2.1_t2v_14B_fp8_e4m3fn.safetensors. Basename matching, so directories don't matter, but the filename does. Copy it straight from the loader's dropdown.limit(1–10, default 3) - how many substitute suggestions to return.
The outputs are all strings, which surprises people: verdict, advice, report. verdict is the machine-friendly one - pass, warn, or pending - and it's what you'd wire into logic or a conditional if you were building something automated. advice is the human-readable block: model name, status, domain, estimated footprint and headroom in MB, the reason, and a numbered substitute list. report is the same query as raw JSON, for when you want to feed it somewhere else.
None of them touch your model loader. This node reports; it doesn't select - the pattern is a Preview Text node next to your loader, read the advice, change the dropdown yourself.
Installing it
Same pack as the scheduler, no Python dependencies:
cd ComfyUI/custom_nodes
git clone https://github.com/mxh678988/lmsl-smart-offload
Then, if you want the Advisor to say anything interesting, the SDK it bridges to has to exist:
ls ComfyUI/custom_nodes/TDS/tds/config.py # this file is what the bridge probes for
# or point it somewhere else:
export TDS_ROOT=/path/to/your/TDS/checkout
Restart ComfyUI. The log line SDK 探测结束 state=ready is your green light; state=failed means it found no SDK and every query will come back pending.
Where it bites
The empty answer. If advice says the SDK isn't ready, don't debug the node - debug the bridge: check the path, check LMSL_SDK_BRIDGE isn't 0, check the startup log. The English README never mentions this dependency; only the Chinese one inside lmsl_smart_offload/ does, which is a great way to lose twenty minutes.
untracked means "no opinion". A file the catalog doesn't know about passes - honest engineering, not a fit guarantee. If you just downloaded something obscure, the Advisor has nothing to say.
It always re-runs. Both of this pack's query nodes return float("NaN") from IS_CHANGED, the standard ComfyUI idiom for "never cache me." Correct for a live query, but an always-dirty node can drag the cache behind it - keep it on a side branch, not mid sampling chain.
Cross-check it once. With no community reports on this pack at all, treat the numbers as estimates from your own hardware profile. If one disagrees with what a run actually does, trust the run. You can also query without a graph: GET /lmsl_sdk/advise?model=<filename>&limit=3 returns the same JSON.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | STRING | — | |
| limitopt | INT | 31–10 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| verdict | STRING | — |
| advice | STRING | — |
| report | STRING | — |