Files
Derfuu-Derfuu_ComfyUI_Modde…/__init__.py
T
Derfuu e493cb787d Added string functional nodes:
Concat and Replace.
Removed workflow examples. (Maybe temporary)
Renamed examples folder to nodes_info_examples (WIP) if need to know more
Added string operations into README.md
2024-04-15 06:06:54 +03:00

67 lines
3.9 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.Functions.Strings as StringNodes
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
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
"String Concatenate": StringNodes.StringConcat, # Concat 2 strings into single one with delimiter between them
"String Replace": StringNodes.StringReplace, # Replaces substring in main string with new one.
# NOTE: if input values are not changed, they don't print in console
# 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
"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,
}