✨ FEATURES: - Migrate WatchPointDebugToggle & WatchPointRestoreWindow to nodes/watchpoint_utils.py - Add optional utility node loading via __init__.py configuration - Create comprehensive conservation guide (WATCHPOINT_CONSERVATION.md) 🔒 STABILITY PRESERVED: - Window minimization protection (prevents ComfyUI crashes) - Thread-safe Tkinter operations (fixes Tcl_AsyncDelete errors) - Persistent debug mode across ComfyUI restarts - Recursion prevention in debug dumps 📚 DOCUMENTATION: - Update README.md with utility node usage instructions - Add configuration guide for enabling/disabling utilities - Document critical preservation rules for future development 🎯 CORE PRINCIPLE: Conservative approach prioritizing stability over features
👁️ ComfyUI Watch Point
Dual preview system for ComfyUI workflows
Watch Point provides two simultaneous preview methods:
- 🖥️ Monitor Preview: External Tkinter window on any monitor
- 🖼️ Floating Preview: ComfyUI's built-in preview system
Features
Monitor Preview (Tkinter)
- 🎯 Display on any connected monitor
- 🔍 Zoom/Pan controls with mouse
- ⌨️ Keyboard shortcuts
- 💾 Save images directly from preview
- 📋 Copy to clipboard
- ⚙️ Customizable settings
- 📡 Signal Scout Panel: Display text from your workflow in a side panel.
Floating Preview (JavaScript)
- 📌 Uses ComfyUI's native preview system
- 🎨 Works with existing preview extensions
- 🔄 Auto-updates during workflow execution
Installation
- Clone into your ComfyUI custom_nodes directory:
cd ComfyUI/custom_nodes
git clone https://github.com/yourusername/ComfyUI-WatchPoint.git
- Install dependencies (if needed):
pip install pillow screeninfo
- Restart ComfyUI
Nodes
👁️ Watch Point
The main preview node.
- Add Watch Point to your workflow.
- Connect an
IMAGEinput. - Enable/disable previews:
floating_preview: Enable ComfyUI's built-in preview.monitor_preview: Enable the external monitor window.
- Select the target
monitorfrom the dropdown. - The node acts as a pass-through for the
IMAGEoutput.
📡 WP Signal Scout
A debug node to send text to the Monitor Preview window.
- Add WP Signal Scout to your workflow (found in
WatchPoint/Debug). - Connect any
STRINGinput. - The text will appear in the side panel of the external window.
🔧 Utility Nodes (Optional)
These nodes provide additional functionality and can be enabled/disabled via configuration.
🐛 WatchPoint Debug Toggle
A simple node to enable/disable persistent debug mode for WatchPoint nodes.
- Function: Toggle debug mode with a single click
- Location:
WatchPoint/Utils(when enabled) - Usage: Connect to any workflow to activate debug logging
🪟 WatchPoint Restore Window
A utility node to restore minimized WatchPoint windows.
- Function: Recover hidden/minimized windows
- Location:
WatchPoint/Utils(when enabled) - Usage: Add to workflow when windows need restoration
Note: Utility nodes are loaded optionally. To enable/disable them, modify the __init__.py file.
Example Workflow
[Primitive] → [WP Signal Scout]
(text) ↓ (sends text to window)
[Load Image] → [Watch Point] → [Upscale] → [Save Image]
↓
(Dual Preview)
Controls (Monitor Preview)
Mouse
- Scroll wheel: Zoom in/out
- Left click + drag: Pan image
- Right click: Context menu
Keyboard
- R: Reset zoom and pan
- T: Toggle toolbar
- P: Toggle Signal Scout panel
- 1: Zoom 1:1 (100% actual size)
- ESC: Close window
Toolbar Buttons
- ↻ Reset: Reset zoom and pan
- ⊕ Zoom In: Increase zoom level
- ⊖ Zoom Out: Decrease zoom level
- 1:1 (100%): View image at actual size
- Window Size: Quick resize presets
- ⛶ Fullscreen: Toggle fullscreen mode
- ⚙ Settings: Open settings dialog
Settings
Access settings via the ⚙ Settings button in the toolbar.
Window Size
- Fixed sizes: 800x600, 1024x768, 1280x720, 1920x1080
- Dynamic sizes:
- Half Vertical: Half screen width, full height
- Half Horizontal: Full width, half screen height
- Quarter: Half width, half height
Window Position
- Set exact X, Y coordinates for window placement
- Leave empty for automatic positioning
- Example: X=0, Y=0 for top-left corner
Save Options
- Default format: PNG, JPEG, or WebP
- JPEG quality slider (10-100)
UI Options
- Show/hide toolbar by default
All settings are saved to watchpoint_settings.json
Utility Nodes Configuration
Utility nodes (WatchPoint Debug Toggle and WatchPoint Restore Window) are optional and can be enabled/disabled:
Enabling Utility Nodes
- Open
__init__.pyin the ComfyUI-WatchPoint folder - Ensure the import block is uncommented:
try:
from .nodes.watchpoint_utils import NODE_CLASS_MAPPINGS as UTILS_CLASS, NODE_DISPLAY_NAME_MAPPINGS as UTILS_DISPLAY
NODE_CLASS_MAPPINGS.update(UTILS_CLASS)
NODE_DISPLAY_NAME_MAPPINGS.update(UTILS_DISPLAY)
print("WatchPoint Utils loaded: Debug Toggle and Restore Window available")
except ImportError as e:
print(f"WatchPoint Utils not available: {e}")
pass
Disabling Utility Nodes
Comment out or remove the import block in __init__.py to disable utility nodes.
Configuration File
Edit watchpoint_settings.json to customize defaults:
{
"window_width": 800,
"window_height": 600,
"window_x": null,
"window_y": null,
"window_size_mode": "fixed",
"show_toolbar": true,
"save_format": "png",
"jpeg_quality": 90
}
Settings Explained
window_x,window_y: Window position (null = auto)window_size_mode: "fixed", "Half Vertical", "Half Horizontal", or "Quarter"show_toolbar: Show toolbar on startupsave_format: Default save format ("png", "jpeg", "webp")jpeg_quality: JPEG compression quality (10-100)
Use Cases
Dual Monitor Setup
Perfect for users with multiple monitors:
- Work on ComfyUI on main monitor
- View live preview on secondary monitor
- No need to switch windows or tabs
Quality Control
Use 1:1 zoom to inspect:
- Image quality at pixel level
- Upscaling artifacts
- Detail preservation
Live Monitoring
Watch your workflow progress in real-time:
- Both previews update simultaneously
- Choose the view that works best for your setup
- Keep an eye on intermediate results
Requirements
- Python 3.7+
- tkinter (usually included with Python)
- PIL/Pillow
- screeninfo (optional, for multi-monitor detection)
Optional Dependencies
For clipboard support (Windows):
pip install pywin32
Troubleshooting
Window doesn't appear
- Check if
monitor_previewis enabled (True) - Try different monitor selection
- Check console for error messages
Window appears in wrong location
- Set explicit X, Y coordinates in settings
- Use
window_x: 0, window_y: 0for top-left
Image not updating
- Ensure workflow is executing
- Check that image is connected to Watch Point input
- Try disabling/re-enabling monitor preview
Floating preview not working
- Ensure
floating_previewis enabled (True) - Check if other preview extensions are conflicting
- Restart ComfyUI
Credits
Created for ComfyUI by [Your Name]
License
MIT License - Feel free to use and modify!