ComfyUI Node
PM Task Arithmetic (Mergekit)
Concept: Computes "task vectors" for each model by subtracting a base_model. These task vectors are then combined as a weighted average and added back to the base_model. Use Cases: Combining skills from multiple models fine-tuned from a common ancestor Transferring specific capabilities (e.g., coding ability, instruction following) from one model to another Steering style or behavior of a model by adding small task vectors from other models Inputs: Requires a base_model and one or more other models. Key Parameters: - weight (per-model): Weight for each model's task vector in the merge - lambda (global): Scaling factor applied to the summed task vectors before adding back to the base. Default 1.0
PM Task Arithmetic (Mergekit)
- MergeMethod
◄rescale_normdefault►
◄normalizetrue►
CategoryLoRA PowerMerge/Task Arithmetic
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| rescale_norm | COMBO | default | Rescaling strategy: • default: Auto-select (L1 for methods needing it, none otherwise) • l1: L1 norm preservation (precise, preserves magnitude sum) • l2: L2 norm preservation (precise, preserves Euclidean norm) • linf: L-infinity norm (preserves max absolute value, prevents amplification) • none: No rescaling (may reduce merge strength) |
| normalize | BOOLEAN | true | If true, the weights of all models contributing to a tensor will be normalized. Default behavior. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MergeMethod | MergeMethod | — |