Intelligent Tensor Selector (Tensor Prism)
Per-tensor picking instead of per-block averaging
- model_A
- model_B
- model_C
- model_D
- merged_model
- selection_report
Block merges work at the level of whole layers: this input block from A, that output block from B. Intelligent Tensor Selector (Tensor Prism) goes one level finer - it judges each individual tensor and picks whichever model's version is "better" by a scoring function, then stitches a model together from the winning tensors. Think of it as a merge that's allowed to disagree with itself layer by layer.
That fineness is the appeal and the risk. Tensor-level selection can preserve detail that a block-level average would smear away - but it can also produce internal inconsistencies, because the model never agreed to be assembled this way. It's the kind of tool you reach for when a regular merge looks washed out and you want to keep the best of both without the mud.
How it works
Wire in model_A and model_B (optional model_C / model_D for four-way). Pick a selection_mode:
best_quality(default) - the strictest picker; takes the top-scoring tensor per position.balanced- softer, blends near-ties.conservative- only replaces a tensor when the other model clearly wins; keeps A's version by default.aggressive- replaces more freely, chasing detail over consistency.
Then set the scoring weights, each with an author-provided tooltip: magnitude_weight (0.3, "Weight for tensor magnitude (strength)"), variance_weight (0.25, "Weight for tensor variance (detail preservation)"), spectral_weight (0.25, "Weight for spectral content (frequency richness)"), stability_weight (0.2, "Weight for numerical stability"). Higher magnitude pulls toward strong weights; higher variance pulls toward detailed weights; higher stability pulls toward safe ones.
Three bias dials shape the outcome without changing the scoring math: model_A_bias (-1 to +1, "Bias toward Model A"), attention_preference and output_preference (both ±0.5) which nudge extra weight toward attention layers and output layers respectively. enable_block_analysis (on) and memory_efficient (on) control how much work happens per block and how hard it tries to save VRAM.
Outputs: merged_model (MODEL) for your KSampler, and selection_report (STRING) - a plain-text play-by-play of which model won which tensor. Read the report; it's the only way to learn whether the "intelligence" is doing what you think.
The settings that matter
Beginners should leave the four weights alone and just switch selection_mode between best_quality and balanced - that's most of the value. Reach for model_A_bias when one model keeps stealing the merge; reach for attention_preference when you specifically want one parent's attention behavior to win.
Installing it
Part of ComfyUI-Tensor-Prism-Node-Pack. ComfyUI Manager → search "Tensor Prism" → Install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/AstrionX/ComfyUI-Tensor-Prism-Node-Pack
No model downloads; deps are torch, numpy, psutil. Ignore the typo'd clone URL in the README.
The honest caveat
This is one of the pack's most experimental nodes, and the pack itself is a first-time author's "vibe-coded" effort with no community track record worth citing. Tensor-level selection can give you gorgeous, detailed hybrids - and it can give you a model that renders beautifully for one prompt and falls apart on the next. Always A/B it against a plain block merge of the same two models before committing, and treat conservative mode as the sensible default when the result matters.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| model_A | MODEL | — | |
| model_B | MODEL | — | |
| selection_mode | COMBO | best_quality | 4 options: best_quality, balanced, conservative, aggressive |
| magnitude_weight | FLOAT | 0.300–2 | Weight for tensor magnitude (strength) |
| variance_weight | FLOAT | 0.250–2 | Weight for tensor variance (detail preservation) |
| spectral_weight | FLOAT | 0.250–2 | Weight for spectral content (frequency richness) |
| stability_weight | FLOAT | 0.200–2 | Weight for numerical stability |
| model_A_bias | FLOAT | 0.00-1–1 | Bias toward Model A (-1 = strong B preference, +1 = strong A preference) |
| attention_preference | FLOAT | 0.00-0.5–0.5 | Extra weight for attention layers |
| output_preference | FLOAT | 0.00-0.5–0.5 | Extra weight for output layers |
| model_Copt | MODEL | — | |
| model_Dopt | MODEL | — | |
| enable_block_analysisopt | BOOLEAN | true | — |
| memory_efficientopt | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| merged_model | MODEL | — |
| selection_report | STRING | — |