feat: in-node grid UI — ingest/select/delete/label + Phase 1 complete

Render the pool as an in-node thumbnail grid with paste/drop/upload
ingest, click-to-select (active border), inline label editing, and
delete. Toolbar (upload/refresh/count) sits at the bottom per ComfyUI
convention; the node auto-grows to fit content.

pool_id is a declared STRING input (not a hidden input): ComfyUI only
fills hidden inputs for built-in types, but forwards every serialized
widget value by name. The JS mints a per-node UUID and hides the widget
via widget.hidden=true (frontend 1.45), keeping it serialized.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-21 13:59:59 +02:00
parent 08df5c8840
commit cd0b8783dc
2 changed files with 399 additions and 2 deletions
+7 -1
View File
@@ -15,11 +15,17 @@ class GridImagePool:
@classmethod
def INPUT_TYPES(cls):
# pool_id is a per-node UUID owned by the JS extension. It must be a
# NORMAL input, not a "hidden" one: ComfyUI only populates hidden inputs
# for built-in types (UNIQUE_ID, PROMPT, ...), so a custom hidden
# "POOL_ID" would always arrive as None. The frontend, however, forwards
# every serialized widget value by name, so a declared STRING input
# backed by a (hidden-rendered) widget reliably reaches run().
return {
"required": {
"index": ("INT", {"default": -1, "min": -1, "max": 9999}),
"pool_id": ("STRING", {"default": "default"}),
},
"hidden": {"pool_id": "POOL_ID"},
}
@staticmethod