Download SwarmMath.py from Goodis/SwarmComfyCommon: direct link, hf CLI and curl.
- Browser
- Download file 583 Bytes
-
https://huggingface.co/Goodis/SwarmComfyCommon/resolve/main/SwarmMath.py
- Command line
-
hf download hf://Goodis/SwarmComfyCommon/SwarmMath.py
-
curl -L -o SwarmMath.py https://huggingface.co/Goodis/SwarmComfyCommon/resolve/main/SwarmMath.py
583 Bytes
| class SwarmIntAdd: | |
| def INPUT_TYPES(s): | |
| return { | |
| "required": { | |
| "a": ("INT", {"default": 0, "min": -2147483647, "max": 2147483647}), | |
| "b": ("INT", {"default": 0, "min": -2147483647, "max": 2147483647}) | |
| } | |
| } | |
| CATEGORY = "SwarmUI/math" | |
| RETURN_TYPES = ("INT",) | |
| FUNCTION = "add" | |
| DESCRIPTION = "Adds two integers. Use a negative number to subtract." | |
| def add(self, a, b): | |
| return (a + b,) | |
| NODE_CLASS_MAPPINGS = { | |
| "SwarmIntAdd": SwarmIntAdd | |
| } | |