diff --git a/README.md b/README.md index 7e0552d..2993e84 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ You can also get the node from comfy manager under the name of More math. - `smax(x, ...[, dims])`: scalar maximum across inputs; optionally reduce the first tensor/list input across `dims`. #### 2.3 Sorting / Selection / Indices -- `sort(x)`: tensors are sorted along the last dimension (`dim=-1`); lists use Python sorting. +- `sort(x, [descending], [dim])`: tensors are sorted along the specified dimension (`dim`); if `dim` is not specified, it defaults to the last dimension (`dim=-1`); lists use Python sorting. - `argsort(x, [descending], [dim])`: returns indices along `dim` (defaults to last dimension); `descending` defaults to `false`. - `argmin(x, [as_position])`: global minimum index for tensors; when `as_position` is truthy, returns coordinates as a list. - `argmax(x, [as_position])`: global maximum index for tensors; when `as_position` is truthy, returns coordinates as a list. diff --git a/more_math/AudioMathNode.py b/more_math/AudioMathNode.py index 74676b8..e2846b3 100644 --- a/more_math/AudioMathNode.py +++ b/more_math/AudioMathNode.py @@ -33,7 +33,7 @@ class AudioMathNode(io.ComfyNode): def define_schema(cls) -> io.Schema: return io.Schema( node_id="mrmth_ag_AudioMathNode", - category="More math", + category="More math/math", display_name="Audio math", inputs=[ io.Autogrow.Input(id="V",template=io.Autogrow.TemplatePrefix(io.Audio.Input("values", optional=True), prefix="V", min=1, max=50)), diff --git a/more_math/AudioToSpectrogramNode.py b/more_math/AudioToSpectrogramNode.py index c55411a..57956d3 100644 --- a/more_math/AudioToSpectrogramNode.py +++ b/more_math/AudioToSpectrogramNode.py @@ -15,7 +15,7 @@ class AudioToSpectrogram(io.ComfyNode): def define_schema(cls) -> io.Schema: return io.Schema( node_id="mrmth_AudioToImageSpectrogram", - category="More math", + category="More math/converters", display_name="Audio -> Spectrogram", inputs=[ io.Audio.Input(id="audio", tooltip="Input audio"), diff --git a/more_math/ClipMathNode.py b/more_math/ClipMathNode.py index 2b02fc0..ca38eb7 100644 --- a/more_math/ClipMathNode.py +++ b/more_math/ClipMathNode.py @@ -19,7 +19,7 @@ class CLIPMathNode(io.ComfyNode): return io.Schema( node_id="mrmth_ag_CLIPMathNode", display_name="CLIP Math", - category="More math", + category="More math/math", inputs=[ io.Autogrow.Input(id="V",template=io.Autogrow.TemplatePrefix(io.Clip.Input("values"), prefix="V", min=1, max=50)), io.Autogrow.Input(id="F", template=io.Autogrow.TemplatePrefix(io.Float.Input("float", default=0.0, optional=True, lazy=True, force_input=True), prefix="F", min=1, max=50)), diff --git a/more_math/ConditioningMathNode.py b/more_math/ConditioningMathNode.py index 1abea64..b4b10da 100644 --- a/more_math/ConditioningMathNode.py +++ b/more_math/ConditioningMathNode.py @@ -21,7 +21,7 @@ class ConditioningMathNode(io.ComfyNode): def define_schema(cls) -> io.Schema: return io.Schema( node_id="mrmth_ag_ConditioningMathNode", - category="More math", + category="More math/math", display_name="Conditioning math", inputs=[ io.Autogrow.Input(id="V",template=io.Autogrow.TemplatePrefix(io.Conditioning.Input("values"), prefix="V", min=1, max=50)), diff --git a/more_math/FloatMathNode.py b/more_math/FloatMathNode.py index ce31adc..1ccaad9 100644 --- a/more_math/FloatMathNode.py +++ b/more_math/FloatMathNode.py @@ -23,7 +23,7 @@ class FloatMathNode(io.ComfyNode): def define_schema(cls) -> io.Schema: return io.Schema( node_id="mrmth_ag_FloatMathNode", - category="More math", + category="More math/math", display_name="Float math", inputs=[ io.Autogrow.Input( diff --git a/more_math/GuiderMathNode.py b/more_math/GuiderMathNode.py index ecffed3..1ba8a6b 100644 --- a/more_math/GuiderMathNode.py +++ b/more_math/GuiderMathNode.py @@ -31,7 +31,7 @@ class GuiderMathNode(io.ComfyNode): def define_schema(cls) -> io.Schema: return io.Schema( node_id="mrmth_ag_GuiderMathNode", - category="More math", + category="More math/math", display_name="Guider math", inputs=[ io.Autogrow.Input(id="V", template=io.Autogrow.TemplatePrefix(io.Guider.Input("values"), prefix="V", min=1, max=50)), diff --git a/more_math/ImageMathNode.py b/more_math/ImageMathNode.py index 31458ec..136f0a1 100644 --- a/more_math/ImageMathNode.py +++ b/more_math/ImageMathNode.py @@ -22,7 +22,7 @@ class ImageMathNode(io.ComfyNode): def define_schema(cls) -> io.Schema: return io.Schema( node_id="mrmth_ag_ImageMathNode", - category="More math", + category="More math/math", display_name="Image math", inputs=[ io.Autogrow.Input(id="V",template=io.Autogrow.TemplatePrefix(io.Image.Input("values"), prefix="V", min=1, max=50)), diff --git a/more_math/LatentMathNode.py b/more_math/LatentMathNode.py index b0612b2..265bafc 100644 --- a/more_math/LatentMathNode.py +++ b/more_math/LatentMathNode.py @@ -35,7 +35,7 @@ class LatentMathNode(io.ComfyNode): return io.Schema( node_id="mrmth_ag_LatentMathNode", display_name="Latent math", - category="More math", + category="More math/math", inputs=[ io.Autogrow.Input(id="V",template=io.Autogrow.TemplatePrefix(io.Latent.Input("values"), prefix="V", min=1, max=50)), io.Autogrow.Input(id="F", template=io.Autogrow.TemplatePrefix(io.Float.Input("float", default=0.0, optional=True, lazy=True, force_input=True), prefix="F", min=1, max=50)), diff --git a/more_math/LoraMathNode.py b/more_math/LoraMathNode.py index 5bcde3e..cef0ac8 100644 --- a/more_math/LoraMathNode.py +++ b/more_math/LoraMathNode.py @@ -23,7 +23,7 @@ class LoraMathNode(io.ComfyNode): return io.Schema( node_id="mrmth_ag_LoraMathNode", display_name="Lora Math", - category="More math", + category="More math/math", inputs=[ io.Autogrow.Input(id="V", template=io.Autogrow.TemplatePrefix(io.LoraModel.Input("values"), prefix="V", min=1, max=50)), io.Autogrow.Input(id="F", template=io.Autogrow.TemplatePrefix(io.Float.Input("float", default=0.0, optional=True, lazy=True, force_input=True), prefix="F", min=1, max=50)), diff --git a/more_math/MaskMathNode.py b/more_math/MaskMathNode.py index fed527c..2bd718b 100644 --- a/more_math/MaskMathNode.py +++ b/more_math/MaskMathNode.py @@ -21,7 +21,7 @@ class MaskMathNode(io.ComfyNode): def define_schema(cls) -> io.Schema: return io.Schema( node_id="mrmth_ag_MaskMathNode", - category="More math", + category="More math/math", display_name="Mask math", inputs=[ io.Autogrow.Input(id="V",template=io.Autogrow.TemplatePrefix(io.Mask.Input("values"), prefix="V", min=1, max=50)), diff --git a/more_math/ModelMathNode.py b/more_math/ModelMathNode.py index b6ad1ae..eb18170 100644 --- a/more_math/ModelMathNode.py +++ b/more_math/ModelMathNode.py @@ -19,7 +19,7 @@ class ModelMathNode(io.ComfyNode): return io.Schema( node_id="mrmth_ag_ModelMathNode", display_name="Model Math", - category="More math", + category="More math/math", inputs=[ io.Autogrow.Input(id="V",template=io.Autogrow.TemplatePrefix(io.Model.Input("values"), prefix="V", min=1, max=50)), io.Autogrow.Input(id="F", template=io.Autogrow.TemplatePrefix(io.Float.Input("float", default=0.0, optional=True, lazy=True, force_input=True), prefix="F", min=1, max=50)), diff --git a/more_math/NoiseMathNode.py b/more_math/NoiseMathNode.py index 2e1c443..c1ec1ec 100644 --- a/more_math/NoiseMathNode.py +++ b/more_math/NoiseMathNode.py @@ -27,7 +27,7 @@ class NoiseMathNode(io.ComfyNode): return io.Schema( node_id="mrmth_ag_NoiseMathNode", display_name="Noise math", - category="More math", + category="More math/math", inputs=[ io.Autogrow.Input(id="V",template=io.Autogrow.TemplatePrefix(io.Noise.Input("values"), prefix="V", min=1, max=50)), io.Autogrow.Input(id="F", template=io.Autogrow.TemplatePrefix(io.Float.Input("float", default=0.0, optional=True, lazy=True, force_input=True), prefix="F", min=1, max=50)), diff --git a/more_math/SelectiveGuiderMathNode.py b/more_math/SelectiveGuiderMathNode.py index 4f46731..21c04f8 100644 --- a/more_math/SelectiveGuiderMathNode.py +++ b/more_math/SelectiveGuiderMathNode.py @@ -17,7 +17,7 @@ class SelectiveGuiderMathNode(io.ComfyNode): def define_schema(cls) -> io.Schema: return io.Schema( node_id="mrmth_ag_SelectiveGuiderMathNode", - category="More math", + category="More math/math", display_name="Selective guider math", inputs=[ io.Guider.Input("V"), diff --git a/more_math/SigmasMathNode.py b/more_math/SigmasMathNode.py index 97d4c54..36abfb1 100644 --- a/more_math/SigmasMathNode.py +++ b/more_math/SigmasMathNode.py @@ -19,7 +19,7 @@ class SigmasMathNode(io.ComfyNode): def define_schema(cls) -> io.Schema: return io.Schema( node_id="mrmth_ag_SigmasMathNode", - category="More math", + category="More math/math", display_name="Sigmas math", inputs=[ io.Autogrow.Input(id="V",template=io.Autogrow.TemplatePrefix(io.Sigmas.Input("values"), prefix="V", min=1, max=50)), diff --git a/more_math/SpectrogramToAudioNode.py b/more_math/SpectrogramToAudioNode.py index 27e14ca..c8ab163 100644 --- a/more_math/SpectrogramToAudioNode.py +++ b/more_math/SpectrogramToAudioNode.py @@ -14,7 +14,7 @@ class SpectrogramToAudio(io.ComfyNode): def define_schema(cls) -> io.Schema: return io.Schema( node_id="mrmth_ImageSpectrogramToAudio", - category="More math", + category="More math/converters", display_name="Spectrogram -> Audio", inputs=[ io.Image.Input(id="image", tooltip="Input spectrogram image (R=Real, G=Magnitude, B=Imaginary)"), diff --git a/more_math/StringMathNode.py b/more_math/StringMathNode.py index 3d0eb81..82ab33f 100644 --- a/more_math/StringMathNode.py +++ b/more_math/StringMathNode.py @@ -25,7 +25,7 @@ class StringMathNode(io.ComfyNode): def define_schema(cls) -> io.Schema: return io.Schema( node_id="mrmth_ag_StringMathNode", - category="More math", + category="More math/math", display_name="String math", inputs=[ io.Autogrow.Input(id="V",template=io.Autogrow.TemplatePrefix(io.String.Input("values"), prefix="V", min=1, max=50)), diff --git a/more_math/VaeMathNode.py b/more_math/VaeMathNode.py index 8734878..ef7f5f6 100644 --- a/more_math/VaeMathNode.py +++ b/more_math/VaeMathNode.py @@ -16,7 +16,7 @@ class VAEMathNode(io.ComfyNode): return io.Schema( node_id="mrmth_ag_VAEMathNode", display_name="VAE Math", - category="More math", + category="More math/math", inputs=[ io.Autogrow.Input(id="V",template=io.Autogrow.TemplatePrefix(io.Vae.Input("values"), prefix="V", min=1, max=50)), io.Autogrow.Input(id="F", template=io.Autogrow.TemplatePrefix(io.Float.Input("float", default=0.0, optional=True, lazy=True, force_input=True), prefix="F", min=1, max=50)), diff --git a/more_math/VideoMathNode.py b/more_math/VideoMathNode.py index e534edc..a8a3fae 100644 --- a/more_math/VideoMathNode.py +++ b/more_math/VideoMathNode.py @@ -58,7 +58,7 @@ class VideoMathNode(io.ComfyNode): def define_schema(cls) -> io.Schema: return io.Schema( node_id="mrmth_ag_VideoMathNode", - category="More math", + category="More math/math", display_name="Video math", inputs=[ io.Autogrow.Input(id="V",template=io.Autogrow.TemplatePrefix(io.Video.Input("values"), prefix="V", min=1, max=50)), diff --git a/more_math/nodes.py b/more_math/nodes.py index 92a15e0..c657ef1 100644 --- a/more_math/nodes.py +++ b/more_math/nodes.py @@ -49,7 +49,7 @@ class IntToFloatNode(io.ComfyNode): return io.Schema( node_id="mrmth_IntToFloat", display_name="Int -> Float", - category="More math", + category="More math/converters", inputs=[ io.Int.Input(id="value", default=0), ], @@ -73,7 +73,7 @@ class FloatToIntNode(io.ComfyNode): """ """ return io.Schema( node_id="mrmth_FloatToInt", - category="More math", + category="More math/converters", display_name="Float -> Int", inputs=[ io.Float.Input(id="value", default=0.0), @@ -98,7 +98,7 @@ class BoolToIntNode(io.ComfyNode): return io.Schema( node_id="mrmth_BoolToInt", display_name="Bool -> Int", - category="More math", + category="More math/converters", inputs=[ io.Boolean.Input(id="value", default=0), ], @@ -122,7 +122,7 @@ class IntToBoolNode(io.ComfyNode): """ """ return io.Schema( node_id="mrmth_IntToBool", - category="More math", + category="More math/converters", display_name="Int -> bool", inputs=[ io.Int.Input(id="value", default=0.0),