SonarLatentOperationAdvanced
Schedule, scale, and blend any latent operation
- operation
- operation_alt
- operation_2
- operation_3
- operation_4
- operation_5
- LATENT_OPERATION
SonarLatentOperationAdvanced is the control wrapper for the pack's LATENT_OPERATION system. A latent operation by itself just runs and does its thing; this node lets you decide when it runs (scheduling by sigma), how hard it hits (multipliers), and how its effect combines with the latent (blend modes). It's the difference between "inject noise during sampling" and "inject noise only between sigma 8 and sigma 3, at 40% strength, blended rather than added." If you find yourself needing precision on top of an operation, this is where you build it.
How it works
You feed an operation in, and it gets wrapped with all the controls. The architecture matters: the effect is computed as the difference the operation makes from the input, and then that change is scaled and blended back in. That's what makes the multipliers and blend knobs behave so predictably.
The schedule is sigma-based, which is the right unit for "when during denoising":
start_sigma- first sigma the effect is active. Default -1 is the pack's "auto" - it uses whatever the model's maximum sigma is.end_sigma- last sigma it's active. Default 0 (the end of sampling).
The multipliers, applied in order:
input_multiplier- scales what goes into the operation. Notably, the multiplied input is not used when calculating the difference, so this changes what the operation sees, not how the effect is measured.output_multiplier- scales what comes out, before blending or difference calculation.difference_multiplier- scales the difference (the actual change), afteroutput_multiplierand before blending.
Then the blend:
blend_mode-lerp,inject(default), orsubtract_b.injectadds the change scaled by blend strength - at 1.0 it's just the operation's raw output, no modification.blend_strength- default 0.5, how much of the change gets through.
The scheduling trick
The optional operation_alt input is genuinely clever. It's an alternative operation used when the primary isn't enabled. The tooltip's example: you want one operation between sigma 1.0 and 0.5, then a different operation below 0.5 - which is annoying to specify by hand (you'd have to set the second one to start at 0.499999). With operation_alt, you give the second operation and the handoff happens cleanly at the boundary. There are also operation_2 through operation_5 inputs that run in sequence before blending and output scaling, so this one node can orchestrate a whole chain of operations.
Where you'd use it
Any place you're combining this pack's operations with intention: schedule SonarLatentOperationNoise to only inject during the detail-forming mid-steps, blend a SonarLatentOperationQuantileFilter in softly instead of hard, or run several operations in sequence and scale the total effect. It's also the natural front door to the pack's FreeU-Extreme-style workflows, which are built on filtered, scheduled, blended operations.
Install
ComfyUI Manager → search "ComfyUI-sonar" → Install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/blepping/ComfyUI-sonar
No models, no extra deps. The author's ComfyUI-bleh pack upgrades the blend menu from three modes to "any blend mode it provides" - worth installing if you find yourself wanting fancier blends than lerp/inject/subtract_b.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| operation | LATENT_OPERATION | Latent operation to apply. | |
| start_sigma | FLOAT | -1.000-1–10000 | First sigma the effect becomes active. You can set a negative value here to use whatever the model's maximum sigma is. |
| end_sigma | FLOAT | 0.0000–10000 | Last sigma the effect is active. |
| input_multiplier | FLOAT | 1.000-10000–10000 | Flat multiplier on the input to the latent operation. The multiplied input is *not* used when calculating the difference, it is only passed to the operation. |
| output_multiplier | FLOAT | 1.000-10000–10000 | Flat multiplier on the output from the latent operation. Occurs before blending or calculating the difference. |
| difference_multiplier | FLOAT | 1.000-10000–10000 | Flat multiplier on the difference or change from the original that the operation performed. Occurs after output_multiplier and before blending applies. |
| blend_mode | COMBO | inject | Controls how the change from the operation is combined with the input. The default of inject just adds it scaled by the blend strength. With 1.0 blend strength, this is just using the output from the operation with no change. |
| blend_strength | FLOAT | 0.500-10000–10000 | Strength of the blend. |
| operation_altopt | LATENT_OPERATION | Optional alternative operation that will be used when the primary one isn't enabled. May be useful in a case when you want one operation between sigma 1.0 and 0.5 and then a difference operation for lower sigmas which is kind of annoying to specify manually (you'd need to do something like configure another operation to start at 0.499999 or something). | |
| operation_2opt | LATENT_OPERATION | Optional LATENT_OPERATION. The operations will be applied in sequence. | |
| operation_3opt | LATENT_OPERATION | Optional LATENT_OPERATION. The operations will be applied in sequence. | |
| operation_4opt | LATENT_OPERATION | Optional LATENT_OPERATION. The operations will be applied in sequence. | |
| operation_5opt | LATENT_OPERATION | Optional LATENT_OPERATION. The operations will be applied in sequence. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT_OPERATION | LATENT_OPERATION | — |