@@ -0,0 +1,41 @@
|
||||
"""
|
||||
@author: initials AMA
|
||||
@title: Ardenius
|
||||
@nickname: Ardenius
|
||||
@description: ARD float: outputs an float number
|
||||
"""
|
||||
# licensed under General Public License v3.0 all rights reserved © 2024
|
||||
# ( author initials AMAA Nickname Ardenius contact information ardenius7@gmail.com attribution link https://ko-fi.com/ardenius )
|
||||
# ➡️ follow me at https://ko-fi.com/ardenius in the top right corner (follow)
|
||||
# 📸 Change the mood ! by Visiting my AI Image Gallery
|
||||
# 🏆 Support me by getting Premium Members only Perks (Premium SD Models, ComfyUI custom nodes, and more to come)
|
||||
# below code is based upon ComfyUI code licensed under General Public License v3.0 https://www.gnu.org/licenses/gpl-3.0.txt by
|
||||
# contributers found here https://github.com/comfyanonymous/ComfyUI
|
||||
# thus all code here is released to the user as per the GPL V3.0 terms.
|
||||
|
||||
class ARD_FLOAT:
|
||||
# def __init__(self):
|
||||
# pass
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"Fx": ("FLOAT", {"default": 1, "tooltip": "input a float"}),
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_NAMES = ("float",)
|
||||
RETURN_TYPES = ("FLOAT",)
|
||||
FUNCTION = "ard_float"
|
||||
|
||||
CATEGORY = "Ardenius"
|
||||
DESCRIPTION = "ARD float: outputs a float number"
|
||||
|
||||
def ard_integer(self, Fx):
|
||||
|
||||
if not isinstance(Fx, float):
|
||||
output_float = float(Fx)
|
||||
else:
|
||||
output_float = Fx
|
||||
|
||||
return (output_float,)
|
||||
@@ -0,0 +1,41 @@
|
||||
"""
|
||||
@author: initials AMA
|
||||
@title: Ardenius
|
||||
@nickname: Ardenius
|
||||
@description: ARD integer: outputs an integer number
|
||||
"""
|
||||
# licensed under General Public License v3.0 all rights reserved © 2024
|
||||
# ( author initials AMAA Nickname Ardenius contact information ardenius7@gmail.com attribution link https://ko-fi.com/ardenius )
|
||||
# ➡️ follow me at https://ko-fi.com/ardenius in the top right corner (follow)
|
||||
# 📸 Change the mood ! by Visiting my AI Image Gallery
|
||||
# 🏆 Support me by getting Premium Members only Perks (Premium SD Models, ComfyUI custom nodes, and more to come)
|
||||
# below code is based upon ComfyUI code licensed under General Public License v3.0 https://www.gnu.org/licenses/gpl-3.0.txt by
|
||||
# contributers found here https://github.com/comfyanonymous/ComfyUI
|
||||
# thus all code here is released to the user as per the GPL V3.0 terms.
|
||||
|
||||
class ARD_INTEGER:
|
||||
# def __init__(self):
|
||||
# pass
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"Ix": ("INT", {"default": 1, "tooltip": "input an integer or float"}),
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_NAMES = ("integer",)
|
||||
RETURN_TYPES = ("INT",)
|
||||
FUNCTION = "ard_integer"
|
||||
|
||||
CATEGORY = "Ardenius"
|
||||
DESCRIPTION = "ARD integer: outputs an integer number"
|
||||
|
||||
def ard_integer(self, Ix):
|
||||
|
||||
if not isinstance(Ix, int):
|
||||
output_integer = int(Ix)
|
||||
else:
|
||||
output_integer = Ix
|
||||
|
||||
return (output_integer,)
|
||||
@@ -0,0 +1,40 @@
|
||||
"""
|
||||
@author: initials AMA
|
||||
@title: Ardenius
|
||||
@nickname: Ardenius
|
||||
@description: ARD integer: outputs an integer number
|
||||
"""
|
||||
# licensed under General Public License v3.0 all rights reserved © 2024
|
||||
# ( author initials AMAA Nickname Ardenius contact information ardenius7@gmail.com attribution link https://ko-fi.com/ardenius )
|
||||
# ➡️ follow me at https://ko-fi.com/ardenius in the top right corner (follow)
|
||||
# 📸 Change the mood ! by Visiting my AI Image Gallery
|
||||
# 🏆 Support me by getting Premium Members only Perks (Premium SD Models, ComfyUI custom nodes, and more to come)
|
||||
# below code is based upon ComfyUI code licensed under General Public License v3.0 https://www.gnu.org/licenses/gpl-3.0.txt by
|
||||
# contributers found here https://github.com/comfyanonymous/ComfyUI
|
||||
# thus all code here is released to the user as per the GPL V3.0 terms.
|
||||
|
||||
class ARD_INTEGER_TO_FLOAT:
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"Ix": ("INT", {"default": 1, "tooltip": "input an integer"}),
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_NAMES = ("float",)
|
||||
RETURN_TYPES = ("FLOAT",)
|
||||
FUNCTION = "ard_integer_to_float"
|
||||
|
||||
CATEGORY = "Ardenius"
|
||||
DESCRIPTION = "ARD integer to float: converts an input integer to float"
|
||||
|
||||
def ard_integer_to_float(self, Ix):
|
||||
|
||||
if not isinstance(Ix, float):
|
||||
output_float = float(Ix)
|
||||
else:
|
||||
output_float = Ix
|
||||
|
||||
return (output_float,)
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
"""
|
||||
@author: initials AMA
|
||||
@title: Ardenius
|
||||
@nickname: Ardenius
|
||||
@description: ARD Integer variable
|
||||
"""
|
||||
# licensed under General Public License v3.0 all rights reserved © 2024
|
||||
# ( author initials AMAA Nickname Ardenius contact information ardenius7@gmail.com attribution link https://ko-fi.com/ardenius )
|
||||
# ➡️ follow me at https://ko-fi.com/ardenius in the top right corner (follow)
|
||||
# 📸 Change the mood ! by Visiting my AI Image Gallery
|
||||
# 🏆 Support me by getting Premium Members only Perks (Premium SD Models, ComfyUI custom nodes, and more to come)
|
||||
# below code is based upon ComfyUI code licensed under General Public License v3.0 https://www.gnu.org/licenses/gpl-3.0.txt by
|
||||
# contributers found here https://github.com/comfyanonymous/ComfyUI
|
||||
# thus all code here is released to the user as per the GPL V3.0 terms.
|
||||
|
||||
class ARD_MATH:
|
||||
# def __init__(self):
|
||||
# pass
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"Ix": ("FLOAT", {"default": 1.0, "min": 0.1, "max": 9999999, "step": 0.1, "tooltip": "input float if you want to input integer use ARD integer to float node"}),
|
||||
"Iy": ("FLOAT", {"default": 1.0, "min": 0.1, "max": 9999999, "step": 0.1, "tooltip": "input float if you want to input integer use ARD integer to float node"}),
|
||||
"operation": (["multiply", "divide", "subtract", "add"], {"default": "divide", "tooltip": "pick math operation"}),
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_NAMES = ("result_integer", "result_float")
|
||||
RETURN_TYPES = ("INT", "FLOAT")
|
||||
FUNCTION = "ard_math"
|
||||
|
||||
CATEGORY = "Ardenius"
|
||||
DESCRIPTION = "ARD math node mathematical operations node."
|
||||
|
||||
def ard_math(self, Ix, Iy, operation):
|
||||
|
||||
if isinstance(Ix, int):
|
||||
Ix = float(Ix)
|
||||
elif isinstance(Ix, float):
|
||||
pass
|
||||
else:
|
||||
print("ARD math node ERROR: inputs need to be either integer or float")
|
||||
return 0, 0
|
||||
if isinstance(Iy, int):
|
||||
Iy = float(Iy)
|
||||
elif isinstance(Iy, float):
|
||||
pass
|
||||
else:
|
||||
print("ARD math node ERROR: inputs need to be either integer or float")
|
||||
return 0, 0
|
||||
|
||||
if operation == "multiply":
|
||||
result_integer = int(Ix * Iy)
|
||||
elif operation == "divide":
|
||||
result_integer = int(Ix/Iy)
|
||||
elif operation == "subtract":
|
||||
result_integer = int(Ix - Iy)
|
||||
elif operation == "add":
|
||||
result_integer = int(Ix + Iy)
|
||||
else:
|
||||
print("pick a math operation")
|
||||
result_integer = 0
|
||||
|
||||
if operation == "multiply":
|
||||
result_float = float(Ix * Iy)
|
||||
elif operation == "divide":
|
||||
result_float = float(Ix / Iy)
|
||||
elif operation == "subtract":
|
||||
result_float = float(Ix - Iy)
|
||||
elif operation == "add":
|
||||
result_float = float(Ix + Iy)
|
||||
else:
|
||||
print("ARD Math ERROR: pick a math operation")
|
||||
result_float = 0.0
|
||||
|
||||
return (result_integer, result_float)
|
||||
+1
-1
@@ -1 +1 @@
|
||||
civitai
|
||||
|
||||
|
||||
Reference in New Issue
Block a user