LSNet Artist Tags → Features
Artist Names In, One 2048-Dimensional Direction Out
- model
- features
- feature_text
- report
This is the inverse of the more obvious node in the pack: instead of turning a style vector into artist names, it turns artist names into a 2048-dim vector you can compute with.
Where you'd reach for it:
- Does the classifier even know this artist? Feed one name, look at the report.
- Mix styles as directions instead of stacked prompt weights - sum two artist directions and re-classify.
- Round-trip sanity checks. The author measured 30/30 top-1 hits taking random artist names to vectors and back to names.
- Seed the pack's genetic-algorithm workflow - it evolves a vector population from one starting point.
No image anywhere in the graph - which is the point when the artist you're chasing has ten posts on Danbooru and no LoRA.
How it works
The classifier head is a linear layer over 39261 artist classes, so it owns a weight row per class. This node folds the head's BatchNorm into that matrix (head.fuse() in eval mode), picks the row for the class you named, scales it by the weight you wrote, and sums. What comes out is the weight direction of the class in the classifier - a cheap, deterministic stand-in for that artist's style.
Name matching is forgiving in a way that matters in practice. First it looks for an exact class name; if that misses, it compares normalized forms - spaces, underscores, parentheses, bracket escapes and case are all stripped. So bbul horn, bbul_horn and huhi \(huhi 1211\) all land on the same artist. The report says which path was used (exact or normalized).
Inputs and outputs
Two inputs, both required:
- tag_string - one or more lines. Three accepted shapes:
a, b, weighted(a:0.8), (b:0.2), or prompt-style names with escaped parens. Duplicate names merge rather than double-count. - model - the
LSNET_MODELhandle fromLSNet Model Loader(LSNet 2.0 /lsnet1.0.8 only).
Outputs:
- features - a
(2048,)float32 tensor. Wire it into Vector Math to blend, or straight into LSNet Features → Artist Tags to read it back as names. - feature_text - the full serialized vector, no ellipsis, paste it into a text node if you want to inspect it.
- report - JSON with per-tag
class_id,matched,weight,found, plusfeature_dim. This is the output to read when something returns nothing useful.
The one thing to internalise
This is a probe direction, not a class centroid. The author measured it: the weight row norm is about 207, a real image feature norm is about 49, and their cosine similarity is roughly −0.002 - essentially orthogonal. So:
- ✅ Round-tripping tags → vector → tags, blending several artist directions, asking "which way is this artist" - all fine.
- ❌ Adding it to an image's feature vector, cosine-comparing it against image features, or treating it as "what this artist's output looks like on average." The numbers say it isn't.
Second caveat, same family: weights are honoured literally, so (a:2.0) doubles the vector's magnitude as well as its contribution. The classifier head is only trustworthy around ‖f‖ ≈ 25–100, so a heavy weight can shove your vector out of the reliable band and you'll get nonsense back. If you need the scale of a real image, rescale in Vector Math with normalize(V0) * norm(V1) - same direction, borrowed magnitude.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/let-the-name-be-x1/Computational-LSNet.git
# restart ComfyUI; the nodes appear under category "Computational LSNet"
No pip dependencies - the pack ships an intentionally empty requirements.txt and declares dependencies = [] in pyproject.toml, so installing it won't drag a fresh torch over your CUDA build. Easier still: search Computational LSNet in Manager (or comfy node install computational-lsnet once it's in the Registry).
What you do need: spawner1145/comfyui-kaloscope on its legacy branch (Manager's lsnet 1.0.8, the 2.0 line) and the checkpoint files in models/lsnet/kaloscope2.0/ - best_checkpoint.pth (≈2.94 GB), class_mapping.csv, config.json. A wrong class_mapping.csv shows up here first, as a pile of "found": false.
Troubleshooting
You get a zero vector and a report full of "found": false. Nothing matched. The report flags each name you sent, so you can see which one failed - usually a typo, an artist the classifier was never trained on, or the wrong class_mapping.csv.
The model port won't connect. You're on Kaloscope 3.0. Its loader emits a KALOSCOPE_MODEL handle, and this pack checks for LSNET_MODEL; 3.0 also changed the head geometry (1536-dim input, no BatchNorm to fold), so there's no compatible conversion. Install the legacy branch / lsnet 1.0.8 and restart.
One honest framing: because these vectors are directions rather than centroids, treat this node as a question - "is this artist in here, and which way does the classifier point when I say their name" - not as a style. The blending people actually want happens downstream, in Vector Math.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| tag_string | STRING | — | |
| model | LSNET_MODEL | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| features | TENSOR | — |
| feature_text | STRING | — |
| report | STRING | — |