Donut Model Merge Krea2
Merge Krea 2 checkpoints component-by-component, without rebuilding quantized weights
- model1
- model2
- MODEL
Krea 2 is 12 billion parameters, and most of us run it as an FP8 quantized model jammed into 8–16 GB of VRAM. So here's the thing nobody warns you about with model merging: when ComfyUI merges two quantized checkpoints the normal way, it materializes new blended weights - which means rebuilding the whole quantized layer stack, over and over, while the node runs. This node is a Krea 2 component merge that can skip most of that when you're doing a hard swap, plus a way to blend two Krea 2 checkpoints (or Raw and a finetune, or Raw and Turbo) block by block with the same controls as ComfyUI's built-in ModelMergeKrea2.
DonutModelMergeKrea2 is one node in the DonutNodes pack, which is mostly about LoRA stacking, detailers, and Krea 2 tooling. It takes two already-loaded models and merges them into one, so the workflow is Load Diffusion Model (model1) → this node → your KSampler.
How it works
You get a long list of ratio sliders, one per Krea 2 component: first. and last. at the ends, tmlp./txtmlp./tproj. on the MLP/text side, the txtfusion.* group (the Qwen3-VL text-fusion blocks, its projector, and the refiner blocks), and the big blocks.0. … blocks.27. run of 28 diffusion blocks. Watch the ratio direction - it's the thing that trips people up:
1.0keeps model1 for that component.0.0uses model2 for that component.- Anything between is a partial blend.
So it's inverted from a "merge strength" slider where 1.0 means "all model2." All defaults sit at 1.0, so wiring in a second model and hitting Run does nothing until you move something.
The interesting part is the optional execution_mode dropdown, which defaults to Comfy patches (plain vanilla merge, same as the built-in node). Switch it to Experimental bypass and the merge gets pickier:
- Exact
0.0swaps on compatible linear layers become a runtime hard swap - inference just forwards the model2 layer directly, keeping its original weights, bias, and quantization metadata intact instead of rebuilding a merged quantized layer. That's the win for low-VRAM Krea 2 users. - Partial ratios like
0.25or0.5deliberately stay on the regular materialized merge path, so inference runs one merged linear forward instead of two full model forwards. - Exact
1.0components are just left alone, untouched.
The node only does the bypass for clean linear layers it can prove are compatible (same in/out features, genuinely different modules). Unsupported targets, models sharing the same underlying weights, different load devices, or models that already carry runtime injections silently fall back to the regular patch path and print a note to the console - it degrades gracefully rather than erroring.
Where the trap is
The bypass is inference-time behavior only. Runtime hard swaps are not materialized, so if you feed the merged output straight into DonutModelSave or any checkpoint-save node, those swapped-in model2 layers will not be baked into the saved file. The README is explicit: select Comfy patches before saving if you need a fully materialized merged checkpoint. Use Experimental bypass when you're merging on the fly for generation speed; use Comfy patches when the goal is a saved file.
Installing it
The whole DonutNodes pack ships together:
cd ComfyUI/custom_nodes
git clone https://github.com/DonutsDelivery/ComfyUI-DonutNodes.git donutnodes
cd donutnodes
python -m pip install -r requirements.txt
Or just search "DonutNodes" in ComfyUI Manager and install. The requirements (opencv, scipy, matplotlib, psutil, requests) exist for the pack's other nodes - detailers, LoRA stack, upscaler - this merge node itself is plain Python plus ComfyUI's patching API, so it needs no model downloads and no extra weights of its own. You do need a reasonably current ComfyUI: on older versions it imports comfy.weight_adapter and comfy.patcher_extension behind try/except and quietly falls back to the regular merge. That's a feature, not a bug - but if Experimental bypass seems to do nothing, check your ComfyUI version first.
One last reality check: this node loads two full Krea 2 models at once, which is a lot of VRAM before you even generate. If that's a problem, keep model2 on a different load device (ComfyUI will note it and route you to the regular path anyway) or reach for this mainly when you're blending Raw into a finetune and need to iterate - that's the workload where the runtime bypass earns its keep.
Inputs (41)
| Name | Type | Default | Description |
|---|---|---|---|
| model1 | MODEL | — | |
| model2 | MODEL | — | |
| first. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| tmlp. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| txtmlp. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| tproj. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| txtfusion.layerwise_blocks.0. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| txtfusion.layerwise_blocks.1. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| txtfusion.projector. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| txtfusion.refiner_blocks.0. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| txtfusion.refiner_blocks.1. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.0. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.1. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.2. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.3. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.4. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.5. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.6. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.7. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.8. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.9. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.10. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.11. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.12. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.13. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.14. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.15. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.16. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.17. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.18. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.19. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.20. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.21. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.22. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.23. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.24. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.25. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.26. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| blocks.27. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| last. | FLOAT | 1.000–1 | 1.0 keeps model1; 0.0 uses model2 for this Krea2 component. |
| execution_modeopt | COMBO | Comfy patches | Experimental bypass is hybrid: exact 0.0 model2 swaps use runtime forwarding for compatible linear layers, while partial ratios use normal Comfy merged weights so inference runs one linear forward instead of two. Exact 1.0 keeps model1 unchanged. Runtime swaps are not materialized when saving a checkpoint. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |