Add Github Action for Publishing to Comfy Registry#2
Closed
robinjhuang wants to merge 73 commits into
Closed
Conversation
Add PromptChainSimple, PromptChain5, and PromptChain10 nodes with: - Inline wildcard syntax (| for OR, , for AND) - Multiline and mixed format support - Random Selection and Combine modes - Visual hierarchical chaining 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Changed mode selector from "Random Selection" to "Randomize" for brevity - Updated all mode checks in PromptChain5 and PromptChain10 - Updated README documentation to reflect new mode name 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- New preview node shows generated prompt text in real-time - Updates every time workflow executes (due to IS_CHANGED returning NaN) - Useful for testing randomization without running full generation - Connect to any PromptChain output to see what's being sent downstream 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Move widget creation to onExecuted to ensure it appears - Add dynamic sizing when text updates - Widget now properly displays after execution 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Prints preview text to console with clear formatting - Makes preview output visible even if widget doesn't display - Helps debugging and provides immediate feedback 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Simplified Python return format to use standard 'string' UI key - Removed unnecessary unique_id parameter - Fixed JavaScript widget creation to initialize once and update properly - Widget now checks for both 'string' and 'text' keys in message - Console output still shows formatted preview for verification 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Removed PromptChainPreview class and associated web extension to simplify the codebase. Preview functionality is not essential for core prompt chaining features. Changes: - Removed PromptChainPreview class from hierarchical_random.py - Deleted web/hierarchical_random.js extension file - Removed web directory - Cleaned up __pycache__ directories 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Implements real-time output preview on every node using battle-tested pattern from pythongosssss/ComfyUI-Custom-Scripts.
Features:
- Live preview widgets show exact randomized output after each execution
- Trace entire prompt chain flow visually on canvas
- Debug wildcard selections without checking metadata
- Readonly widgets with visual distinction (60% opacity)
- Auto-resize nodes to fit preview content
- Persists through workflow save/load
- Extension conflict-resistant (populate before onExecuted)
Technical changes:
- Set OUTPUT_NODE = True on all node classes
- Return {"ui": {"text": [result]}, "result": (result,)} format
- Add web/js/promptchain.js with ComfyWidgets pattern
- Configure WEB_DIRECTORY in __init__.py
- Update README with Live Preview section
This solves the fundamental problem of invisible prompt randomization - now you can SEE exactly what each node generated on every execution.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Prevent preview widgets from being restored when loading saved workflows. Preview widgets are now only created during execution, not when loading workflow JSON. This fixes the issue where opening a saved workflow would show duplicate preview widgets because the widgets_values were being restored from the workflow file. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Preview widgets are now instantiated as empty placeholders when nodes are created or loaded, preventing nodes from changing vertical size when previews appear after execution. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Added compact 80px toggle button (eye icon) to show/hide previews - Previews hidden by default to reduce visual clutter - Toggle states: "👁 Preview" (gray) when off, "👁 Showing" (green) when on - Preview widgets only created when toggle is ON (prevents DOM bloat) - Completely removes preview widgets when toggled off for compact layout - Clicking toggle removes/creates widgets; execution respects toggle state 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Preserve original width when toggling preview on/off by storing currentWidth before computeSize() and restoring it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add rounded corners (4px radius) to button - Remove eyeball emoji from button text - Preserve node width when toggling preview on/off 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Renamed class PromptChainDynamic to PromptChain - Updated node mapping key and display name - Updated JS references for dynamic inputs and preview 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Removed PromptChainSimple, PromptChain5, and PromptChain10 nodes. All functionality is now in the single PromptChain node with dynamic inputs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Removed references to legacy nodes (Simple, 5, 10) - Document single PromptChain node with dynamic inputs - Cleaner, more concise structure 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Changed problem/solution examples to video game character generator - Warrior/mage/rogue with weapons, enchantments, and titles - More fun and relatable examples 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Legacy filename from before the project had a proper name. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Set default node size to 210x136 when dragged from sidebar - Add right-to-left tag deduplication (later tags win for SD prompts) - Preserve special tags like [BREAK] during deduplication 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Text input fades to 30% opacity when empty - Full opacity on focus or when content is present - Uses requestAnimationFrame to wait for DOM element 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Only recompute node size when turning preview off (removing widgets). When preview is on, node only grows to accommodate new content, never shrinks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Replace toggle button with menubar containing Prompt label and Preview checkbox - Add Output label above preview text area when enabled - Store text value in node.properties for reliable persistence across reloads - Fix widget serialization issues by using serializeValue to skip custom widgets - Improve styling: italic/dim for empty fields, proper colors for active/inactive states 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Set font-family to Arial, font-size 11px - Add 4px padding and 1.3 line-height - Add 4px border-radius for rounded corners - Adjust Prompt and Output label positions to 12px from left 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Right-click Import parses {a|b} syntax and creates node graph
- Also handles plain comma/newline tags to wildcard format
- Auto-detects format and creates appropriate nodes
- Updates text styling on imported nodes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Handle nested {a|{b|c}} braces recursively
- Clean up double commas from remainder text
- Format wildcard options with line breaks
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Documents techniques discovered for styling ComfyUI nodes: - Hiding default LiteGraph labels with input.label = " " - Custom slot label drawing in onDrawForeground - Widget draw function overrides - Text input DOM styling - Custom widget creation - CSS injection for scrollbars and pseudo-elements 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Lock icon on menubar to toggle lock state - Locked nodes return cached output instead of regenerating - Visual indicators: bright orange (self-locked), dim orange (locked by upstream) - Downstream lock propagation still needs work 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Document the lock feature for preserving randomization results, including visual indicators and upstream propagation. Also expand import section and add export documentation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add Lock system and Import/Export to Features list - Expand Live Preview section with timestamp details - Add "Why PromptChain?" comparison table - Add "Prompt Library Mode" section for disconnected node usage - Tighten wording throughout 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
First occurrence = intentional placement in early nodes. Later duplicates = accidental or network effects from merging branches. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Tags now round-robin across branches so no single branch dominates the CLIP token budget. If you connect Character (30 tags) and Background (5 tags), both get representation throughout the prompt instead of Character eating all 77 tokens. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Wire Randomize nodes in a mesh instead of a tree for combinatorial trait mixing. Each node acts as selection pressure, generating unique combinations like breeding traits. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Check widget.value and properties.textValue in addition to inputEl.value when determining if text field should show dimmed/italic styling. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
If the text field receives data from an upstream node, show it as active (not dimmed) even if inputEl.value appears empty. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Store updateStyle function on node and call it from onConnectionsChange so the dimming updates immediately when a link is connected/disconnected. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Adds debug_log function that writes to debug.log file for troubleshooting node execution flow. This logging will support upcoming algorithm modifications. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Display "🎲 Randomize Inputs" and "➕ Combine Inputs" on the node while keeping internal values as plain "Randomize" and "Combine". 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
When locking a node, now also locks all upstream PromptChain nodes so they return cached outputs instead of re-randomizing. Unlocking similarly propagates upstream to restore normal behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Lock now correctly propagates to nodes that feed INTO the locked node, not downstream. Locking Werewolf locks White/Black/Red Fur without affecting the Bear branch that shares those inputs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Draw orange diagonal stripes overlay on locked PromptChain nodes using filled parallelograms clipped to rounded node bounds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Change stripe color from orange to black for subtlety - Reduce stripe opacity from 10% to 5% - Make lock label bright yellow (#ffcc00) and bold when active 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Locked nodes now display a #9e6e19 gold background at 100% opacity with subtle 4% black diagonal stripes on top for clear visual distinction. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The README incorrectly stated that locking freezes the "downstream chain" when it actually locks all upstream input nodes. Clarified the behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Removed incorrect "dim orange for upstream" indicator that doesn't exist. Simplified to show actual states: locked (orange icon, bold yellow text, gold overlay) vs unlocked (dim gray). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Docs now show the actual labels users see in the dropdown: - 🎲 Randomize Inputs - ➕ Combine Inputs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Clearer explanations of what each mode actually does: - Randomize: "All incoming tags properly randomized" - Combine: "All incoming tags grouped and flattened" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
More user-friendly language: - "No external files required" - "rich meaningful structures" - "Freeze part or all of your nodes for fast testing" - "Easily import/export with common DynamicPrompt syntax" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a Github Action (publish-node-action) that will publish an updated version of your custom node to the registry whenever the
pyproject.tomlfile changes. The pyproject.toml defines the custom node version you want to publish (added in another PR). Make sure you update the version number inpyproject.tomlwhen you make a change that should be published to everyone!Action Required:
masterormain) inpublish.yamlmatches the branch you want to use as the publishing branch. It will only trigger when the pyproject.toml gets updated on that branch.REGISTRY_ACCESS_TOKEN.Please message me on Discord at robinken or join our server server if you have any questions!