Merge pull request #202 from crystian/dev

fixes
This commit is contained in:
Crystian
2025-06-02 02:21:24 +02:00
committed by GitHub
9 changed files with 46 additions and 9 deletions
+4 -2
View File
@@ -2,7 +2,7 @@
@author: Crystian
@title: Crystools
@nickname: Crystools
@version: 1.24.0
@version: 1.25.0
@project: "https://github.com/crystian/ComfyUI-Crystools",
@description: Plugins for multiples uses, mainly for debugging, you need them! IG: https://www.instagram.com/crystian.ia
"""
@@ -13,7 +13,7 @@ logger.info(f'Crystools version: {version}')
from .nodes._names import CLASSES
from .nodes.primitive import CBoolean, CText, CTextML, CInteger, CFloat
from .nodes.switch import CSwitchBooleanAny, CSwitchBooleanLatent, CSwitchBooleanConditioning, CSwitchBooleanImage, \
CSwitchBooleanString, CSwitchBooleanMask
CSwitchBooleanString, CSwitchBooleanMask, CSwitchFromAny
from .nodes.debugger import CConsoleAny, CConsoleAnyToJson
from .nodes.image import CImagePreviewFromImage, CImageLoadWithMetadata, CImageGetResolution, CImagePreviewFromMetadata, \
CImageSaveWithExtraMetadata
@@ -38,6 +38,7 @@ NODE_CLASS_MAPPINGS = {
CLASSES.CLIST_ANY_NAME.value: CListAny,
CLASSES.CLIST_STRING_NAME.value: CListString,
CLASSES.CSWITCH_FROM_ANY_NAME.value: CSwitchFromAny,
CLASSES.CSWITCH_ANY_NAME.value: CSwitchBooleanAny,
CLASSES.CSWITCH_LATENT_NAME.value: CSwitchBooleanLatent,
CLASSES.CSWITCH_CONDITIONING_NAME.value: CSwitchBooleanConditioning,
@@ -75,6 +76,7 @@ NODE_DISPLAY_NAME_MAPPINGS = {
CLASSES.CLIST_ANY_NAME.value: CLASSES.CLIST_ANY_DESC.value,
CLASSES.CLIST_STRING_NAME.value: CLASSES.CLIST_STRING_DESC.value,
CLASSES.CSWITCH_FROM_ANY_NAME.value: CLASSES.CSWITCH_FROM_ANY_DESC.value,
CLASSES.CSWITCH_ANY_NAME.value: CLASSES.CSWITCH_ANY_DESC.value,
CLASSES.CSWITCH_LATENT_NAME.value: CLASSES.CSWITCH_LATENT_DESC.value,
CLASSES.CSWITCH_CONDITIONING_NAME.value: CLASSES.CSWITCH_CONDITIONING_DESC.value,
+1 -1
View File
@@ -1 +1 @@
version = "1.24.0"
version = "1.25.0"
+2
View File
@@ -28,6 +28,8 @@ class CLASSES(Enum):
CLIST_STRING_NAME = 'List of strings [Crystools]'
CLIST_STRING_DESC = prefix + 'List of strings'
CSWITCH_FROM_ANY_NAME = 'Switch from any [Crystools]'
CSWITCH_FROM_ANY_DESC = prefix + 'Switch from any'
CSWITCH_ANY_NAME = 'Switch any [Crystools]'
CSWITCH_ANY_DESC = prefix + 'Switch any'
CSWITCH_STRING_NAME = 'Switch string [Crystools]'
+8 -2
View File
@@ -1,3 +1,4 @@
import fnmatch
import os
import random
import sys
@@ -234,12 +235,17 @@ class CImageLoadWithMetadata:
@classmethod
def INPUT_TYPES(cls):
input_dir = folder_paths.get_input_directory()
exclude_folders = ["clipspace"]
exclude_files = {"Thumbs.db", "*.DS_Store", "desktop.ini", "*.lock" }
exclude_folders = {"clipspace", ".*"}
file_list = []
for root, dirs, files in os.walk(input_dir):
# Exclude specific folders
dirs[:] = [d for d in dirs if d not in exclude_folders]
dirs[:] = [d for d in dirs if not any(fnmatch.fnmatch(d, exclude) for exclude in exclude_folders)]
files = [f for f in files if not any(fnmatch.fnmatch(f, exclude) for exclude in exclude_files)]
for file in files:
relpath = os.path.relpath(os.path.join(root, file), start=input_dir)
+27
View File
@@ -1,6 +1,33 @@
from ..core import BOOLEAN, STRING, CATEGORY, any, logger
class CSwitchFromAny:
def __init__(self):
pass
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"any": (any, ),
"boolean": BOOLEAN,
}
}
CATEGORY = CATEGORY.MAIN.value + CATEGORY.SWITCH.value
RETURN_TYPES = (any, any,)
RETURN_NAMES = ("on_true", "on_false",)
FUNCTION = "execute"
def execute(self, any,boolean=True):
logger.debug("Any switch: " + str(boolean))
if boolean:
return any, None
else:
return None, any
class CSwitchBooleanAny:
def __init__(self):
pass
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "ComfyUI-Crystools"
description = "With this suit, you can see the resources monitor, progress bar & time elapsed, metadata and compare between two images, compare between two JSONs, show any value to console/display, pipes, and more!\nThis provides better nodes to load/save images, previews, etc, and see \"hidden\" data without loading a new workflow."
version = "1.24.0"
version = "1.25.0"
license = { file = "LICENSE" }
dependencies = ["deepdiff", "torch", "numpy", "Pillow", "pynvml", "py-cpuinfo"]
+1 -1
View File
@@ -1 +1 @@
1.24.0
1.25.0
+1 -1
View File
@@ -1,5 +1,5 @@
import { utils } from './comfy/index.js';
utils.addStylesheet('extensions/ComfyUI-Crystools/monitor.css');
utils.addStylesheet('extensions/comfyui-crystools/monitor.css');
export var Styles;
(function (Styles) {
Styles["BARS"] = "BARS";
+1 -1
View File
@@ -1,6 +1,6 @@
import { utils } from './comfy/index.js';
utils.addStylesheet('extensions/ComfyUI-Crystools/monitor.css');
utils.addStylesheet('extensions/comfyui-crystools/monitor.css');
export enum Styles {
'BARS' = 'BARS'