Nodes/LoRA Power-Merger ComfyUI/PM NearSwap (Mergekit)
ComfyUI Node

PM NearSwap (Mergekit)

Nearswap (nearswap) Concept: Interpolates the base model with parameters from a secondary model primarily where they are already similar. The interpolation strength towards the secondary model is inversely proportional to the absolute difference of their parameters, modulated by the t parameter. When the parameters are similar, the interpolation is stronger, and when they are different, it is weaker. Use Cases: Selectively pulling in similar parameters from a secondary model while preserving different parameters from the base model Fine-grained parameter-wise merging that respects the existing structure of the base model Inputs: Requires exactly 2 models. One model must be specified as base_model. Key Parameters: t (global): Controls the interpolation strength. Higher values increase the influence of the secondary model for similar parameters Algorithm: For each parameter, computes weight = (t / |base - secondary|).clamp(0, 1), then returns weight * secondary + (1 - weight) * base

By larsupb·Created 2 years ago·Updated 9 days ago· 75
PM NearSwap (Mergekit)
    • MergeMethod
    similarity_threshold0.0010
    CategoryLoRA PowerMerge/Specialized Methods

    Inputs (1)

    NameTypeDefaultDescription
    similarity_thresholdFLOAT0.00100–1Similarity threshold for NearSwap merge.

    Outputs (1)

    NameTypeDescription
    MergeMethodMergeMethod