LC Model Merge (any precision)
Merge an fp8 model with a bf16 one without the crash
- model1
- model2
- model
- report
The problem, concretely
You want to merge the fp8 Krealism checkpoint with bf16 Krea 2 Turbo. You wire them into ComfyUI's stock merge node and get:
'Linear' object has no attribute 'weight_scale'
Because the core node patches model2's raw tensors onto model1, and a quantized model hands over packed data plus separate scale keys - and a full-precision model1 has nowhere to put them. Flip the order and it runs, which is worse: the merge happens, then the whole result gets rounded back down to fp8.
This node exists for exactly that gap. It merges two models of the same architecture when they're stored in different precisions - bf16, fp16, fp32, fp8, int8, nvfp4, GGUF, in either order - and the result stays full precision either way.
How it works
Instead of patching raw tensors, it finds the quantized side, decodes it to bf16 first (GPU, layer by layer, using ComfyUI's own dequantizer, or ComfyUI-GGUF's for GGML weights), and makes the full-precision model the base. That single decision is why the output isn't rounded back to a quantized format.
It also skips the scale and quant keys entirely - weight_scale, input_scale, pre_quant_scale, comfy_quant and friends - so it only merges real weights that exist in both models and have matching shapes. Keys are grouped by how much of model2 they get, then each group is applied with ComfyUI's add_patches. Anything with a shape mismatch is counted and skipped rather than silently corrupting the output.
Inputs and outputs
model1 and model2 are your two models, any precision. ratio is 0 for all model1, 1 for all model2, 0.5 for half and half.
The optional block_ratios is the interesting one: a comma list of per-block ratios, block 0 first (Krea 2 and Anima both have 28), with everything outside the numbered blocks still using ratio. That's how you take the low blocks from one model and the high blocks from the other without a whole separate node - though if you want the draggable curve UI, that's what LC Anima Block Merge Advanced is for.
Two outputs: model for your sampler, and report, which is worth actually reading. It tells you what each model was stored as, which one became the base, what the result is, and how many weights merged versus skipped.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/lonecatone23/ComfyUI_LC_ModelBuilder_nodes
Restart. No Python dependencies for this one - it's torch plus ComfyUI core. GGUF is conditional: if one of your models is GGUF, ComfyUI-GGUF needs to be installed and loaded, because the node borrows that pack's dequantizer. If it isn't there you get a clear model has GGUF weights but the ComfyUI-GGUF pack is not loaded instead of a stack trace somewhere in the middle of the merge.
Where people get burned
A merge isn't saved anywhere until you save it. This node patches a model in memory; restart ComfyUI and it's gone. Feed the model output into LC Diffusion Model Save (same pack) if you want to keep it.
Two quantized models will merge, but the result comes back in model1's format - if model1 was fp8, you've added rounding on top of rounding and the report says so. Same story if you merge a GGUF into a GGUF. For the cleanest result, keep at least one side full precision.
Very different architectures fail loudly: if fewer than half the weights match by name and shape, you get an error telling you to check that model1 and model2 are the same architecture. Merging an Anima into a Krea 2 is not a subtle-precision problem, and it won't pretend to be.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model1 | MODEL | Any precision: bf16, fp16, fp32, fp8, int8, nvfp4 or GGUF. | |
| model2 | MODEL | Same architecture as model1, any precision. | |
| ratio | FLOAT | 0.500–1 | 0 = all model1, 1 = all model2, 0.5 = half and half. |
| block_ratiosopt | STRING | Optional per-block ratios for models with numbered blocks (Krea 2 has 28): comma list, block 0 first, same scale as ratio. Layers outside the blocks use ratio. Empty = ratio everywhere. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| report | STRING | — |