SDXL Block Merge (Tensor Prism)
Per-block control without the memory circus
- model_A
- model_B
- model_C
- MODEL
Merging two checkpoints evenly is easy - a weighted average, done. But it's also a blunt instrument: an even blend drags every layer toward the middle, which is why plain merges so often wash out both parents. SDXL Block Merge (Tensor Prism) gives you the surgical version: a per-block interpolation across the whole SDXL UNet, so you can take composition from one model, detail from another, and leave the rest alone.
It's the simpler sibling of the pack's SDXLAdvancedBlockMergeTensorPrism. Same merge methods, same block ratios - just without the GPU-memory management layer. If you're on a decent card and know which block you want to move, this is the cleaner node to reach for.
How it works
Feed in model_A and model_B (plus optional model_C for three-way merges) and choose merge_method:
- Linear Interpolation - the standard weighted blend per block.
- Add Difference - adds a scaled "B minus A" delta, great for grafting one model's flavor onto a base.
- TIES-Merging (Simplified) - resolves sign conflicts before averaging, which reduces the convergence-to-mush problem that plagues naive blends.
default_unet_ratio (0.5) is the baseline for every block, and the optional ratio inputs override it block by block: time_embed_ratio, label_emb_ratio, out_ratio, input_block_00_ratio through input_block_11_ratio, output_block_00_ratio through output_block_11_ratio, and middle_block_00/01/02_ratio. Early input blocks handle overall composition and structure; output blocks carry texture and detail; the middle blocks are where a lot of a model's "character" lives. TIES mode adds ties_global_alpha_A/B to weight each parent, plus rescale_output_magnitudes and a_delta_factor/b_delta_factor for pushing the delta math around.
The only non-block input is memory_limit_gb (default 8) - a loose leash so the node doesn't try to hold everything in VRAM at once. Output is a single MODEL, ready to wire into a KSampler.
The settings that matter
The two things a beginner actually sets: default_unet_ratio and the one or two block ratios you care about. A common pattern is to lock composition from model A by setting the input block ratios low, then let model B carry detail via higher output block ratios. Leave everything else at 0.5 while you learn.
The honest caveat
The author's own dev notes are worth quoting in spirit: he's not sure the block-layer merging still works correctly on ComfyUI 1.6.5+, and suggests doing the block merging with the built-in ModelMergeSDXL if you're on a recent version. This is a young, self-admittedly "vibe-coded" pack (Arctenox's first, built with heavy LLM assistance), so treat that warning seriously - verify your first merge against a known-good reference before trusting the node with anything important.
Installing it
ComfyUI Manager → search "Tensor Prism" → Install, then restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/AstrionX/ComfyUI-Tensor-Prism-Node-Pack
No model files to download; the pack only depends on torch, numpy and psutil, all standard in ComfyUI. Don't copy the clone URL from the README - it's stale and typo'd; use Manager or the URL above.
The trap
Per-block merging rewards restraint. If you set eight ratios to different values on your first try, you won't know which one did what. Change one region at a time, generate, and iterate - that's the whole workflow.
Inputs (41)
| Name | Type | Default | Description |
|---|---|---|---|
| model_A | MODEL | — | |
| model_B | MODEL | — | |
| merge_method | COMBO | 3 options: Linear Interpolation, Add Difference, TIES-Merging (Simplified) | |
| default_unet_ratio | FLOAT | 0.500–1 | — |
| memory_limit_gb | FLOAT | 8.01–64 | — |
| model_Copt | MODEL | — | |
| ties_global_alpha_Aopt | FLOAT | 0.500–1 | — |
| ties_global_alpha_Bopt | FLOAT | 0.500–1 | — |
| rescale_output_magnitudesopt | BOOLEAN | false | — |
| a_delta_factoropt | FLOAT | 1.00-2–2 | — |
| b_delta_factoropt | FLOAT | 1.00-2–2 | — |
| out_ratioopt | FLOAT | 0.500–1 | — |
| time_embed_ratioopt | FLOAT | 0.500–1 | — |
| label_emb_ratioopt | FLOAT | 0.500–1 | — |
| input_block_00_ratioopt | FLOAT | 0.500–1 | — |
| output_block_00_ratioopt | FLOAT | 0.500–1 | — |
| input_block_01_ratioopt | FLOAT | 0.500–1 | — |
| output_block_01_ratioopt | FLOAT | 0.500–1 | — |
| input_block_02_ratioopt | FLOAT | 0.500–1 | — |
| output_block_02_ratioopt | FLOAT | 0.500–1 | — |
| input_block_03_ratioopt | FLOAT | 0.500–1 | — |
| output_block_03_ratioopt | FLOAT | 0.500–1 | — |
| input_block_04_ratioopt | FLOAT | 0.500–1 | — |
| output_block_04_ratioopt | FLOAT | 0.500–1 | — |
| input_block_05_ratioopt | FLOAT | 0.500–1 | — |
| output_block_05_ratioopt | FLOAT | 0.500–1 | — |
| input_block_06_ratioopt | FLOAT | 0.500–1 | — |
| output_block_06_ratioopt | FLOAT | 0.500–1 | — |
| input_block_07_ratioopt | FLOAT | 0.500–1 | — |
| output_block_07_ratioopt | FLOAT | 0.500–1 | — |
| input_block_08_ratioopt | FLOAT | 0.500–1 | — |
| output_block_08_ratioopt | FLOAT | 0.500–1 | — |
| input_block_09_ratioopt | FLOAT | 0.500–1 | — |
| output_block_09_ratioopt | FLOAT | 0.500–1 | — |
| input_block_10_ratioopt | FLOAT | 0.500–1 | — |
| output_block_10_ratioopt | FLOAT | 0.500–1 | — |
| input_block_11_ratioopt | FLOAT | 0.500–1 | — |
| output_block_11_ratioopt | FLOAT | 0.500–1 | — |
| middle_block_00_ratioopt | FLOAT | 0.500–1 | — |
| middle_block_01_ratioopt | FLOAT | 0.500–1 | — |
| middle_block_02_ratioopt | FLOAT | 0.500–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |