Nodes/Divergent Nodes/XY Plot: LoRA/Strength
ComfyUI Node

XY Plot: LoRA/Strength

The LoRA strength sweep that ships as a calculator (for now)

By thedivergentai·Created 2 years ago·Updated 9 months ago· 1
XY Plot: LoRA/Strength
    • plot_data
    • total_combinations
    lora_names
    strength_values0.0, 0.5, 1.0
    grid_columns3
    annotate_imagestrue

    The name promises a grid of images comparing LoRAs at different strengths. That's the dream, and honestly it's a good one - tuning LoRA strength by hand is the most tedious ritual in this hobby. You rerun the same prompt at 0.6, 0.8, 1.0 and squint at three images. A node that does the sweep for you and tiles the results would earn its place.

    So here's the part you need before you build a whole workflow around it: the version of LoraStrengthXYPlot that ships today doesn't render a grid. It's a planning/calculator node. It takes your list of LoRAs and strength values, works out every combination, and hands you back a text summary plus the total count. The repo contains a full grid-assembly toolkit (grid_assembly.py, plot_utils.py, sampling_helpers.py) and its own docs describe a real XY plotter with MODEL/CLIP/VAE inputs - but none of that is wired to the node class yet. The shipped node is the setup step for a plot that isn't being generated.

    That's still useful, mind you. You're not going to burn a run of twenty images on an idea you haven't thought through.

    How it works

    The mechanism is pure arithmetic. It splits lora_names (one per line) and strength_values (comma-separated floats), then computes total_combinations = len(loras) × len(strengths). That's the whole heavy lift. Everything else is formatting a human-readable plan: which LoRAs, which strengths, the grid column count, whether annotations are on.

    The inputs that matter

    • lora_names - one LoRA name per line, exactly as you'd type it into a LoRA loader.
    • strength_values - comma-separated, default 0.0, 0.5, 1.0. This is the axis you actually care about; for SDXL-era models the old 0.5–0.8 sweet spot rule of thumb is rough guidance, not law.
    • grid_columns - 1–10, default 3. Just layout math for the planned grid.
    • annotate_images - boolean, default on, for the text labels in the eventual plot.

    Outputs and where they go

    • plot_data (STRING) - the formatted plan: how many LoRAs, strengths, combinations, grid layout. Wire this into a text preview node to read it in the UI.
    • total_combinations (INT) - exactly what it says. Handy if you want to sanity-check batch sizes elsewhere in the graph.

    Installing it

    It's one pack, Divergent Nodes, so the install is the same as the rest of the suite:

    cd ComfyUI/custom_nodes
    git clone https://github.com/thedivergentai/divergent_nodes.git divergent_nodes
    cd divergent_nodes
    pip install -r requirements.txt
    

    ComfyUI Manager also has it - search "Divergent Nodes". Note this pack is written against the newer v3 node API (comfy_api.latest), so keep ComfyUI reasonably current or nothing in the suite will register.

    The honest gotcha

    Where people get burned: they expect an IMAGE output and find a text string. That's not a bug you can fix by rewiring; the rendering just isn't implemented in the shipped node yet. Treat LoraStrengthXYPlot as a planner - worth keeping in a workflow to lock down your sweep dimensions and count before you wire up the actual sampling. Check the repo before long; if the grid assembler gets connected, this becomes the node its name promises.

    CategoryDivergent Nodes 👽/Utils

    Inputs (4)

    NameTypeDefaultDescription
    lora_namesSTRINGLoRA names (one per line)
    strength_valuesSTRING0.0, 0.5, 1.0Strength values to test (comma-separated)
    grid_columnsINT31–10Number of columns in grid
    annotate_imagesoptBOOLEANtrueAdd text annotations to images

    Outputs (2)

    NameTypeDescription
    plot_dataSTRING
    total_combinationsINT