LatentPhaseMagnitudePower
A nonlinear curve over a latent's structure and texture
- latent_0_batch
- phase_luminositys
- phase_cyan_reds
- phase_lime_purples
- phase_pattern_structures
- magnitude_luminositys
- magnitude_cyan_reds
- magnitude_lime_purples
- magnitude_pattern_structures
- LATENT
The last of RES4LYF's four phase/magnitude nodes, and the most aggressive one. LatentPhaseMagnitudeMultiply scales a latent's structure and texture linearly; LatentPhaseMagnitudeOffset shifts them by a fixed amount; LatentPhaseMagnitudePower raises them to a power instead - a nonlinear curve that compresses small values and stretches large ones (or the reverse, depending on the exponent), rather than a flat adjustment across the board.
Same idea as the rest of the family underneath: decompose a latent's channels into phase (structure) and magnitude (texture/energy), and give you a per-channel dial. This one is for when scaling or shifting isn't giving you the shape of change you want and you need something more like a gamma curve.
How it works
Each of the four channels - luminosity, cyan-red, lime-purple, pattern-structure - gets its phase and magnitude raised to the corresponding phase_*/magnitude_* exponent, all defaulting to 1 (which is a genuine no-op for a power operation: anything to the power of 1 is unchanged). latent_0_normal and latent_out_normal toggle normalization in and out, both off by default.
Because phase is fundamentally an angle rather than a plain magnitude, exponentiating it is a more unusual operation than exponentiating a texture-energy value - expect it to behave less predictably than the magnitude side, and treat both as something to feel out experimentally rather than reason about from first principles.
The inputs and outputs that matter
latent_0_batch- the latent you're adjusting.phase_luminosity,phase_cyan_red,phase_lime_purple,phase_pattern_structure- exponents applied to each channel's structural component.magnitude_luminosity,magnitude_cyan_red,magnitude_lime_purple,magnitude_pattern_structure- exponents applied to each channel's texture/energy component.latent_0_normal/latent_out_normal(defaultfalse) - normalization toggles.- Optional
SIGMASvariants of each exponent, for scheduling the curve across steps. - Output:
LATENT- the reshaped latent.
How to install it
Via ComfyUI Manager, search "RES4LYF" and install. Manually, from ComfyUI/custom_nodes:
git clone https://github.com/ClownsharkBatwing/RES4LYF/
cd RES4LYF
pip install -r requirements.txt
Activate a venv first if you use one; on portable builds, swap pip for python_embedded\Scripts\pip.exe. Restart ComfyUI afterward.
Common issues & troubleshooting
Everything at 1 looks unchanged. That's expected here - unlike the Offset node in this family, a power of 1 genuinely is a no-op, so the default is a safe starting point.
Values under 1 or above 1 behave unpredictably. Because you're exponentiating raw frequency-domain values (including phase, which wraps as an angle), small changes to the exponent can produce disproportionate visual shifts, especially on the magnitude side where you're compressing or expanding an energy distribution. Move in small steps and compare against the unmodified latent rather than guessing a target value up front.
You wanted a flat scale or shift instead. A power curve treats small and large values differently by design; if you want every value nudged by the same proportion or the same amount regardless of size, use LatentPhaseMagnitudeMultiply or LatentPhaseMagnitudeOffset instead.
No write-ups exist for this node. As with its siblings, there's no community documentation beyond the schema itself. Isolate one channel at a time on a fixed seed if you're trying to understand what it's actually doing before combining several changes at once.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| latent_0_batch | LATENT | — | |
| phase_luminosity | FLOAT | 1.000-10000–10000 | — |
| phase_cyan_red | FLOAT | 1.000-10000–10000 | — |
| phase_lime_purple | FLOAT | 1.000-10000–10000 | — |
| phase_pattern_structure | FLOAT | 1.000-10000–10000 | — |
| magnitude_luminosity | FLOAT | 1.000-10000–10000 | — |
| magnitude_cyan_red | FLOAT | 1.000-10000–10000 | — |
| magnitude_lime_purple | FLOAT | 1.000-10000–10000 | — |
| magnitude_pattern_structure | FLOAT | 1.000-10000–10000 | — |
| latent_0_normal | BOOLEAN | false | — |
| latent_out_normal | BOOLEAN | false | — |
| phase_luminositysopt | SIGMAS | — | |
| phase_cyan_redsopt | SIGMAS | — | |
| phase_lime_purplesopt | SIGMAS | — | |
| phase_pattern_structuresopt | SIGMAS | — | |
| magnitude_luminositysopt | SIGMAS | — | |
| magnitude_cyan_redsopt | SIGMAS | — | |
| magnitude_lime_purplesopt | SIGMAS | — | |
| magnitude_pattern_structuresopt | SIGMAS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |