dummy node, anticipatory toml

This commit is contained in:
RyanOnTheInside
2025-01-17 08:14:41 -05:00
parent cf21ebd88d
commit 3d74fefc10
4 changed files with 68 additions and 6 deletions
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 RyanOnTheInside
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+1 -1
View File
@@ -17,7 +17,7 @@ A performance profiling suite for ComfyUI that automatically tracks execution ti
## Requirements
- ComfyUI (latest version recommended)
- ComfyUI (latest version)
- Python 3.8+
- CUDA-capable GPU (for VRAM monitoring)
- Modern web browser
+31 -5
View File
@@ -2,12 +2,23 @@
import os
import logging
# Configure logging before imports
logger = logging.getLogger('ComfyUI-ProfilerX')
logger.setLevel(logging.ERROR) # Set to DEBUG level for maximum info
# Add console handler if not already added
if not logger.handlers:
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG) # Also set handler to DEBUG
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
ch.setFormatter(formatter)
logger.addHandler(ch)
logger.info("Initializing ComfyUI-ProfilerX...")
from .prestartup import inject_profiling, PROFILER_ENABLED # Import but don't auto-inject
from . import server # Register API routes
logger = logging.getLogger('ComfyUI-ProfilerX')
logger.setLevel(logging.ERROR)
# Set up web directory
WEB_DIRECTORY = "./web"
@@ -17,13 +28,28 @@ if not inject_profiling():
logger.warning("Disabling profiler nodes due to initialization failure")
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
else:
logger.info("ProfilerX initialization complete - profiler is enabled")
# Add empty mappings to satisfy ComfyUI's import check
NODE_CLASS_MAPPINGS = {
"ProfilerX": type("ProfilerX", (), {
"CATEGORY": "profiling",
"RETURN_TYPES": tuple(),
"FUNCTION": "noop",
"OUTPUT_NODE": True,
"INPUT_TYPES": lambda: {"required": {}}
})
}
NODE_DISPLAY_NAME_MAPPINGS = {
"ProfilerX": "ProfilerX"
}
def setup_js():
"""Register web extension with profiler status"""
logger.debug(f"Setting up web extension (enabled={PROFILER_ENABLED})")
return {
"name": "ComfyUI-ProfilerX",
"module": "index.js",
"enabled": PROFILER_ENABLED,
"status": "active" if PROFILER_ENABLED else "disabled"
}
}
+15
View File
@@ -0,0 +1,15 @@
[project]
name = "comfyui_profilerx"
description = "Node and workflow profiling. Find bottlenecks in your workflows. See trends over time."
version = "1.0.0"
license = {file = "LICENSE"}
dependencies = ["psutil"]
[project.urls]
Repository = "https://github.com/ryanontheinside/ComfyUI_ProfilerX"
# Used by Comfy Registry https://comfyregistry.org
[tool.comfy]
PublisherId = "ryanontheinside"
DisplayName = "ComfyUI_ProfilerX"
Icon = "📈"