Updated sampler default values, added boolean logic and reverse

This commit is contained in:
ControlAltAI
2024-08-19 14:59:20 +05:30
parent a058cc50a8
commit f0a7f37aa6
4 changed files with 55 additions and 3 deletions
+7 -1
View File
@@ -1,17 +1,23 @@
from .flux_resolution_cal_node import FluxResolutionNode
from .flux_sampler_node import FluxSampler
from .flux_controlnet_node import FluxControlNetApply
from .boolean_basic_node import BooleanBasic
from .boolean_reverse_node import BooleanReverse
print("Initializing Flux Resolution Node, Flux Sampler Node, and Flux ControlNet Apply Node")
print("Initializing ControlAltAI Nodes")
NODE_CLASS_MAPPINGS = {
"FluxResolutionNode": FluxResolutionNode,
"FluxSampler": FluxSampler,
"FluxControlNetApply": FluxControlNetApply,
"BooleanBasic": BooleanBasic,
"BooleanReverse": BooleanReverse,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"FluxResolutionNode": "Flux Resolution Calculator",
"FluxSampler": "Flux Sampler",
"FluxControlNetApply": "Flux ControlNet",
"BooleanBasic": "Boolean Basic",
"BooleanReverse": "Boolean Reverse",
}
+23
View File
@@ -0,0 +1,23 @@
class BooleanBasic:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"boolean": ("BOOLEAN", {"default": False}),
},
}
RETURN_TYPES = ("BOOLEAN",)
FUNCTION = "process_boolean"
CATEGORY = "ControlAltAI Nodes/Logic"
def process_boolean(self, boolean):
return (boolean,)
NODE_CLASS_MAPPINGS = {
"BooleanBasic": BooleanBasic,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"BooleanBasic": "Boolean Basic",
}
+23
View File
@@ -0,0 +1,23 @@
class BooleanReverse:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"boolean": ("BOOLEAN", {"default": True}),
},
}
RETURN_TYPES = ("BOOLEAN",)
FUNCTION = "reverse_boolean"
CATEGORY = "ControlAltAI Nodes/Logic"
def reverse_boolean(self, boolean):
return (not boolean,)
NODE_CLASS_MAPPINGS = {
"BooleanReverse": BooleanReverse,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"BooleanReverse": "Boolean Reverse",
}
+2 -2
View File
@@ -18,9 +18,9 @@ class FluxSampler:
"model": ("MODEL",),
"conditioning": ("CONDITIONING",),
"latent_image": ("LATENT",),
"sampler_name": (FLUX_SAMPLER_NAMES, {"default": "heunpp2"}),
"sampler_name": (FLUX_SAMPLER_NAMES, {"default": "euler"}),
"scheduler": (FLUX_SCHEDULER_NAMES, {"default": "beta"}),
"steps": ("INT", {"default": 42, "min": 1, "max": 10000}),
"steps": ("INT", {"default": 30, "min": 1, "max": 10000}),
"denoise": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01}),
"noise_seed": ("INT", {"default": 143220275975594, "min": 0, "max": 0xffffffffffffffff}),
}