Nodes/ComfyUI-WanActivationEditor/WanVideo Block Strength Builder
ComfyUI Node

WanVideo Block Strength Builder

Generate a 40-block strength curve in one dropdown

By fblissjr·Created about a year ago·Updated about a year ago· 9
WanVideo Block Strength Builder
    • block_strengths
    • strength_visualization
    pattern
    base_strength0.50
    peak_block20
    spread5.0
    step_size5
    block_0_strength0.00
    block_1_strength0.00
    block_2_strength0.00
    block_3_strength0.00
    block_4_strength0.00
    block_5_strength0.00
    block_6_strength0.00
    block_7_strength0.00
    block_8_strength0.00
    block_9_strength0.00
    block_10_strength0.00
    block_11_strength0.00
    block_12_strength0.00
    block_13_strength0.00
    block_14_strength0.00
    block_15_strength0.00
    block_16_strength0.00
    block_17_strength0.00
    block_18_strength0.00
    block_19_strength0.00
    block_20_strength0.00
    block_21_strength0.00
    block_22_strength0.00
    block_23_strength0.00
    block_24_strength0.00
    block_25_strength0.00
    block_26_strength0.00
    block_27_strength0.00
    block_28_strength0.00
    block_29_strength0.00
    block_30_strength0.00
    block_31_strength0.00
    block_32_strength0.00
    block_33_strength0.00
    block_34_strength0.00
    block_35_strength0.00
    block_36_strength0.00
    block_37_strength0.00
    block_38_strength0.00
    block_39_strength0.00

    The block activation builder gives you on/off per block. This node is the "how hard" version. It produces a 40-value strength profile - a curve across Wan's transformer depth - so you can say "inject softly at the start, hard in the middle, taper off" without hand-tuning forty sliders.

    The idea is grounded in how Wan actually works. The 40-block DiT processes text conditioning at every depth, and the "early blocks = low-level features, late blocks = semantics" story is real but rough. A strength curve is the natural way to test gradients against that hypothesis: maybe the sweet spot isn't a clean "late blocks" binary, but a ramp or a peak somewhere in the middle. This node exists to make that experiment a one-dropdown affair.

    How the patterns work

    • uniform - every block at base_strength. Equivalent to the base editor.
    • linear_decay / linear_rise - ramp from base_strength down to 0 (or up to it). A decay is the classic "strong early, weak late" injection.
    • gaussian_peak / inverse_gaussian - a bell curve centered at peak_block (default 20, so the middle), controlled by spread. Peak = "hit the middle blocks hard, leave the ends alone."
    • sine_wave - alternating high/low across depth.
    • stepped - blocky steps every step_size blocks.
    • random - chaos, for "map the block space" runs where you don't want to bias the outcome.
    • focus_early / focus_mid / focus_late - hand-tuned profiles favoring each third of the stack.
    • custom - your own values via the 40 block_0_strengthblock_39_strength floats.

    Only pattern and base_strength are required. The rest (peak_block, spread, step_size, the 40 custom floats) are optional and only matter for the patterns that use them.

    Outputs: block_strengths (BLOCK_STRENGTHS, the object WanVideoAdvancedActivationEditor consumes) and strength_visualization - a ready-made ASCII/bar representation of the curve, handy for a quick look or for feeding WanVideoStrengthVisualizer if you want it pretty.

    Install

    It's part of fblissjr/ComfyUI-WanActivationEditor, so the install is the pack install: ComfyUI Manager (search "ComfyUI-WanActivationEditor") or

    cd ComfyUI/custom_nodes
    git clone https://github.com/kijai/ComfyUI-WanVideoWrapper   # required first
    git clone https://github.com/fblissjr/ComfyUI-WanActivationEditor
    cd ComfyUI-WanActivationEditor && pip install -r requirements.txt
    

    then restart ComfyUI. Dependencies are torch, numpy, duckdb, zstandard - nothing exotic.

    The honest caveat

    Read the WanVideoAdvancedActivationEditor article for the full story, but the short version: the runtime patch code doesn't yet consume per-block strengths, so these curves are stored and visualized but may not change the actual injection in the current build. That doesn't make this node useless - the pattern math is solid, the visualization is real, and the plumbing is being built out. It just means you shouldn't expect the gaussian peak to produce a measurably different render from uniform strength today. Use it to design and visualize your hypothesis; check the repo periodically for the patch to catch up.

    CategoryWanVideoWrapper/Advanced

    Inputs (45)

    NameTypeDefaultDescription
    patternCOMBO12 options: custom, uniform, linear_decay, linear_rise, gaussian_peak, inverse_gaussian, +6
    base_strengthFLOAT0.500–1
    peak_blockoptINT200–39
    spreadoptFLOAT5.00.5–20
    step_sizeoptINT51–20
    block_0_strengthoptFLOAT0.000–1
    block_1_strengthoptFLOAT0.000–1
    block_2_strengthoptFLOAT0.000–1
    block_3_strengthoptFLOAT0.000–1
    block_4_strengthoptFLOAT0.000–1
    block_5_strengthoptFLOAT0.000–1
    block_6_strengthoptFLOAT0.000–1
    block_7_strengthoptFLOAT0.000–1
    block_8_strengthoptFLOAT0.000–1
    block_9_strengthoptFLOAT0.000–1
    block_10_strengthoptFLOAT0.000–1
    block_11_strengthoptFLOAT0.000–1
    block_12_strengthoptFLOAT0.000–1
    block_13_strengthoptFLOAT0.000–1
    block_14_strengthoptFLOAT0.000–1
    block_15_strengthoptFLOAT0.000–1
    block_16_strengthoptFLOAT0.000–1
    block_17_strengthoptFLOAT0.000–1
    block_18_strengthoptFLOAT0.000–1
    block_19_strengthoptFLOAT0.000–1
    block_20_strengthoptFLOAT0.000–1
    block_21_strengthoptFLOAT0.000–1
    block_22_strengthoptFLOAT0.000–1
    block_23_strengthoptFLOAT0.000–1
    block_24_strengthoptFLOAT0.000–1
    block_25_strengthoptFLOAT0.000–1
    block_26_strengthoptFLOAT0.000–1
    block_27_strengthoptFLOAT0.000–1
    block_28_strengthoptFLOAT0.000–1
    block_29_strengthoptFLOAT0.000–1
    block_30_strengthoptFLOAT0.000–1
    block_31_strengthoptFLOAT0.000–1
    block_32_strengthoptFLOAT0.000–1
    block_33_strengthoptFLOAT0.000–1
    block_34_strengthoptFLOAT0.000–1
    block_35_strengthoptFLOAT0.000–1
    block_36_strengthoptFLOAT0.000–1
    block_37_strengthoptFLOAT0.000–1
    block_38_strengthoptFLOAT0.000–1
    block_39_strengthoptFLOAT0.000–1

    Outputs (2)

    NameTypeDescription
    block_strengthsBLOCK_STRENGTHS
    strength_visualizationSTRING