h4 - Model Merger
Mad science, but on the canvas
- 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 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 usingtest_prompt,test_seed,test_steps,test_cfg,test_sampler,test_width, etc.decode_test_imageoff 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.
Inputs (110)
| Name | Type | Default | Description |
|---|---|---|---|
| model_count | INT | 21–3 | How many models are we throwing into the pot? Choose between 2 to 3 models to blend together. |
| settings | BOOLEAN | false | Unlock the Mad Science Drawer! Reveals granular block-level weight controls for every model. |
| memory_manager | BOOLEAN | true | Optimized loading. Keeps VRAM usage low by loading/merging/unloading one model at a time. |
| testing_mode | BOOLEAN | false | Run a live test generation inside the node to verify your merge. |
| interpolation_modeopt | COMBO | Symmetric Average | Weighted Average: Base*(1-R) + Target*R. Symmetric Average: (M1*W1 + M2*W2 + M3*W3) / Total. |
| clip_sourceopt | COMBO | Merged | 4 options: Merged, Model 1, Model 2, Model 3 |
| vae_sourceopt | COMBO | Model 1 | 3 options: Model 1, Model 2, Model 3 |
| ckpt_1opt | COMBO | Base Model 1 | |
| model_override_1opt | MODEL | Override Model 1 | |
| clip_override_1opt | CLIP | Override CLIP 1 | |
| vae_override_1opt | VAE | Override VAE 1 | |
| ckpt_2opt | COMBO | Model 2 | |
| model_override_2opt | MODEL | Override Model 2 | |
| clip_override_2opt | CLIP | Override CLIP 2 | |
| vae_override_2opt | VAE | Override VAE 2 | |
| ckpt_3opt | COMBO | Model 3 | |
| model_override_3opt | MODEL | Override Model 3 | |
| clip_override_3opt | CLIP | Override CLIP 3 | |
| vae_override_3opt | VAE | Override VAE 3 | |
| ckpt_4opt | COMBO | Model 4 | |
| model_override_4opt | MODEL | Override Model 4 | |
| clip_override_4opt | CLIP | Override CLIP 4 | |
| vae_override_4opt | VAE | Override VAE 4 | |
| test_seedopt | INT | 00–18446744073709550000 | — |
| test_stepsopt | INT | 201–100 | — |
| test_cfgopt | FLOAT | 8.000–100 | — |
| test_sampleropt | COMBO | euler | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 |
| test_scheduleropt | COMBO | normal | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 |
| test_widthopt | INT | 51264–4096 | Width of the test generation image. |
| test_heightopt | INT | 51264–4096 | Height of the test generation image. |
| decode_test_imageopt | BOOLEAN | false | If OFF, skips the potentially slow/heavy VAE Decode step. The node will output a placeholder image and the real LATENT. |
| test_promptopt | STRING | masterpiece, best quality, a beautiful landscape | — |
| w_1opt | FLOAT | 1.000–1 | Global influence of Model 1. Acts as a multiplier for all block weights below. |
| m1_in_00opt | FLOAT | 1.000–1 | Model 1 Input Block 0: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m1_in_01opt | FLOAT | 1.000–1 | Model 1 Input Block 1: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m1_in_02opt | FLOAT | 1.000–1 | Model 1 Input Block 2: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m1_in_03opt | FLOAT | 1.000–1 | Model 1 Input Block 3: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m1_in_04opt | FLOAT | 1.000–1 | Model 1 Input Block 4: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m1_in_05opt | FLOAT | 1.000–1 | Model 1 Input Block 5: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m1_in_06opt | FLOAT | 1.000–1 | Model 1 Input Block 6: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m1_in_07opt | FLOAT | 1.000–1 | Model 1 Input Block 7: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m1_in_08opt | FLOAT | 1.000–1 | Model 1 Input Block 8: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m1_in_09opt | FLOAT | 1.000–1 | Model 1 Input Block 9: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m1_in_10opt | FLOAT | 1.000–1 | Model 1 Input Block 10: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m1_in_11opt | FLOAT | 1.000–1 | Model 1 Input Block 11: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m1_midopt | FLOAT | 1.000–1 | Model 1 Middle Block: The core processing. Often affects the fundamental 'soul' or coherence of the image. |
| m1_out_00opt | FLOAT | 1.000–1 | Model 1 Output Block 0: Controls the refinement and final look. Affects textures, lighting, and style. |
| m1_out_01opt | FLOAT | 1.000–1 | Model 1 Output Block 1: Controls the refinement and final look. Affects textures, lighting, and style. |
| m1_out_02opt | FLOAT | 1.000–1 | Model 1 Output Block 2: Controls the refinement and final look. Affects textures, lighting, and style. |
| m1_out_03opt | FLOAT | 1.000–1 | Model 1 Output Block 3: Controls the refinement and final look. Affects textures, lighting, and style. |
| m1_out_04opt | FLOAT | 1.000–1 | Model 1 Output Block 4: Controls the refinement and final look. Affects textures, lighting, and style. |
| m1_out_05opt | FLOAT | 1.000–1 | Model 1 Output Block 5: Controls the refinement and final look. Affects textures, lighting, and style. |
| m1_out_06opt | FLOAT | 1.000–1 | Model 1 Output Block 6: Controls the refinement and final look. Affects textures, lighting, and style. |
| m1_out_07opt | FLOAT | 1.000–1 | Model 1 Output Block 7: Controls the refinement and final look. Affects textures, lighting, and style. |
| m1_out_08opt | FLOAT | 1.000–1 | Model 1 Output Block 8: Controls the refinement and final look. Affects textures, lighting, and style. |
| m1_out_09opt | FLOAT | 1.000–1 | Model 1 Output Block 9: Controls the refinement and final look. Affects textures, lighting, and style. |
| m1_out_10opt | FLOAT | 1.000–1 | Model 1 Output Block 10: Controls the refinement and final look. Affects textures, lighting, and style. |
| m1_out_11opt | FLOAT | 1.000–1 | Model 1 Output Block 11: Controls the refinement and final look. Affects textures, lighting, and style. |
| w_2opt | FLOAT | 1.000–1 | Global influence of Model 2. Acts as a multiplier for all block weights below. |
| m2_in_00opt | FLOAT | 1.000–1 | Model 2 Input Block 0: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m2_in_01opt | FLOAT | 1.000–1 | Model 2 Input Block 1: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m2_in_02opt | FLOAT | 1.000–1 | Model 2 Input Block 2: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m2_in_03opt | FLOAT | 1.000–1 | Model 2 Input Block 3: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m2_in_04opt | FLOAT | 1.000–1 | Model 2 Input Block 4: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m2_in_05opt | FLOAT | 1.000–1 | Model 2 Input Block 5: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m2_in_06opt | FLOAT | 1.000–1 | Model 2 Input Block 6: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m2_in_07opt | FLOAT | 1.000–1 | Model 2 Input Block 7: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m2_in_08opt | FLOAT | 1.000–1 | Model 2 Input Block 8: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m2_in_09opt | FLOAT | 1.000–1 | Model 2 Input Block 9: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m2_in_10opt | FLOAT | 1.000–1 | Model 2 Input Block 10: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m2_in_11opt | FLOAT | 1.000–1 | Model 2 Input Block 11: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m2_midopt | FLOAT | 1.000–1 | Model 2 Middle Block: The core processing. Often affects the fundamental 'soul' or coherence of the image. |
| m2_out_00opt | FLOAT | 1.000–1 | Model 2 Output Block 0: Controls the refinement and final look. Affects textures, lighting, and style. |
| m2_out_01opt | FLOAT | 1.000–1 | Model 2 Output Block 1: Controls the refinement and final look. Affects textures, lighting, and style. |
| m2_out_02opt | FLOAT | 1.000–1 | Model 2 Output Block 2: Controls the refinement and final look. Affects textures, lighting, and style. |
| m2_out_03opt | FLOAT | 1.000–1 | Model 2 Output Block 3: Controls the refinement and final look. Affects textures, lighting, and style. |
| m2_out_04opt | FLOAT | 1.000–1 | Model 2 Output Block 4: Controls the refinement and final look. Affects textures, lighting, and style. |
| m2_out_05opt | FLOAT | 1.000–1 | Model 2 Output Block 5: Controls the refinement and final look. Affects textures, lighting, and style. |
| m2_out_06opt | FLOAT | 1.000–1 | Model 2 Output Block 6: Controls the refinement and final look. Affects textures, lighting, and style. |
| m2_out_07opt | FLOAT | 1.000–1 | Model 2 Output Block 7: Controls the refinement and final look. Affects textures, lighting, and style. |
| m2_out_08opt | FLOAT | 1.000–1 | Model 2 Output Block 8: Controls the refinement and final look. Affects textures, lighting, and style. |
| m2_out_09opt | FLOAT | 1.000–1 | Model 2 Output Block 9: Controls the refinement and final look. Affects textures, lighting, and style. |
| m2_out_10opt | FLOAT | 1.000–1 | Model 2 Output Block 10: Controls the refinement and final look. Affects textures, lighting, and style. |
| m2_out_11opt | FLOAT | 1.000–1 | Model 2 Output Block 11: Controls the refinement and final look. Affects textures, lighting, and style. |
| w_3opt | FLOAT | 1.000–1 | Global influence of Model 3. Acts as a multiplier for all block weights below. |
| m3_in_00opt | FLOAT | 1.000–1 | Model 3 Input Block 0: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m3_in_01opt | FLOAT | 1.000–1 | Model 3 Input Block 1: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m3_in_02opt | FLOAT | 1.000–1 | Model 3 Input Block 2: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m3_in_03opt | FLOAT | 1.000–1 | Model 3 Input Block 3: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m3_in_04opt | FLOAT | 1.000–1 | Model 3 Input Block 4: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m3_in_05opt | FLOAT | 1.000–1 | Model 3 Input Block 5: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m3_in_06opt | FLOAT | 1.000–1 | Model 3 Input Block 6: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m3_in_07opt | FLOAT | 1.000–1 | Model 3 Input Block 7: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m3_in_08opt | FLOAT | 1.000–1 | Model 3 Input Block 8: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m3_in_09opt | FLOAT | 1.000–1 | Model 3 Input Block 9: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m3_in_10opt | FLOAT | 1.000–1 | Model 3 Input Block 10: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m3_in_11opt | FLOAT | 1.000–1 | Model 3 Input Block 11: Controls the flow of data into the UNet. Lower blocks affect composition/layout, higher blocks affect details. |
| m3_midopt | FLOAT | 1.000–1 | Model 3 Middle Block: The core processing. Often affects the fundamental 'soul' or coherence of the image. |
| m3_out_00opt | FLOAT | 1.000–1 | Model 3 Output Block 0: Controls the refinement and final look. Affects textures, lighting, and style. |
| m3_out_01opt | FLOAT | 1.000–1 | Model 3 Output Block 1: Controls the refinement and final look. Affects textures, lighting, and style. |
| m3_out_02opt | FLOAT | 1.000–1 | Model 3 Output Block 2: Controls the refinement and final look. Affects textures, lighting, and style. |
| m3_out_03opt | FLOAT | 1.000–1 | Model 3 Output Block 3: Controls the refinement and final look. Affects textures, lighting, and style. |
| m3_out_04opt | FLOAT | 1.000–1 | Model 3 Output Block 4: Controls the refinement and final look. Affects textures, lighting, and style. |
| m3_out_05opt | FLOAT | 1.000–1 | Model 3 Output Block 5: Controls the refinement and final look. Affects textures, lighting, and style. |
| m3_out_06opt | FLOAT | 1.000–1 | Model 3 Output Block 6: Controls the refinement and final look. Affects textures, lighting, and style. |
| m3_out_07opt | FLOAT | 1.000–1 | Model 3 Output Block 7: Controls the refinement and final look. Affects textures, lighting, and style. |
| m3_out_08opt | FLOAT | 1.000–1 | Model 3 Output Block 8: Controls the refinement and final look. Affects textures, lighting, and style. |
| m3_out_09opt | FLOAT | 1.000–1 | Model 3 Output Block 9: Controls the refinement and final look. Affects textures, lighting, and style. |
| m3_out_10opt | FLOAT | 1.000–1 | Model 3 Output Block 10: Controls the refinement and final look. Affects textures, lighting, and style. |
| m3_out_11opt | FLOAT | 1.000–1 | Model 3 Output Block 11: Controls the refinement and final look. Affects textures, lighting, and style. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CLIP | CLIP | — |
| VAE | VAE | — |
| TEST_LATENT | LATENT | — |
| TEST_IMAGE | IMAGE | — |