Nodes/ModelMerge Krea 2 + Quant (INT8/INT4)/ModelMerge Krea2 + Quant (INT8/INT4)
ComfyUI Node

ModelMerge Krea2 + Quant (INT8/INT4)

Merge Krea 2 checkpoints and get a ready-to-sample INT8/INT4 model in one pass

By tritant·Created 24 days ago·Updated 24 days ago· 6
ModelMerge Krea2 + Quant (INT8/INT4)
    • model
    unet_1
    unet_2None
    ratio_global0.50
    ratio_in_out-1.00
    ratio_text-1.00
    ratio_blocks_early-1.00
    ratio_blocks_mid-1.00
    ratio_blocks_late-1.00
    early_end8
    mid_end18
    quantizedisable
    enable_convrottrue
    savedisable
    filename_prefixmerged/Krea2_merge
    lora_1
    strength_11.00
    lora_2
    strength_21.00
    lora_3
    strength_31.00

    The old way to merge two Krea 2 checkpoints is a grind: download two 24 GB bf16 files, run a merge script offline for an hour, load the result, and then find out the 50/50 blend you guessed is no good. This node kills that loop. It merges two Krea 2 UNets block-by-block, stacks up to three LoRAs on top, and - if you tick the box - quantizes to native INT8 or INT4, all in a single pass, then hands you a MODEL you can wire straight into a KSampler. Preview the merge immediately, and only hit save once it actually looks right.

    Why reach for it at all? Krea 2 is the default open base to build on as of mid-2026, and merging is how you blend a Raw base with a style finetune or fuse two checkpoint personalities without retraining. And if you're on a 12 GB card, the quantization is the real prize: a 24 GB model you can't load becomes one that fits, done natively instead of hunting down someone's pre-quantized conversion.

    How it works

    Nothing here is a GPU graph op. The whole thing happens on the raw state_dict tensors before the model is ever instantiated: each weight gets merged with torch.lerp using the per-block ratio, LoRA patches are calculated through comfy.lora, and quantization goes through ComfyUI's own native kitchen (comfy.quant_ops). INT8 uses a per-channel TensorWiseINT8Layout with an optional ConvRot Hadamard rotation at group size 256; INT4 is the W4A4 TensorCoreConvRotW4A4Layout (group size 64), which always uses ConvRot. The quantized weights are stored back into the state_dict as comfy_quant keys, so the MODEL output runs through the real INT8/INT4 kernels live - the same path a downloaded pre-quantized checkpoint takes. No extra dependencies; the README's claim that it runs on "ComfyUI's internal kitchen" is accurate.

    The clever bit is the single pass: merge, LoRA, and quantization happen in one GPU round-trip per tensor, and the second model's weights are popped out of RAM as they're consumed, so peak memory stays far below "load two models and run a script." Save even runs before the model is constructed, because load_diffusion_model_state_dict eats the state_dict - save after that and you'd write an empty file.

    The inputs that matter

    • unet_1 / unet_2 - pick from models/diffusion_models (the bf16 Krea 2 files). Set unet_2 to None and this becomes a pure LoRA-plus-quantize node.
    • ratio_global - the master dial. 0.5 is a straight average, 1.0 is 100% unet_1. Everything below inherits from this.
    • ratio_in_out, ratio_text, ratio_blocks_early/mid/late - per-group overrides (default -1 = inherit global). In/out covers the first/last layers, text covers the text-mlp/projection, and the block groups are split by early_end and mid_end (defaults 8 and 18 of the 27 blocks). Want unet_1's early structure but unet_2's late texture? This is how.
    • quantize - disable / int8 / int4. Disabled leaves it bf16, which is the right call if the model already fits.
    • enable_convrot - only affects INT8 (INT4 uses it always). Leave it on.
    • save + filename_prefix - writes a .safetensors into your output folder, e.g. merged/Krea2_merge-00001_.safetensors.
    • lora_1..3 / strength_1..3 - up to three LoRAs, strengths range −10 to 10. Note the layers it won't touch: the first/last, text-mlp, text-projection and fusion layers are excluded from quantization deliberately - keeping the sensitive ones in bf16.

    Output is a single MODEL, straight into a KSampler. You still need the rest of the Krea 2 stack (the Qwen3-VL text encoder and Qwen-Image VAE) to actually sample - the node only handles the UNet, and missing those two files is the classic new-user trap.

    Install

    ComfyUI Manager - search "ModelMerge Krea 2 + Quant" - or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/tritant/ComfyUI_Krea2_ModelMerger_Converter_int8_int4
    

    Then restart ComfyUI. The pack is published to the Comfy Registry and has no pip dependencies to babysit - it leans entirely on ComfyUI's built-in modules. The one requirement is a recent-enough ComfyUI: native INT8-ConvRot ops landed around June 2026, so on an older install quantization fails with a "layout unavailable" error.

    Gotchas

    • Feed it bf16/fp16, not already-quantized files. It checks for comfy_quant keys and hard-errors with "modèle déjà quantifié" rather than silently producing garbage.
    • RAM is the real constraint. Two bf16 Krea 2s is ~50 GB before VRAM. The pop-as-you-go pass helps a lot, but merging on a 32 GB box will swap - expect it.
    • early_end must be ≤ mid_end or it throws a ValueError up front.
    • A LoRA whose keys don't match Krea 2's naming gets a "format incompatible" error and the node refuses to continue instead of quietly doing nothing - annoying, but better than a fake merge.
    • The console prints a chatty per-pass summary in French (merged count, quantized count, skipped). Normal, not a crash.
    Categoryadvanced/model_merging/model_specific

    Inputs (20)

    NameTypeDefaultDescription
    unet_1COMBO0 options:
    unet_2COMBONoneNone = pas de merge
    ratio_globalFLOAT0.500–1Part de unet_1. 1.0 = 100% unet_1, 0.0 = 100% unet_2, 0.5 = moyenne.
    ratio_in_outFLOAT-1.00-1–1-1 = herite du ratio global. Sinon part de unet_1 pour ce groupe.
    ratio_textFLOAT-1.00-1–1-1 = herite du ratio global. Sinon part de unet_1 pour ce groupe.
    ratio_blocks_earlyFLOAT-1.00-1–1-1 = herite du ratio global. Sinon part de unet_1 pour ce groupe.
    ratio_blocks_midFLOAT-1.00-1–1-1 = herite du ratio global. Sinon part de unet_1 pour ce groupe.
    ratio_blocks_lateFLOAT-1.00-1–1-1 = herite du ratio global. Sinon part de unet_1 pour ce groupe.
    early_endINT80–27Dernier bloc du groupe early (inclus). 8 = blocs 0-8.
    mid_endINT180–27Dernier bloc du groupe mid (inclus). 18 = blocs 9-18, le reste va dans late.
    quantizeCOMBOdisable3 options: disable, int8, int4
    enable_convrotBOOLEANtrueRotation Hadamard ConvRot. Ne s'applique qu'a l'INT8 : le layout INT4 W4A4 l'utilise toujours.
    saveCOMBOdisable2 options: disable, enabled
    filename_prefixSTRINGmerged/Krea2_merge
    lora_1optCOMBO1 options: None
    strength_1optFLOAT1.00-10–10
    lora_2optCOMBO1 options: None
    strength_2optFLOAT1.00-10–10
    lora_3optCOMBO1 options: None
    strength_3optFLOAT1.00-10–10

    Outputs (1)

    NameTypeDescription
    modelMODEL