From 95287f3c891c7ffe014bbd9be4b0e14af88f6457 Mon Sep 17 00:00:00 2001 From: mcDandy Date: Sat, 30 Aug 2025 17:25:57 +0200 Subject: [PATCH 1/2] Update README.md --- README.md | 55 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index f245191..f3fb123 100644 --- a/README.md +++ b/README.md @@ -14,30 +14,31 @@ You can also get the node from comfy manager under the name of More math. # Features -- expression parsing with support for functions and variables: - - functions: - - run expressions on both components of CONDITIONING (not that I know what they do), LATENT, IMAGE, NOISE and FLOAT - - math operators (binary and unary +,- and ^,*,/,%) - - boolean operators (false = 0.0; true = 1.0) (<,<=,>,>=,==,!=) - - sin, cos, tan - - asin, acos, atan (can produce NaN outside range -1...1) - - atan2 (x,y) - - sinh, cosh, tanh - - asinh, acosh, atanh (can produce NaN outside range -1...1) - - abs, sqrt (produces NaN on negative numbers), ln (log with base e), log (base 10), exp, pow - - smin, tmin, smax, tmax, tnorm, snorm (norm and t prefixed are not applicable on float math node) - - s prefixed return one number - - t prefixed work element-wise - - floor, ceil, round, gamma, clamp, sigm (sigmoid) - - angle (audio node) - - variables - - a, b, c, d : inputs of type based on node - - w, x, y, z : each node allows use of 4 additional floats - - W : Width of tensor - does not work on FLOAT and CONDITIONING - - H : Height of tensor - does not work on FLOAT and CONDITIONING - - C : Channel of tensor - used as color chanel in IMAGE or as information channel in others. does not work on FLOAT and CONDITIONING - - B : Batch - does not work on FLOAT and CONDITIONING - - X : X position in tensor - does not work on FLOAT and CONDITIONING - - Y : Y position in tensor - does not work on FLOAT and CONDITIONING - - I : Tensor used to initalise sampler before noise injection - usually zeroed out and generated by Empty Latent Image node - Exclusive for NOISE - - use constant e and pi +- functions and variables in math expressions +- Nodes for CONDITIONING, LATENT, IMAGE, NOISE, FLOAT, and AUDIO + +## Operators +- Math: `+`, `-`, `*`, `/`, `%`, `^` +- Boolean: `<`, `<=`, `>`, `>=`, `==`, `!=` + (`false = 0.0`, `true = 1.0`) + +## Functions +- Basic: `abs`, `sqrt`, `ln`, `log`, `exp`, `pow` +- Trigonometric: `sin`, `cos`, `tan`, `asin`, `acos`, `atan`, `atan2` +- Hyperbolic: `sinh`, `cosh`, `tanh`, `asinh`, `acosh`, `atanh` +- Aggregates: `smin`, `smax` , `snorm` (scalar), `tmin`, `tmax`, `tnorm` (elementwise) +- Other: `floor`, `ceil`, `round`, `gamma`, `clamp`, `sigm` (sigmoid), `angle` (in ifft only) +- Audio-specific: `fft` (short-time FFT), `ifft` (inverse sFFT **always return audio back to time domain**) + +## Variables +- **Inputs**: `a`, `b`, `c`, `d` (matches node input type) +- **Extra floats**: `w`, `x`, `y`, `z` +- **Tensor positions**: `C` (channel), `B` (batch), `X`, `Y`, `W` (width), `H` (height) (not for FLOAT/AUDIO/CONDITIONING) +- **Special**: + - `I` – sampler init tensor (for NOISE only) + - `S` – current audio sample (AUDIO only) + - `T` – audio length (AUDIO only) + - `R` – sample rate (AUDIO only) + - `F` – frequency count (freq domain, iFFT only) + - `K` – current frequency (freq domain, iFFT only) +- Constants: `e`, `pi` From f04f76f1ea54a49b333c2094d4af6ecadb3d2d6e Mon Sep 17 00:00:00 2001 From: mcDandy Date: Sun, 31 Aug 2025 10:31:35 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f3fb123..7dc5dff 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ You can also get the node from comfy manager under the name of More math. - Hyperbolic: `sinh`, `cosh`, `tanh`, `asinh`, `acosh`, `atanh` - Aggregates: `smin`, `smax` , `snorm` (scalar), `tmin`, `tmax`, `tnorm` (elementwise) - Other: `floor`, `ceil`, `round`, `gamma`, `clamp`, `sigm` (sigmoid), `angle` (in ifft only) -- Audio-specific: `fft` (short-time FFT), `ifft` (inverse sFFT **always return audio back to time domain**) +- Audio-specific: `fft` (short-time FFT), `ifft` (inverse sFFT **always return audio back to time domain before leaving node**) ## Variables - **Inputs**: `a`, `b`, `c`, `d` (matches node input type)