From 576c39334278ac928eb2d7217bdf8c3f5524be33 Mon Sep 17 00:00:00 2001 From: silveroxides Date: Wed, 7 Oct 2026 07:20:46 +0200 Subject: [PATCH] Clarify CWB Custom Configuration tooltips with layman explanations --- nodes/consensus_merger.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/nodes/consensus_merger.py b/nodes/consensus_merger.py index 35354f3..f48e91e 100644 --- a/nodes/consensus_merger.py +++ b/nodes/consensus_merger.py @@ -2746,18 +2746,18 @@ class CWBCustomConfiguration(io.ComfyNode): category="ModelUtils/Merging/Configuration", description="Build complete custom Consensus-Weighted Blending settings for any CWB merge node.", inputs=[ - io.Combo.Input("consensus_type", options=["mean", "median"], default="median", tooltip="Mean is a symmetric center; median is more robust with three or more contributors."), - io.Combo.Input("alignment_method", options=["index", "similarity"], default="similarity", tooltip="Pair vectors by position or greedy cosine similarity where the merge type supports alignment."), - io.Float.Input("alignment_threshold", default=0.0, min=0.0, max=1.0, step=0.01, tooltip="Minimum cosine product or score for accepting a similarity-aligned row match."), - io.Float.Input("similarity_threshold", default=0.0, min=-1.0, max=1.0, step=0.01, tooltip="Minimum contributor similarity to the group consensus before weighting."), - io.Float.Input("power_alpha", default=2.0, min=0.0, max=10.0, step=0.1, tooltip="Exponent applied to accepted non-negative consensus similarities."), - io.Float.Input("diversity_beta", default=10.0, min=0.0, max=10.0, step=0.1, tooltip="Bandpass exponent used to suppress near-consensus dominance; zero disables it."), - io.Boolean.Input("rescale_norm", default=True, tooltip="Set each merged vector norm to the mean participating norm after weighting."), - io.Float.Input("global_scale", default=1.0, min=0.0, max=10.0, step=0.01, tooltip="Multiply the final contribution once; LoRA applies this through the up factor."), - io.Boolean.Input("dynamic_similarity_contrast", default=False, tooltip="Remap unequal consensus similarities into 0.7 to 1.0 before alpha and beta weighting."), - io.Boolean.Input("soft_comfort_bandpass", default=True, tooltip="Use 1.5 minus similarity instead of 1.001 minus similarity for diversity weighting."), - io.Float.Input("position_weight", default=0.05, min=0.0, max=1.0, step=0.01, tooltip="Blend positional affinity into similarity-based greedy matching."), - io.Boolean.Input("preserve_common_prefix", default=False, tooltip="Copy a numerically identical leading component span from the anchor."), + io.Combo.Input("consensus_type", options=["mean", "median"], default="median", tooltip="Consensus calculation method. 'mean' computes the average across models; 'median' selects the middle value, making it significantly more resistant to outlier or low-quality fine-tunes when merging 3+ models."), + io.Combo.Input("alignment_method", options=["index", "similarity"], default="similarity", tooltip="Vector alignment strategy for embeddings and LoRA rank components. 'similarity' pairs rows dynamically by feature cosine match; 'index' pairs rows strictly by matching position."), + io.Float.Input("alignment_threshold", default=0.0, min=0.0, max=1.0, step=0.01, tooltip="Minimum feature similarity required to accept a row match (0.0 to 1.0). When using similarity alignment for LoRAs/embeddings, rows with match scores below this threshold remain unpaired."), + io.Float.Input("similarity_threshold", default=0.0, min=-1.0, max=1.0, step=0.01, tooltip="Consensus cutoff threshold (-1.0 to 1.0). If a model's similarity to the group consensus is below this value, its contribution for that feature is completely rejected (zero weight)."), + io.Float.Input("power_alpha", default=2.0, min=0.0, max=10.0, step=0.1, tooltip="Consensus agreement strength (0.0 to 10.0). Higher values (e.g. 2.0-4.0) strongly favor models that agree with the group consensus and penalize outliers. 0.0 gives equal weight to all qualifying models; 1.0 is linear weighting."), + io.Float.Input("diversity_beta", default=10.0, min=0.0, max=10.0, step=0.1, tooltip="Feature diversity protection factor (0.0 to 10.0). Higher values prevent a dominant consensus from erasing unique, specialized features from individual models. 0.0 disables diversity weighting."), + io.Boolean.Input("rescale_norm", default=True, tooltip="Weight magnitude normalization. Preserves the average original feature magnitude after blending, preventing weights from shrinking (dull/washed out output) or exploding (over-saturated artifacts)."), + io.Float.Input("global_scale", default=1.0, min=0.0, max=10.0, step=0.01, tooltip="Overall merge strength multiplier. Scales the final blended contribution. 1.0 is standard 100% strength; values below 1.0 soften the effect; values above 1.0 amplify it."), + io.Boolean.Input("dynamic_similarity_contrast", default=False, tooltip="Similarity equalizer. Compresses consensus similarity scores into a balanced 0.7-1.0 band before weighting, preventing models that slightly diverge from consensus from being completely overpowered."), + io.Boolean.Input("soft_comfort_bandpass", default=True, tooltip="Smooth vs. sharp diversity falloff. When enabled, applies a gentle, gradual curve to diversity weighting (diversity_beta). When disabled, uses a sharp, aggressive cutoff."), + io.Float.Input("position_weight", default=0.05, min=0.0, max=1.0, step=0.01, tooltip="Positional anchor bias (0.0 to 1.0) for similarity alignment. Blends row index proximity into feature matching for LoRAs and embeddings: 0.0 matches purely by feature similarity, while 1.0 strictly enforces original row position."), + io.Boolean.Input("preserve_common_prefix", default=False, tooltip="Copy identical base prefix. When enabled, directly copies identical initial layers or tokens from Model A rather than blending them. Useful when merging models that share identical base embeddings or prefixes."), ], outputs=[CWB_CONFIG.Output(display_name="cwb_config")], )