added number converter

This commit is contained in:
Fill
2025-10-14 05:43:31 -07:00
parent 6d853d40d4
commit 4e213086bb
3 changed files with 54 additions and 1 deletions
+5
View File
@@ -161,6 +161,7 @@ from .nodes.utility.FL_InpaintCrop import FL_Inpaint_Stitch
from .nodes.utility.FL_JS import FL_JS
from .nodes.utility.FL_Math import FL_Math
from .nodes.utility.FL_ModelInspector import FL_ModelInspector
from .nodes.utility.FL_NumberConverter import FL_IntToFloat, FL_FloatToInt
from .nodes.utility.FL_Padding import FL_Padding
from .nodes.utility.FL_PasteByMask import FL_PasteByMask
from .nodes.utility.FL_PasteOnCanvas import FL_PasteOnCanvas
@@ -385,6 +386,8 @@ NODE_CLASS_MAPPINGS = {
"FL_Audio_Separation": FL_Audio_Separation,
"FL_Audio_Shot_Iterator": FL_Audio_Shot_Iterator,
"FL_QwenImageEditStrength": FL_QwenImageEditStrength,
"FL_IntToFloat": FL_IntToFloat,
"FL_FloatToInt": FL_FloatToInt,
}
NODE_DISPLAY_NAME_MAPPINGS = {
@@ -563,6 +566,8 @@ NODE_DISPLAY_NAME_MAPPINGS = {
"FL_Audio_Separation": "FL Audio Separation",
"FL_Audio_Shot_Iterator": "FL Audio Shot Iterator",
"FL_QwenImageEditStrength": "FL Qwen Image Edit with Strength",
"FL_IntToFloat": "FL Int to Float",
"FL_FloatToInt": "FL Float to Int",
}
+48
View File
@@ -0,0 +1,48 @@
class FL_IntToFloat:
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"int_value": ("INT", {"default": 0, "min": -2147483648, "max": 2147483647}),
},
}
RETURN_TYPES = ("FLOAT",)
RETURN_NAMES = ("float_value",)
FUNCTION = "convert"
CATEGORY = "🏵️Fill Nodes/Utility"
def convert(self, int_value):
return (float(int_value),)
class FL_FloatToInt:
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"float_value": ("FLOAT", {"default": 0.0}),
"rounding_mode": (["round", "floor", "ceil", "truncate"], {"default": "round"}),
},
}
RETURN_TYPES = ("INT",)
RETURN_NAMES = ("int_value",)
FUNCTION = "convert"
CATEGORY = "🏵️Fill Nodes/Utility"
def convert(self, float_value, rounding_mode):
import math
if rounding_mode == "round":
result = round(float_value)
elif rounding_mode == "floor":
result = math.floor(float_value)
elif rounding_mode == "ceil":
result = math.ceil(float_value)
elif rounding_mode == "truncate":
result = math.trunc(float_value)
else:
result = round(float_value)
return (int(result),)
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "comfyui_fill-nodes"
description = "Fill-Nodes is a versatile collection of custom nodes for ComfyUI that extends functionality across multiple domains. Features include advanced image processing (pixelation, slicing, masking), visual effects generation (glitch, halftone, pixel art), comprehensive file handling (PDF creation/extraction, Google Drive integration), AI model interfaces (GPT, DALL-E, Hugging Face), utility nodes for workflow enhancement, and specialized tools for video processing, captioning, and batch operations. The pack provides both practical workflow solutions and creative tools within a unified node collection."
version = "2.0.0"
version = "2.0.1"
license = "LICENSE"
dependencies = ["diffusers", "librosa", "sounddevice", "glitch_this", "PyOpenGL", "glfw", "scipy>=1.13.1", "requests", "aiohttp", "moviepy", "matplotlib", "reportlab", "openai", "PyPDF2", "pdf2image", "PyMuPDF", "reportlab", "PyPDF2", "ollama", "kornia", "opencv-python", "gdown", "open_clip_torch", "google-genai"]