Nodes/ComfyUI-Dynamic-Lora-Scheduler/Adaptive LoRA Scheduler
ComfyUI Node

Adaptive LoRA Scheduler

Step-blend two Wan LoRAs, or let your input image pick the curve

By LeonQ8·Created 9 months ago·Updated 9 months ago· 3
Adaptive LoRA Scheduler
  • lora_high
  • lora_low
  • images
  • lora_high
  • lora_low
steps30
start_step0
end_step-1
blend_strategylinear
invertfalse
adaptive_modefrequency_analysis
tuning_goalStandard
adaptive_intensity1.0
preview_onlyfalse
diagram_enabledtrue
custom_curve

The README opens by calling this node a failure, and honestly, that's the most useful thing in it. The author's own words: "I TRIED TO DO SOMETHING BENEFICIAL AND NEW, BUT IT TURNED OUT AS A FAILURE, MAYBE I DIDN'T TEST IT ENOUGH AND SOMEONE ELSE WILL FIND IT USEFUL." So you're walking into an experiment, not a polished tool. But the idea is sound, and if you're doing Wan 2.2 image-to-video it's worth 20 minutes to see if it clicks for you.

Here's the problem it attacks. In a native ComfyUI Wan workflow, LoRAs go in through WanVideoLoraSelectWanVideoSetLoRAs, and every LoRA is stuck at one strength for the whole generation. But Wan 2.2's two-pass architecture means what you want early (structure, motion, composition) isn't what you want late (detail, texture). The community already half-knows this - the "speed LoRAs kill everything good in Wan 2.2" saga is really people fighting over where in the schedule a LoRA should bite. This node automates that fight: it takes two LoRA stacks and blends their strengths across the denoising steps on a curve.

What it actually does

You give it two WANVIDLORA stacks - lora_high (your "target/end" LoRA) and lora_low (your "start/base" LoRA). It builds a 0→1 curve across start_step to end_step, then rewrites each LoRA's strength from a single number into a per-step array, setting merge_loras=False so the two stacks stay separate. By default it's a High→Low fade: the high LoRA starts at full strength and bleeds out; the low LoRA is its mirror (1 − curve). invert flips the direction.

The outputs are lora_high and lora_low, and here's the wiring that trips people: each goes into its own WanVideoSetLoRAs node, chained after whatever speed/character LoRA you already have. ComfyUI applies patches sequentially, so it's Model Loader → WanVideoSetLoRAs (speed LoRA) → WanVideoSetLoRAs (lora_high) → WanVideoSetLoRAs (lora_low) → Sampler. The shipped example workflow does exactly this, with two WanVideoSampler nodes for Wan 2.2's two-pass setup.

The inputs that matter

  • lora_high / lora_low - wire these straight from WanVideoLoraSelect nodes.
  • steps, start_step, end_step - set steps to match your sampler; start/end define the range the blend lives in. end_step = -1 means "to the end." The README's one real piece of advice: match start/end to your sampler's actual step count, or the curve will be off.
  • blend_strategy - linear, ease-in, ease-out, sigmoid. Default linear is fine; sigmoid gives you a distinct phase separation.
  • adaptive_mode, tuning_goal, adaptive_intensity - the "Adaptive" part. Feed your I2V source image into images and it measures complexity via FFT: the ratio of high-frequency to low-frequency energy (or a basic variance check if you pick that mode). Textured input gets a convex curve that drops the high LoRA fast; smooth input sags and keeps it longer. tuning_goal sets the philosophy - Preserve Details protects busy images, Encourage Motion pushes static ones - and adaptive_intensity scales the reaction (0 is off, 2+ is aggressive).

It prints the per-step blend weights to the console, and with diagram_enabled on, renders the curve plus a complexity score right on the node via matplotlib. That visual is the nicest part of the whole thing - you see where High and Low swap dominance before you burn a 25-minute render.

Caveats, from the actual code

Two UI options don't do anything yet: custom_curve is accepted but never consumed (selecting it falls back to linear), and preview_only is a no-op in the shipped Python. Consistent with the "didn't test it enough" label - don't build a workflow on either. Community footprint is also essentially zero (no reddit discussion, ~5 impressions), so treat every result as a discovery.

Install

The usual, and it's light. ComfyUI Manager (search "ComfyUI-Dynamic-Lora-Scheduler"), or:

cd ComfyUI/custom_nodes
git clone https://github.com/LeonQ8/ComfyUI-Dynamic-Lora-Scheduler.git
cd ComfyUI-Dynamic-Lora-Scheduler
pip install -r requirements.txt   # numpy>=1.20.0, matplotlib>=3.3.0

Then restart ComfyUI. No model downloads - it owns no weights. It does need a recent ComfyUI for native Wan nodes plus the send_progress_text API the diagram uses. The only real dependency risk is matplotlib colliding with another pack's pin in your shared environment; if imports start breaking after install, that's where to look.

Troubleshooting

  • No diagram on the node - diagram_enabled off, or matplotlib missing (the README calls this one out explicitly).
  • Adaptive mode seems inert - no images connected. Without it, adaptive is silently skipped and you get the plain curve.
  • The blend looks wrong - steps almost certainly doesn't match your sampler's step count. They have to agree.
  • Something's off and you can't see why - the console prints are unusually detailed (strategy, per-step weights, complexity score). Read them before you blame the node.

If you're on Wan 2.2 I2V with a "structure" LoRA and a "detail" LoRA fighting each other, this is the shortest path to letting the image itself pick the compromise. Just keep the rough edges - and the author's own warning - in mind before you bet a workflow on it.

CategoryWanVideo/Scheduling

Inputs (14)

NameTypeDefaultDescription
lora_highWANVIDLORAHigh-frequency LoRA (target/end state)
lora_lowWANVIDLORALow-frequency LoRA (start state)
stepsINT301–1000Total generation steps
start_stepINT00–1000Step to begin blending
end_stepINT-1-1–1000Step to end blending (-1 = end)
blend_strategyCOMBOlinearBlend Curve Shape: Linear: Constant transition. Ease-In: Slow start, fast end. Ease-Out: Fast start, slow end. Sigmoid: S-curve (slow start & end). Custom: Use input curve.
invertBOOLEANfalseInvert blending direction (High→Low instead of Low→High)
adaptive_modeCOMBOfrequency_analysisModulates the blend curve based on image complexity. Frequency Analysis: Uses FFT to detect texture vs structure. Basic Variance: Simple contrast check.
tuning_goalCOMBOStandardHow to interpret the complexity: Standard: Balanced. Encourage Motion: For simple images, boosts High/Structure LoRA to force movement. Preserve Details: For complex images, reduces High LoRA to protect textures.
adaptive_intensityFLOAT1.00–5Strength of the adaptive effect.
preview_onlyBOOLEANfalseGenerate preview without processing LoRAs
diagram_enabledBOOLEANtrueShow the blend curve diagram in the UI.
custom_curveoptFLOAT
imagesoptIMAGEInput images for adaptive analysis (Single image for I2V, or video frames)

Outputs (2)

NameTypeDescription
lora_highWANVIDLORA
lora_lowWANVIDLORA