LayerUtility: Load SmolLM2 Model(Advance)
A tiny local LLM loader for when you don't want an API key
- smolLM2_model
Most of the text-generation nodes in LayerStyle Advance lean on somebody else's API - Gemini, Zhipu, DeepSeek. This one doesn't. LoadSmolLM2Model loads HuggingFace's SmolLM2 straight onto your own GPU (or CPU), no key, no account, no network call at runtime. The trade-off is right there in the name: "Smol." These are 135M-to-1.7B parameter models, tiny enough to run on hardware that would choke on a real 7B+ LLM, and the quality reflects that. You're not getting GPT-4-tier prompt writing out of this - you're getting "good enough for a quick caption tweak or a simple text task, entirely offline."
This is purely a loader. It doesn't generate anything itself - it hands a loaded model object to the companion SmolLM2 node (elsewhere in the pack), which is where you actually set a system/user prompt and get text back.
What it's for
Think of it as the "no cloud dependency" option in a pack that's otherwise heavily API-node-flavored. If you're building a workflow you want to keep fully local - no api_key.ini, no rate limits, no sending your image or prompt to a third party - this is one of the few text-generation paths in LayerStyle Advance that qualifies. It's also just lighter: even the 1.7B variant is small next to most local LLMs people run for prompt work.
The inputs that matter
Three required fields, all dropdowns:
model- pick the size:SmolLM2-135M-Instruct,SmolLM2-360M-Instruct, orSmolLM2-1.7B-Instruct. Bigger means better coherence and more VRAM/RAM. If you're just testing the pipeline, start with 135M; if you actually want usable output, the 1.7B is the one worth the download.dtype-bf16orfp32. Usebf16unless you're on hardware that doesn't support it well; it's roughly half the memory for output that's indistinguishable in practice for a model this small.device-cudaorcpu. Given the sizes involved, CPU is actually a realistic option here if you don't want to spend VRAM on it.
Output is a single smolLM2_model (type SmolLM2_MODEL) - wire it into the SmolLM2 node's model input.
Installing it
Same pack, same steps as everything else in LayerStyle Advance: search "ComfyUI Layer Style Advance" in ComfyUI Manager and install, or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_LayerStyle_Advance.git
then restart ComfyUI and run the plugin's install_requirements.bat (portable) or install requirements.txt yourself. The pack was split off from the original ComfyUI_LayerStyle specifically because these dependency-heavy nodes needed isolating - so if you already have plain LayerStyle installed, this is a separate, additional install, not a variant of it.
The model file itself isn't bundled. Download at least one SmolLM2 size from the author's HuggingFace repo (chflame163/ComfyUI_LayerStyle, under ComfyUI/models/smol) or the linked BaiduNetdisk mirror, and copy the folder into ComfyUI/models/smol. You only need to grab the size(s) you actually plan to use - no reason to download all three.
Common issues
Empty dropdown / node errors on load. This almost always means nothing's in ComfyUI/models/smol yet. The node doesn't auto-download; you have to place the model folder yourself before it'll show up as selectable.
Output reads as gibberish or ignores your prompt. That's the model being what it is - a sub-2B instruct model isn't going to reason hard about a complex prompt. If you're consistently disappointed, that's a real signal to switch to one of the pack's API-backed nodes (ZhipuGLM4V or a Gemini node both have real free tiers) rather than fighting SmolLM2 for quality it can't give you.
Import errors mentioning transformers or tensorflow. LayerStyle Advance's dependency stack has a known failure mode where a stale or conflicting transformers/tensorflow install breaks the whole node pack's import, not just this node - the fix is usually repair_dependency.bat in the plugin folder, or reinstalling requirements.txt fresh.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | 3 options: SmolLM2-135M-Instruct, SmolLM2-360M-Instruct, SmolLM2-1.7B-Instruct | |
| dtype | COMBO | 2 options: bf16, fp32 | |
| device | COMBO | 2 options: cuda, cpu |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| smolLM2_model | SmolLM2_MODEL | — |