Nodes/h4_Live/h4 - Model Merger
ComfyUI Node

h4 - Model Merger

Mad science, but on the canvas

By m3rr·Created 9 months ago·Updated 10 days ago· 1
h4 - Model Merger
  • model_override_1
  • clip_override_1
  • vae_override_1
  • model_override_2
  • clip_override_2
  • vae_override_2
  • model_override_3
  • clip_override_3
  • vae_override_3
  • model_override_4
  • clip_override_4
  • vae_override_4
  • MODEL
  • CLIP
  • VAE
  • TEST_LATENT
  • TEST_IMAGE
model_count2
settingsfalse
memory_managertrue
testing_modefalse
interpolation_modeSymmetric Average
clip_sourceMerged
vae_sourceModel 1
ckpt_1
ckpt_2
ckpt_3
ckpt_4
test_seed0
test_steps20
test_cfg8.00
test_samplereuler
test_schedulernormal
test_width512
test_height512
decode_test_imagefalse
test_promptmasterpiece, best quality, a beautiful landscape
w_11.00
m1_in_001.00
m1_in_011.00
m1_in_021.00
m1_in_031.00
m1_in_041.00
m1_in_051.00
m1_in_061.00
m1_in_071.00
m1_in_081.00
m1_in_091.00
m1_in_101.00
m1_in_111.00
m1_mid1.00
m1_out_001.00
m1_out_011.00
m1_out_021.00
m1_out_031.00
m1_out_041.00
m1_out_051.00
m1_out_061.00
m1_out_071.00
m1_out_081.00
m1_out_091.00
m1_out_101.00
m1_out_111.00
w_21.00
m2_in_001.00
m2_in_011.00
m2_in_021.00
m2_in_031.00
m2_in_041.00
m2_in_051.00
m2_in_061.00
m2_in_071.00
m2_in_081.00
m2_in_091.00
m2_in_101.00
m2_in_111.00
m2_mid1.00
m2_out_001.00
m2_out_011.00
m2_out_021.00
m2_out_031.00
m2_out_041.00
m2_out_051.00
m2_out_061.00
m2_out_071.00
m2_out_081.00
m2_out_091.00
m2_out_101.00
m2_out_111.00
w_31.00
m3_in_001.00
m3_in_011.00
m3_in_021.00
m3_in_031.00
m3_in_041.00
m3_in_051.00
m3_in_061.00
m3_in_071.00
m3_in_081.00
m3_in_091.00
m3_in_101.00
m3_in_111.00
m3_mid1.00
m3_out_001.00
m3_out_011.00
m3_out_021.00
m3_out_031.00
m3_out_041.00
m3_out_051.00
m3_out_061.00
m3_out_071.00
m3_out_081.00
m3_out_091.00
m3_out_101.00
m3_out_111.00

Model merging is how you get a checkpoint that's "this base, but with the anatomy of that one and the colors of a third." It's the classic mad-science move, and it normally means a separate script or an external app. The h4 - Model Merger drags the whole lab onto your canvas: blend 2–3 checkpoints, tune individual UNet blocks, pick where the CLIP and VAE come from, and even fire a test generation inside the node to see if your frankenstein holds together - all before you save anything.

It's one of the heavyweight nodes in h4_Live, and one of the few that feels like a real tool rather than a gimmick.

How it works

Under the hood it's ComfyUI's standard checkpoint merging, wrapped in a friendlier shell. Load your checkpoints (or feed live MODEL/CLIP/VAE overrides from other nodes), pick an interpolation mode, and the node blends tensors and patches the result into a working MODEL/CLIP/VAE triple. The "mad science drawer" (settings toggle) reveals per-block weights: every model gets 12 input blocks, a middle block, and 12 output blocks, plus a global w_N multiplier. That granularity matters because lower input blocks steer composition while higher output blocks steer texture and finish - the classic block-importance split, just exposed as 100+ sliders.

The memory_manager toggle is the practical hero: it loads, merges, and unloads models one at a time to keep VRAM usage low instead of holding three checkpoints in memory. Leave it on unless you're testing something specific.

The inputs that matter

  • model_count - 2 or 3 models in the pot.
  • interpolation_mode - Weighted Average, Symmetric Average, Add Difference, Subtract, Add. Symmetric Average is the safe default (weighted blend normalized by total).
  • clip_source / vae_source - decide whether the merged checkpoint keeps its own CLIP/VAE or takes Model 1/2/3's. Checkpoints aren't always self-contained, so this is where you fix a merge that "works" but produces garbage text.
  • testing_mode - flips the node into running a small generation using test_prompt, test_seed, test_steps, test_cfg, test_sampler, test_width, etc. decode_test_image off skips the VAE decode and hands you the raw latent instead - faster if you just want a vibe check.

The outputs

MODEL, CLIP, VAE - feed these straight into a KSampler (or into H4_ModelSave to write the merge to disk). When testing mode is on you also get TEST_LATENT and TEST_IMAGE so the results land somewhere you can look at them.

Installing it

It ships in h4_Live:

cd ComfyUI/custom_nodes
git clone https://github.com/m3rr/h4_Live
# restart ComfyUI

or ComfyUI Manager → search "h4_Live." No extra dependencies beyond what ComfyUI already has.

Where it can bite you

Merging is easy to get wrong and this node gives you every lever to do it. Start with interpolation_mode on the defaults and only reach for the block sliders once you know which blocks do what - a 100-slider drawer is a great way to make an unusable model quickly. The in-node test generation is your safety net: run it before you save, because a merged checkpoint is a file on disk and un-merging isn't a thing. Also, block-level merging behaves differently across architectures - what works for SDXL may not transfer to Flux. And as with everything in this pack, you're on a single-author project with no community support to lean on, so test small and save often.

Categoryh4_ToolKit/Model Merging

Inputs (110)

NameTypeDefaultDescription
model_countINT21–3How many models are we throwing into the pot? Choose between 2 to 3 models to blend together.
settingsBOOLEANfalseUnlock the Mad Science Drawer! Reveals granular block-level weight controls for every model.
memory_managerBOOLEANtrueOptimized loading. Keeps VRAM usage low by loading/merging/unloading one model at a time.
testing_modeBOOLEANfalseRun a live test generation inside the node to verify your merge.
interpolation_modeoptCOMBOSymmetric AverageWeighted Average: Base*(1-R) + Target*R. Symmetric Average: (M1*W1 + M2*W2 + M3*W3) / Total.
clip_sourceoptCOMBOMerged4 options: Merged, Model 1, Model 2, Model 3
vae_sourceoptCOMBOModel 13 options: Model 1, Model 2, Model 3
ckpt_1optCOMBOBase Model 1
model_override_1optMODELOverride Model 1
clip_override_1optCLIPOverride CLIP 1
vae_override_1optVAEOverride VAE 1
ckpt_2optCOMBOModel 2
model_override_2optMODELOverride Model 2
clip_override_2optCLIPOverride CLIP 2
vae_override_2optVAEOverride VAE 2
ckpt_3optCOMBOModel 3
model_override_3optMODELOverride Model 3
clip_override_3optCLIPOverride CLIP 3
vae_override_3optVAEOverride VAE 3
ckpt_4optCOMBOModel 4
model_override_4optMODELOverride Model 4
clip_override_4optCLIPOverride CLIP 4
vae_override_4optVAEOverride VAE 4
test_seedoptINT00–18446744073709550000
test_stepsoptINT201–100
test_cfgoptFLOAT8.000–100
test_sampleroptCOMBOeuler44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
test_scheduleroptCOMBOnormal9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
test_widthoptINT51264–4096Width of the test generation image.
test_heightoptINT51264–4096Height of the test generation image.
decode_test_imageoptBOOLEANfalseIf OFF, skips the potentially slow/heavy VAE Decode step. The node will output a placeholder image and the real LATENT.
test_promptoptSTRINGmasterpiece, best quality, a beautiful landscape
w_1optFLOAT1.000–1Global influence of Model 1. Acts as a multiplier for all block weights below.
m1_in_00optFLOAT1.000–1Model 1 Input Block 0: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m1_in_01optFLOAT1.000–1Model 1 Input Block 1: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m1_in_02optFLOAT1.000–1Model 1 Input Block 2: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m1_in_03optFLOAT1.000–1Model 1 Input Block 3: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m1_in_04optFLOAT1.000–1Model 1 Input Block 4: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m1_in_05optFLOAT1.000–1Model 1 Input Block 5: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m1_in_06optFLOAT1.000–1Model 1 Input Block 6: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m1_in_07optFLOAT1.000–1Model 1 Input Block 7: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m1_in_08optFLOAT1.000–1Model 1 Input Block 8: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m1_in_09optFLOAT1.000–1Model 1 Input Block 9: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m1_in_10optFLOAT1.000–1Model 1 Input Block 10: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m1_in_11optFLOAT1.000–1Model 1 Input Block 11: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m1_midoptFLOAT1.000–1Model 1 Middle Block: The core processing. Often affects the fundamental 'soul' or coherence of the image.
m1_out_00optFLOAT1.000–1Model 1 Output Block 0: Controls the refinement and final look. Affects textures, lighting, and style.
m1_out_01optFLOAT1.000–1Model 1 Output Block 1: Controls the refinement and final look. Affects textures, lighting, and style.
m1_out_02optFLOAT1.000–1Model 1 Output Block 2: Controls the refinement and final look. Affects textures, lighting, and style.
m1_out_03optFLOAT1.000–1Model 1 Output Block 3: Controls the refinement and final look. Affects textures, lighting, and style.
m1_out_04optFLOAT1.000–1Model 1 Output Block 4: Controls the refinement and final look. Affects textures, lighting, and style.
m1_out_05optFLOAT1.000–1Model 1 Output Block 5: Controls the refinement and final look. Affects textures, lighting, and style.
m1_out_06optFLOAT1.000–1Model 1 Output Block 6: Controls the refinement and final look. Affects textures, lighting, and style.
m1_out_07optFLOAT1.000–1Model 1 Output Block 7: Controls the refinement and final look. Affects textures, lighting, and style.
m1_out_08optFLOAT1.000–1Model 1 Output Block 8: Controls the refinement and final look. Affects textures, lighting, and style.
m1_out_09optFLOAT1.000–1Model 1 Output Block 9: Controls the refinement and final look. Affects textures, lighting, and style.
m1_out_10optFLOAT1.000–1Model 1 Output Block 10: Controls the refinement and final look. Affects textures, lighting, and style.
m1_out_11optFLOAT1.000–1Model 1 Output Block 11: Controls the refinement and final look. Affects textures, lighting, and style.
w_2optFLOAT1.000–1Global influence of Model 2. Acts as a multiplier for all block weights below.
m2_in_00optFLOAT1.000–1Model 2 Input Block 0: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m2_in_01optFLOAT1.000–1Model 2 Input Block 1: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m2_in_02optFLOAT1.000–1Model 2 Input Block 2: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m2_in_03optFLOAT1.000–1Model 2 Input Block 3: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m2_in_04optFLOAT1.000–1Model 2 Input Block 4: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m2_in_05optFLOAT1.000–1Model 2 Input Block 5: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m2_in_06optFLOAT1.000–1Model 2 Input Block 6: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m2_in_07optFLOAT1.000–1Model 2 Input Block 7: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m2_in_08optFLOAT1.000–1Model 2 Input Block 8: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m2_in_09optFLOAT1.000–1Model 2 Input Block 9: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m2_in_10optFLOAT1.000–1Model 2 Input Block 10: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m2_in_11optFLOAT1.000–1Model 2 Input Block 11: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m2_midoptFLOAT1.000–1Model 2 Middle Block: The core processing. Often affects the fundamental 'soul' or coherence of the image.
m2_out_00optFLOAT1.000–1Model 2 Output Block 0: Controls the refinement and final look. Affects textures, lighting, and style.
m2_out_01optFLOAT1.000–1Model 2 Output Block 1: Controls the refinement and final look. Affects textures, lighting, and style.
m2_out_02optFLOAT1.000–1Model 2 Output Block 2: Controls the refinement and final look. Affects textures, lighting, and style.
m2_out_03optFLOAT1.000–1Model 2 Output Block 3: Controls the refinement and final look. Affects textures, lighting, and style.
m2_out_04optFLOAT1.000–1Model 2 Output Block 4: Controls the refinement and final look. Affects textures, lighting, and style.
m2_out_05optFLOAT1.000–1Model 2 Output Block 5: Controls the refinement and final look. Affects textures, lighting, and style.
m2_out_06optFLOAT1.000–1Model 2 Output Block 6: Controls the refinement and final look. Affects textures, lighting, and style.
m2_out_07optFLOAT1.000–1Model 2 Output Block 7: Controls the refinement and final look. Affects textures, lighting, and style.
m2_out_08optFLOAT1.000–1Model 2 Output Block 8: Controls the refinement and final look. Affects textures, lighting, and style.
m2_out_09optFLOAT1.000–1Model 2 Output Block 9: Controls the refinement and final look. Affects textures, lighting, and style.
m2_out_10optFLOAT1.000–1Model 2 Output Block 10: Controls the refinement and final look. Affects textures, lighting, and style.
m2_out_11optFLOAT1.000–1Model 2 Output Block 11: Controls the refinement and final look. Affects textures, lighting, and style.
w_3optFLOAT1.000–1Global influence of Model 3. Acts as a multiplier for all block weights below.
m3_in_00optFLOAT1.000–1Model 3 Input Block 0: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m3_in_01optFLOAT1.000–1Model 3 Input Block 1: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m3_in_02optFLOAT1.000–1Model 3 Input Block 2: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m3_in_03optFLOAT1.000–1Model 3 Input Block 3: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m3_in_04optFLOAT1.000–1Model 3 Input Block 4: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m3_in_05optFLOAT1.000–1Model 3 Input Block 5: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m3_in_06optFLOAT1.000–1Model 3 Input Block 6: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m3_in_07optFLOAT1.000–1Model 3 Input Block 7: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m3_in_08optFLOAT1.000–1Model 3 Input Block 8: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m3_in_09optFLOAT1.000–1Model 3 Input Block 9: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m3_in_10optFLOAT1.000–1Model 3 Input Block 10: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m3_in_11optFLOAT1.000–1Model 3 Input Block 11: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details.
m3_midoptFLOAT1.000–1Model 3 Middle Block: The core processing. Often affects the fundamental 'soul' or coherence of the image.
m3_out_00optFLOAT1.000–1Model 3 Output Block 0: Controls the refinement and final look. Affects textures, lighting, and style.
m3_out_01optFLOAT1.000–1Model 3 Output Block 1: Controls the refinement and final look. Affects textures, lighting, and style.
m3_out_02optFLOAT1.000–1Model 3 Output Block 2: Controls the refinement and final look. Affects textures, lighting, and style.
m3_out_03optFLOAT1.000–1Model 3 Output Block 3: Controls the refinement and final look. Affects textures, lighting, and style.
m3_out_04optFLOAT1.000–1Model 3 Output Block 4: Controls the refinement and final look. Affects textures, lighting, and style.
m3_out_05optFLOAT1.000–1Model 3 Output Block 5: Controls the refinement and final look. Affects textures, lighting, and style.
m3_out_06optFLOAT1.000–1Model 3 Output Block 6: Controls the refinement and final look. Affects textures, lighting, and style.
m3_out_07optFLOAT1.000–1Model 3 Output Block 7: Controls the refinement and final look. Affects textures, lighting, and style.
m3_out_08optFLOAT1.000–1Model 3 Output Block 8: Controls the refinement and final look. Affects textures, lighting, and style.
m3_out_09optFLOAT1.000–1Model 3 Output Block 9: Controls the refinement and final look. Affects textures, lighting, and style.
m3_out_10optFLOAT1.000–1Model 3 Output Block 10: Controls the refinement and final look. Affects textures, lighting, and style.
m3_out_11optFLOAT1.000–1Model 3 Output Block 11: Controls the refinement and final look. Affects textures, lighting, and style.

Outputs (5)

NameTypeDescription
MODELMODEL
CLIPCLIP
VAEVAE
TEST_LATENTLATENT
TEST_IMAGEIMAGE