Files
Derfuu-Derfuu_ComfyUI_Modde…/__init__.py
T
Derfuu 665c3f10b1 Debug node get additional output to be able for use in-line with other nodes;
Removed(commented) "Tuples" nodes;
Removed "TUPLES" type from "Get size" nodes; (DON'T FORGET TO REPLACE THEM IF THEY'RE PERSISTS IN YOUR WORKFLOW)
Types moved into their own class with class methods and default parameters instead of just tuples with strings and dicts;
Added "Logic node" (>, <, =, AND, OR, XOR); (idk why i did this one, but got an idea that with object recognition models to count objects and correct them in next iterations would be not so bad idea as i think. Or something like this)
changed README.md to current state of this repo
2024-04-03 03:07:33 +03:00

82 lines
5.0 KiB
Python

import custom_nodes.Derfuu_ComfyUI_ModdedNodes.pyscripts.Nodes.Custom.Types as TypeNodes
import custom_nodes.Derfuu_ComfyUI_ModdedNodes.pyscripts.Nodes.Debug.Debug as DebugNodes
import custom_nodes.Derfuu_ComfyUI_ModdedNodes.pyscripts.Nodes.Functions.Converters as ConvNodes
import custom_nodes.Derfuu_ComfyUI_ModdedNodes.pyscripts.Nodes.Functions.GetSizes as GetSizes
import custom_nodes.Derfuu_ComfyUI_ModdedNodes.pyscripts.Nodes.Functions.Random as RandNodes
import custom_nodes.Derfuu_ComfyUI_ModdedNodes.pyscripts.Nodes.Functions.Tuples as TupleNodes
import custom_nodes.Derfuu_ComfyUI_ModdedNodes.pyscripts.Nodes.Math.SimpleMath as SMath
import custom_nodes.Derfuu_ComfyUI_ModdedNodes.pyscripts.Nodes.Math.Trigonometry as TMath
import custom_nodes.Derfuu_ComfyUI_ModdedNodes.pyscripts.Nodes.Custom.LogicNode as LNode
import custom_nodes.Derfuu_ComfyUI_ModdedNodes.pyscripts.Nodes.Modded.StandardInputs.Images as St_ImageNodes
import custom_nodes.Derfuu_ComfyUI_ModdedNodes.pyscripts.Nodes.Modded.StandardInputs.Latents as St_LatentNodes
import custom_nodes.Derfuu_ComfyUI_ModdedNodes.pyscripts.Nodes.Modded.StandardInputs.Condotionig as St_CondNodes
# import custom_nodes.Derfuu_ComfyUI_ModdedNodes.pyscripts.Nodes.Modded.TuplesUsed.Latents as Tu_LatentNodes
# import custom_nodes.Derfuu_ComfyUI_ModdedNodes.pyscripts.Nodes.Modded.TuplesUsed.Conditioning as Tu_CondNodes
WEB_DIRECTORY = "./scripts"
NODE_CLASS_MAPPINGS = {
"Float": TypeNodes.FloatNode, # Return float Value
"Integer": TypeNodes.IntegerNode, # Return int Value
"Text": TypeNodes.StringNode, # IDK where to use this... yet
"Text box": TypeNodes.MultilineStringNode, # This too
# "Float debug print": DebugNodes.DebugNodeFloat,
# "Int debug print": DebugNodes.DebugNodeInt,
# "Tuple debug print": DebugNodes.DebugNodeTuple,
# "String debug print": DebugNodes.DebugNodeString,
# NOTE: if input values are not changed, they don't print in console, same to random IDK how to fix this yet
# thanks for solution from pythongosssss and Suzie1 to usage of "any" input type for nodes
"To text (Debug)": DebugNodes.ShowDataDebug, # Return any converted into string if possible
"Random": RandNodes.RandomValue, # Return random value in range
# "Tuple": TupleNodes.Tuple, # Takes floats into Tuple
# "Int to tuple": TupleNodes.Int2Tuple, # Takes ints into Tuple
# "Tuple to floats": TupleNodes.Tuple2Float, # Return 2 floats from Tuple
# "Tuple to ints": TupleNodes.Tuple2Int, # Return 2 ints from Tuple
# "Tuple swap": TupleNodes.FlipTuple, # Swap Values in tuple
# "Tuple multiply": TupleNodes.MultiplyTupleBy,
"Int to float": ConvNodes.Int2Float, # Interpretation of int value as float
"Ceil": ConvNodes.CeilNode, # Rounds Value to next int
"Floor": ConvNodes.FloorNode, # Rounds Value to previous int
"Absolute value": ConvNodes.ABSNode, # Return absolute Value of input
"Get latent size": GetSizes.GetLatentSize, # Return size of latent
"Get image size": GetSizes.GetImageSize, # Return size of image
"Sum": SMath.SumNode, # Summaries 2 values
"Subtract": SMath.SubtractNode, # Subtracts Value_B from Value_A
"Multiply": SMath.MultiplyNode, # Multiplies 2 values
"Divide": SMath.DivideNode, # Divides Value_A on Value_B
"Power": SMath.PowNode, # Returns Value_A powered by Value_B
"Square root": SMath.SquareRootNode, # Returns square root of Value
"Sinus": TMath.SinNode, # Returns sinus of Value
"Cosines": TMath.CosNode, # Returns cosines of Value
"Tangent": TMath.tgNode, # Returns tangents of Value
# LOGIC (???)
"Logic node": LNode.LogicNode,
# STANDARD MODDED
"Latent Scale by ratio": St_LatentNodes.LatentScale_Ratio, # Scales latent proportionally on value
"Latent Scale to side": St_LatentNodes.LatentScale_Side, # Proportionally scales latent to fit in side size
"Image scale by ratio": St_ImageNodes.ImageScale_Ratio, # Scales image proportionally on value
"Image scale to side": St_ImageNodes.ImageScale_Side, # Proportionally scales image to fit in side size
"Conditioning area scale by ratio": St_CondNodes.ConditioningAreaScale_Ratio,
# TUPLE MODDED
# "ConditioningSetArea with tuples": Tu_CondNodes.ConditioningSetArea, # Compose condition on field using tuples
# "LatentComposite with tuples": Tu_LatentNodes.LatentComposite,
}