The toggle_states widget was being removed from the widgets array to
hide it visually, which also prevented ComfyUI from reading its value
when building the prompt for execution. The backend always received
the default "{}" so all images were treated as ON.
Fix: Keep the widget in the array but make it invisible using
converted-widget type, zero-height computeSize, and no-op draw.
Also make the backend more defensive - handle toggle_states arriving
via kwargs, and gracefully handle JSON parse errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of manually calculating slot Y positions with a formula that
varies across LiteGraph versions, use getConnectionPos() which returns
the exact coordinates LiteGraph uses for drawing slot connectors. This
guarantees perfect alignment between toggles and their input slots.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use the standard LiteGraph slot positioning formula:
NODE_SLOT_HEIGHT * (index + 0.5) + 4
instead of the incorrect (index + 0.7) offset that caused
each toggle to appear one slot below its actual input.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove toggle_states widget from the widgets array entirely instead of
just hiding it, so it never renders as a visible text field
- Use requestAnimationFrame to handle widget removal timing (widget may
not exist yet when onNodeCreated fires)
- Override serialize() to temporarily re-inject the widget for proper
workflow save/load
- Restore toggle states from widgets_values during onConfigure for
workflow reloading
- Add right-click context menu with Toggle All ON/OFF options
- Guard against duplicate slot creation on configure vs onNodeCreated
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a new node that lets users dynamically add/remove image input slots
via +/- buttons, with per-slot toggle switches to include or exclude
images from the output batch — similar to rgthree's Power Lora Loader UX.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add pyproject.toml for ComfyUI registry with project metadata
- Add requirements.txt placeholder
- Remove premature WEB_DIRECTORY (no JS extensions yet)
- Standardize all node FUNCTION names to "execute" for consistency
- Clean up input type definitions (remove unnecessary min/max bounds)
- Move math import to module level
- Rename "replace" param to "replace_with" to avoid shadowing builtin
- Tighten README with table format
https://claude.ai/code/session_01PdwEaTFxk45a8FjpqWqZbK
Set up the ComfyUI custom nodes package with text, image, and math
utility nodes including text concatenation/replace/display, image
resize/batch/size, and integer/float math operations with type
conversions. Includes package entry point and updated README.
https://claude.ai/code/session_01PdwEaTFxk45a8FjpqWqZbK