Nodes/Polyhedron Suite/⬡ Polyhedron Merge Analyzer
ComfyUI Node

⬡ Polyhedron Merge Analyzer

The passive node that shows what your LoRA merge is actually doing

By PolyhedronAI·Created 3 months ago·Updated 2 days ago· 2
⬡ Polyhedron Merge Analyzer
    • report
    • energy_1x_pct
    • amplitude_ratio
    • resolve_active
    uls_config_out{"rows":[]}
    analysis_depthOverview
    max_layers24
    deviceauto

    When you merge fifteen LoRAs with a clever merge mode, how do you know it's actually working? The Polyhedron Merge Analyzer is the pack's answer, and it's the rare diagnostic that's genuinely passive: it connects to the Stack's uls_config_out string, touches no model, and reports what the configured merge would do.

    At its default, Overview, it's instant - it lists the groups, the LoRAs in them, their weights and merge modes, and the cleanup-switch status. Wire report into a Show Text node and you get a human-readable account of what the Stack is about to merge. That alone is useful for debugging "why is this LoRA not in the output" - the answer is usually visible in the config before you ever queue a run.

    Deep analysis

    The interesting mode is Deep analysis, and it's where the node earns the "Resolve" in its name. The Stack's cleanup switches are Trim and Resolve. Trim deterministically drops each LoRA's weakest rank channels before merging - the direct counter to the "many quiet LoRAs → grey fog" effect. Resolve is TIES sign-election: per weight, the majority direction wins and only agreeing LoRAs get averaged, then the result is repacked to low rank via truncated SVD so it hits the same hand-off path as a normal merge. The repack is where fidelity can silently leak - energy lost in the SVD truncation means the merge's strength isn't quite what you configured.

    Deep analysis loads the actual LoRAs and measures that repack per layer: energy retention at 1×/2×/4× rank, cosine similarity, and amplitude ratio. It's slower - it's literally running SVD on layers - so max_layers (default 24) bounds how many of the largest conflict layers get fully measured, and device lets you force CPU if the GPU's busy. The three numeric outputs mirror the report: energy_1x_pct, amplitude_ratio, and resolve_active (whether Resolve is actually engaged).

    The README adds one practical warning tied to this: the Merge Analyzer warns in its report when Trim is set too aggressive. The recommended Trim working range is 70–80% (Medium/Light); Max · 50% cuts into the mid/quiet rank channels where a concept's distinguishing features live, and the known failure mode is concept → silhouette, with the base model filling the gap. If you're pushing 50% on a 15+ LoRA stack, the analyzer is the node that tells you whether you just broke a concept.

    Inputs and outputs

    • uls_config_out - from the Stack. One analyzer per Stack; in a dual HIGH/LOW setup that means two, one per noise path.
    • analysis_depth - Overview (instant) or Deep analysis (loads LoRAs + SVD, slower).
    • Outputs: report (STRING → Show Text), energy_1x_pct (FLOAT), amplitude_ratio (FLOAT), resolve_active (BOOLEAN).

    Installing it

    It ships in the Polyhedron Suite pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/PolyhedronAI/ComfyUI-PolyhedronLoRAStack.git
    # restart ComfyUI
    

    Or Manager, search "Polyhedron Suite". No dependencies beyond what ComfyUI ships. The honest caveat: deep analysis is a measurement tool, not a crystal ball - it tells you the repack is faithful or not, but "faithful" doesn't guarantee the output looks good. That part is still a visual check. What it kills is the guessing about whether your merge settings are even being honored.

    CategoryPolyhedron/Utils

    Inputs (4)

    NameTypeDefaultDescription
    uls_config_outSTRING{"rows":[]}
    analysis_depthCOMBOOverviewOverview = instant (selection/modes only). Deep analysis = loads the LoRAs + SVD per layer (slower), measures Resolve fidelity.
    max_layersoptINT241–200Deep analysis: how many of the largest conflict layers are fully measured (speed/memory).
    deviceoptCOMBOautoauto = GPU if free (like the real Resolve path), else CPU. 'cpu' forces CPU.

    Outputs (4)

    NameTypeDescription
    reportSTRING
    energy_1x_pctFLOAT
    amplitude_ratioFLOAT
    resolve_activeBOOLEAN