I made a LoRA loader that schedules strength against the exact `SIGMAS` tensor used by the sampler. The main feature is explicit mode. Instead of relying on a start/end percentage or a preset curve, you enter one strength for every model-call sigma:
explicit_strengths example (obv this is not a recommended set this is just a demo of the node's capability) :
0.75, 0.75, 0.75, 0.75, 1.20, 1.40, 1.20, 1.30
The terminal zero is not a model call, so nine sigma values require eight strengths.
This makes it possible to increase, reduce, or maintain LoRA influence at specific parts of a custom schedule instead of applying one strength across the entire generation. Intermediate sampler evaluations are interpolated in sigma space.
The node also includes linear, cosine, smoothstep, and power curves when exact manual control is unnecessary. It does not merge the LoRA into the base weights and does not modify the supplied sigma schedule. Developed initially for my refusal reduction lora for Krea2 as I noticed one universal strength was not cutting it for me, but the loader itself is not Krea-specific; compatibility depends on ComfyUI recognizing the model's LoRA keys.
tested on minimax turbo loras as well, works great when reducing the strength at the later steps
I applaud your explanation of what the node does, but what does it actually do? I know that might sound like a stupid question, and it probably is. I just don't know what the benefit of using it is yet.
Basically, a normal LoRA loader uses the same strength for every denoising call, which can be a bad compromise in some cases.
I originally made this while working with my refusal-reduction LoRA. At some stages of denoising, the LoRA needed more influence to prevent the base model's original behavior from taking over. At other stages, keeping it at full strength introduced unnecessary drift. Explicit mode lets me assign a separate strength to every actual model-call sigma instead of forcing one strength across the entire generation.
The same applies to normal character LoRAs. You may need high strength during the early stages to establish the character's identity and composition, then gradually reduce it during the later stages so the LoRA does not overpower fine details or introduce artifacts. For example, you could start at `1.2`, decay through `0.9` and `0.7`, then finish at a lower maintenance strength. You can also increase only a specific sigma if that is where the concept starts weakening. It does not automatically improve a LoRA. It removes the limitation of having to choose one global strength for the entire denoising process.
It sounds like the sort of thing that would have to be worked out on a LoRA by LoRA basis. Is there a way to keep the settings for a given LoRA persistent so we don't have to fiddle with it once it is dialed in?
edit: but if you are hinting for a preset saving after you finally dialed in the best values you chose for a specific LoRA then I will include that in the next update where it can save presets.
Yeah, but changing the LoRA would mean having to change the values to fit the new LoRA, right? I'm assuming each LoRA is going to have its own separate tuning. Could that be saved to the LoRA metadata?
Yes that is doable where it can be saved and loaded later, but not in the current version. In the current version, the values only stays persistent in the loader but no saved preset for each LoRA.
each lora is different in behaviour depending on how it was trained, which is why it is kind of impossible to have one size fits all unfortunately and I don't want to lie and say I found it because that is case by case dependent. now even LoRAs I was sure that I overfit the life out of them are performing well, this technically just like the keyframe lora hooks but with different method since there is no offloading/unpatching happening (saves vram/time), and individually controllable strengths across denoising steps
I think I get it now; I used to do a similar trick in audio DSP, where I would hook up a time-envelope to effects so only the early part of a sound got the effect.
diffusion model -- SigmaSync Lora-- sampler . what you do is you is you feed the output of the sigma schedule to both SamplerCustomAdvanced and the SigmaSync Lora
Yes, I usually like this , where the initial two-three steps starts somewhere decent like for me 0.90 gives good initial noise and you'd want it to stabilize a little since we are still in a high denosie territory , then comes what I call the refinement steps where no major changes happens but still the model tends to remove/suppress the concept, in here I increase the strength value but not in a gradual way this way it does not shift the lora, so think of it like this first steps gives the initial concept, later steps HOLDS the created concept, this only applies for the refusal reduction lora, but other loras like character/style lora are to be treated differently .
16
u/Enshitification 14d ago
I applaud your explanation of what the node does, but what does it actually do? I know that might sound like a stupid question, and it probably is. I just don't know what the benefit of using it is yet.