Commit Graph
100 Commits
Author SHA1 Message Date
EthanfelandClaude Opus 4.8 36dd5c91ee fix: text gate supports prompt weighting (Ctrl/Cmd+↑/↓) in the editor
ComfyUI's "edit attention" (wrap selection in (token:weight)) is a global
window keydown listener that acts when a <textarea> is focused. The text
gate editor is a textarea, but its keydown handler called stopPropagation
on EVERY key, so the event never bubbled to window and weighting never
fired — notably when using the node as a prompt text node in protected mode.

Now stopPropagation is skipped for the weighting shortcut (Ctrl/Cmd + ↑/↓)
so it reaches the global handler; all other keys are still stopped so
typing/space can't trigger litegraph canvas shortcuts. The weighting edit
goes through execCommand, which fires our oninput -> stored_text stays synced.

Verified against the verbatim editAttention from the shipped frontend:
whole-word weighting, existing-weight decrement, and no-selection word
expansion all round-trip; plain keys stay stopped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 10:17:58 +02:00
Ethanfel 954b9ec2e6 Merge fix/textgate-persist-editor: text gate editor survives reload 2026-07-03 00:22:33 +02:00
EthanfelandClaude Opus 4.8 1881aa727f fix: text gate persists editor text across refresh/reload
The editor content was only restored on reload in protected mode, and
stored_text was only synced on keystroke (oninput). So in the default
pause mode edited text came back empty after refresh/reload-workflow,
and upstream text passed without a keystroke was never captured.

Now applyPersistedMode restores the editor from stored_text in BOTH
modes, and syncStored also fires when upstream text arrives (socket)
and on Pass — so whatever text is shown/edited survives a reload.
Verified against the shipped litegraph serialize()/configure() widget
semantics: default-mode + pass-without-typing round-trips now restore.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 00:22:28 +02:00
EthanfelandClaude Opus 4.8 78b1b85a11 Merge fix/imagegate-interrupt: image gate honors ComfyUI Interrupt
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 14:17:20 +02:00
EthanfelandClaude Opus 4.8 b50718f7fb fix: image gate reacts to ComfyUI Interrupt
GateBus.wait() only checked the gate's own Stop flag, so pressing ComfyUI's
Interrupt left the image gate blocked. Add should_cancel to wait() (mirroring
wait_payload) and pass mm.processing_interrupted from gate.py, matching the
text gate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 14:17:20 +02:00
EthanfelandClaude Opus 4.8 d9134b4e9b Merge fix/stored-text-hidden: hide text gate stored_text widget
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 14:14:55 +02:00
EthanfelandClaude Opus 4.8 3fb63e44a3 fix: fully hide text gate stored_text widget (widget.hidden)
computeSize alone left the collapsed pill visible in the 1.47 frontend.
Set widget.hidden=true (what getVisibleWidgets filters on), matching the
pool node's hideWidget. Value still serializes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 14:14:55 +02:00
EthanfelandClaude Opus 4.8 00c8c6a790 Merge fix/category-typo: node CATEGORY Datasete -> Dataset Gates
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 14:08:33 +02:00
EthanfelandClaude Opus 4.8 726cd7bf17 fix: correct node CATEGORY typo Datasete -> Dataset Gates
Menu category on all nodes now reads 'Dataset Gates', matching the repo name.
Internal identifiers (routes, socket events, extension ids) left unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 14:08:33 +02:00
EthanfelandClaude Opus 4.8 5b92e9b338 Merge feat/sidecar-save: Save Image + chainable sidecar text/json nodes
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 14:05:59 +02:00
EthanfelandClaude Opus 4.8 b2f5850b46 feat: Sidecar + Save Image (Sidecars) nodes + registration
Sidecar chains {content,name,ext} specs over a SIDECAR-typed link; the save node
mirrors SaveImageKJ (folder_paths.get_save_image_path) and writes each sidecar as
base+name+ext next to the image. build_plan validates the whole chain before any
I/O so duplicates/bad extensions write nothing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 14:00:38 +02:00
EthanfelandClaude Opus 4.8 31a7112052 feat: sidecar planning logic (filename resolution, allowlist, dedup)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 14:00:38 +02:00
EthanfelandClaude Opus 4.8 66e664247c docs: save image + chainable sidecars design
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 13:58:29 +02:00
EthanfelandClaude Opus 4.8 5419366bde Merge feat/textgate-protected: Text Gate protected mode (standalone text node)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 13:49:15 +02:00
EthanfelandClaude Opus 4.8 d0dafa1d39 feat: text gate protected mode — frontend toggle + hidden stored_text
Adds a '🔒 Protected (text node)' toggle. When on, the DOM editor is a free text
box whose value mirrors into the hidden stored_text widget; the node outputs that
text and ignores upstream (no pause, socket events ignored). Persists via the
protected + stored_text widgets; restored on configure. stored_text is single-line
so it hides cleanly (pool_id trick).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 13:48:33 +02:00
EthanfelandClaude Opus 4.8 b4639a73d3 feat: text gate protected mode — standalone text node (backend)
protected=True makes run() emit stored_text and ignore upstream with no pause;
IS_CHANGED caches on stored_text when protected (NaN otherwise). text input is
now optional so the node can run standalone.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 13:44:50 +02:00
EthanfelandClaude Opus 4.8 84fc4f1cf1 docs: Text Gate protected-mode (standalone text node) design
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 13:43:52 +02:00
EthanfelandClaude Opus 4.8 58a48d67e5 Merge feat/textgate-runbutton-fix: Run-from-here fires Comfy.QueuePrompt (text + image gate)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 08:15:28 +02:00
EthanfelandClaude Opus 4.8 c869ecee2a fix: image gate Run-from-here fires Comfy.QueuePrompt command too
Same latent bug as the text gate: a bare app.queuePrompt(0,1) enqueues but
doesn't kick off execution in the 1.47 frontend. Execute the Comfy.QueuePrompt
command (the Run button's path), with app.queuePrompt as a legacy fallback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 08:15:19 +02:00
EthanfelandClaude Opus 4.8 8d785f5ca2 fix: text gate Run-from-here fires Comfy.QueuePrompt command so it actually runs
A bare app.queuePrompt(0,1) enqueues but skips the command-level run setup in
the 1.47 frontend, so the prompt never kicked off — you had to press Run
manually. Execute the Comfy.QueuePrompt command (same path as the Run button /
Ctrl+Enter) instead, with app.queuePrompt as a legacy fallback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 11:06:32 +02:00
EthanfelandClaude Opus 4.8 0ace20a1bc Merge feat/textgate-sticky-fix: intent-based sticky edit
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 09:59:49 +02:00
EthanfelandClaude Opus 4.8 b90d1befe6 fix: text gate sticky edit by intent, not upstream-text comparison
Run-from-here now preserves the edited text via an explicit _tgKeepEdit flag
set when the button is pressed, instead of comparing incoming vs last text.
A non-deterministic upstream (random/seeded prompt) regenerates text on every
re-queue, which made the old comparison clobber the edit. Normal toolbar Queue
still shows fresh upstream text.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 09:58:32 +02:00
EthanfelandClaude Opus 4.8 fe95a9af3a Merge feat/textgate-run-from-here: Text Gate run-from-here + sticky edit
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 09:41:44 +02:00
EthanfelandClaude Opus 4.8 99a5ccac82 feat: text gate Run-from-here button + sticky edited text
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 09:39:51 +02:00
EthanfelandClaude Opus 4.8 f2ac5e37f3 docs: Text Gate run-from-here + sticky edit design
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 09:38:17 +02:00
EthanfelandClaude Opus 4.8 ce371ffe13 Add Multi-Reroute (Rail) design + implementation plan
Multi-lane any-type pass-through node ("rail"): in_i -> out_i, empty lane
-> ExecutionBlocker; +/- to add/remove lanes (bottom in P1, top with
wiring-preserving remap in P2). Pure build_outputs + shared AnyType; lazy
comfy import keeps it unit-testable. No IS_CHANGED (transparent passthrough).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 23:27:05 +02:00
EthanfelandClaude Opus 4.8 aa909448d7 Merge feat/bucket-resize: Bucket Resize (Klein 9B) node
Auto-snaps images onto ÷64 ≤1.64MP training buckets (cover + center-crop,
Lanczos), transforms an optional mask identically, outputs width/height/label.
Pure bucket math tested against KLEIN_BUCKET_SIZES.md. 99 tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 23:08:45 +02:00
EthanfelandClaude Opus 4.8 037cbf27db feat: register BucketResize
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 22:52:45 +02:00
EthanfelandClaude Opus 4.8 969463a4e9 fix: drop deprecated Pillow mode= arg in fit_mask
uint8 2D arrays infer "L" automatically; silences Pillow 13 deprecation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 22:52:45 +02:00
EthanfelandClaude Opus 4.8 7f90b6878f feat: BucketResize node (cover-crop onto Klein buckets)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 22:49:01 +02:00
EthanfelandClaude Opus 4.8 0413e25571 test: bucket cover_crop_params geometry
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 22:48:13 +02:00
EthanfelandClaude Opus 4.8 cdd742c950 feat: bucket selection matching Klein 9B table
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 22:47:46 +02:00
EthanfelandClaude Opus 4.8 628a945514 Add Bucket Resize (Klein 9B) design + implementation plan
Auto-snap images onto ai-toolkit training buckets (W×H ÷64, ≤1.64MP) via
cover-scale + center-crop (Lanczos), per KLEIN_BUCKET_SIZES.md. Pure stdlib
bucket math (reproduces the spec table) + a torch node that also transforms
an optional mask identically and outputs width/height/label. No frontend.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 22:45:05 +02:00
EthanfelandClaude Opus 4.8 95b3417ff6 Add Image Gate send/get bus design + implementation plan
Disk-backed image bus (input/gate_bus/<id>/): gates auto-publish image+mask
to a named send_id on pass; when image input is empty they load from get_id
(dropdown) — wireless, cycle-free "restart from the gate point" across runs.
Making image optional implements ignore-on-normal-path. TDD plan with a pure
stdlib imagebus + tensor savers; comfy imports stay lazy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 20:45:15 +02:00
EthanfelandClaude Opus 4.8 0ba3d81fbf docs: expand README to cover the full node suite
Document all five nodes (Image Pool, Pool Profile, Folder Image Loader,
Image Gate, Text Gate) with IO tables and behavior, plus shared concepts
(blocking gates, mask polarity, storage/profiles layout) and dev layout.
Refresh the stale pyproject description.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 20:23:52 +02:00
EthanfelandClaude Opus 4.8 e304b39009 Merge feat/pool-profiles: Pool Profile companion node + portable profiles
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 20:20:26 +02:00
EthanfelandClaude Opus 4.8 10c2ea6d60 fix: pool profiles never auto-switch on connect; seed empty profile from current pool
Connecting a Pool Profile no longer overwrites the pool's pool_id. The pool is
switched only when the user actively selects a profile in the dropdown; picking
an empty profile while a pool with images is connected offers to copy those
images into it (new seed_profile op + /grid_pool/profiles/seed route), so the
current pool is never silently lost.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 20:14:44 +02:00
EthanfelandClaude Opus 4.8 0215bcb8f3 feat: pool grid exposes refresh hook for profile sync
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 20:03:37 +02:00
EthanfelandClaude Opus 4.8 accd3230a6 feat: pool profile frontend — dropdown, actions, cross-node propagation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 20:02:59 +02:00
EthanfelandClaude Opus 4.8 ad85b002fc feat: profiles routes + register PoolProfile
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 20:00:16 +02:00
EthanfelandClaude Opus 4.8 42138857a9 feat: Image Pool accepts optional POOL_PROFILE (profile or pool_id)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 19:59:26 +02:00
EthanfelandClaude Opus 4.8 b7e064508a feat: PoolProfile companion node
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 19:58:34 +02:00
EthanfelandClaude Opus 4.8 ac3ad07b17 feat: profiles export/import (portable zip)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 19:56:00 +02:00
EthanfelandClaude Opus 4.8 e974413085 feat: profiles duplicate_profile
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 19:55:10 +02:00
EthanfelandClaude Opus 4.8 d3bb7834a4 feat: profiles delete_profile
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 19:54:32 +02:00
EthanfelandClaude Opus 4.8 71462071e4 feat: profiles rename_profile
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 19:51:52 +02:00
EthanfelandClaude Opus 4.8 9a0128b5fa feat: profiles create_profile
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 19:51:21 +02:00
EthanfelandClaude Opus 4.8 0725a46f97 feat: profiles registry read/write + find
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 19:50:52 +02:00
EthanfelandClaude Opus 4.8 1b5ac98936 Add Pool Profiles design + implementation plan
Named, portable profiles for the Image Pool: a Pool Profile companion node
(create/select/rename/delete/duplicate/export-import) outputs a POOL_PROFILE
id into the pool's new optional input; profile or pool_id wins. Registry
(name->id) in profiles.json; live edit-time grid switch via cross-node
propagation. TDD plan with a pure stdlib profiles layer incl. zip round-trip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 19:48:39 +02:00
EthanfelandClaude Opus 4.8 d3358c8a75 Merge feat/text-gate: Text Gate (Manual Pass) node
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 19:37:45 +02:00
EthanfelandClaude Opus 4.8 259a63f8c2 fix: image gate preview fills node + freely resizable (Image Pool sizing)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 19:18:28 +02:00
EthanfelandClaude Opus 4.8 b46de4b031 fix: text gate editor fills node + freely resizable (Image Pool sizing)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 19:11:56 +02:00
EthanfelandClaude Opus 4.8 ef064db972 feat: text gate frontend — editable textarea + pass
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 18:49:00 +02:00
EthanfelandClaude Opus 4.8 b1ac27def9 feat: text gate server route + register TextGate
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 18:48:26 +02:00
EthanfelandClaude Opus 4.8 f617c46aef feat: TextGate node — pause, editable pass-through, signal passthrough
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 18:47:55 +02:00
EthanfelandClaude Opus 4.8 96912d47a4 feat: textgate AnyType wildcard
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 18:44:07 +02:00
EthanfelandClaude Opus 4.8 3250aaa828 test: gate_bus wait_payload honors should_cancel
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 18:43:43 +02:00
EthanfelandClaude Opus 4.8 1008612fb2 feat: gate_bus payload channel + should_cancel
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 18:43:29 +02:00
EthanfelandClaude Opus 4.8 32f616e067 Add Text Gate (Manual Pass) design + implementation plan
Blocking text gate: pauses, shows incoming text in an editable box, Pass
emits the edited text. Optional any-type signal input + signal passthrough
output for ordering. Reuses gate_bus via an additive string payload channel
with a should_cancel hook so the Pass-only gate still honors global Cancel
(processing_interrupted). TDD plan; comfy imports stay lazy for testability.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 18:41:17 +02:00
EthanfelandClaude Opus 4.8 ec8e1b9598 Merge feat/image-gate: Image Gate (Manual Router) node
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 18:33:23 +02:00
EthanfelandClaude Opus 4.8 6e27da0dce feat: show painted mask as a translucent red overlay on the gate preview
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 18:26:33 +02:00
EthanfelandClaude Opus 4.8 f9f924942e feat: sticky mask + keep preview after routing + width-scaled preview
After a route choice the node now keeps the image and shows a 'Run from here'
re-queue button instead of blanking. The last painted mask is remembered and
auto-re-stashed on each new pause (with a Clear control) so it is not lost
between runs. The preview image area now scales with the node width.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 18:17:37 +02:00
EthanfelandClaude Opus 4.8 45e16e1134 fix: hide gate preview element when idle (no stray black box)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 17:59:04 +02:00
EthanfelandClaude Opus 4.8 63647d2488 feat: image gate frontend — preview, dynamic outputs, route/stop/mask
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 17:48:55 +02:00
EthanfelandClaude Opus 4.8 8e8eb317f7 feat: gate server routes + preview + register ImageGate
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 17:43:53 +02:00
EthanfelandClaude Opus 4.8 d8dbc4fb4b feat: ImageGate node — pause, route via ExecutionBlocker, mask out
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 17:42:54 +02:00
EthanfelandClaude Opus 4.8 ea3438567a feat: gate mask_from_stash (paint or zeros)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 17:42:04 +02:00
EthanfelandClaude Opus 4.8 f0f8676eaa feat: gate route_tuple helper
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 17:35:51 +02:00
EthanfelandClaude Opus 4.8 11772bc29d feat: gate_bus mask stash
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 17:35:28 +02:00
EthanfelandClaude Opus 4.8 9148dfec25 feat: gate_bus blocking choice waiter
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 17:35:04 +02:00
EthanfelandClaude Opus 4.8 7e8878bade Add Image Gate (Manual Router) design + implementation plan
Interactive chooser/router: pauses execution, shows the image with up to
10 labeled route buttons + edit-mask + stop. Chosen route gets the image,
others ExecutionBlocker-ed; gate-painted mask on a fixed output; stop
raises InterruptProcessingException. TDD plan with a pure torch-free
gate_bus; lazy comfy imports keep node logic unit-testable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 17:09:26 +02:00
EthanfelandClaude Opus 4.8 8d45a101e7 Merge feat/folder-image-loader: Folder Image Loader node
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 16:36:30 +02:00
EthanfelandClaude Opus 4.8 6751fe5b26 feat: register FolderImageLoader in node mappings
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 16:28:38 +02:00
EthanfelandClaude Opus 4.8 af96155cd1 feat: FolderImageLoader node (image/text/mask/filename/index)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 16:28:07 +02:00
EthanfelandClaude Opus 4.8 dde501c27d feat: scan stem + sidecar text reader
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 16:25:17 +02:00
EthanfelandClaude Opus 4.8 d5b314f6b6 feat: scan.resolve_index with end-of-batch error
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 16:24:51 +02:00
EthanfelandClaude Opus 4.8 ba8de1253e feat: folder scan — depth-limited natural-sorted image listing
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 16:24:26 +02:00
EthanfelandClaude Opus 4.8 d589a59fd1 fix: invert mask polarity so white = painted region
MaskEditor alpha comes through as 0 in painted areas; bake 255-a so the
MASK output is white where painted (region of interest).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 16:20:51 +02:00
EthanfelandClaude Opus 4.8 69968ebb20 fix: flex-wrap grid + free resize (drop width floor)
The DOM-widget width doesn't reliably track the node width in frontend
1.45, so force a fixed column count clipped the grid and the width floor
blocked resizing down. Use flex-wrap (cells wrap to fit, never clip),
drop the computeSize width floor (resize freely), and re-sync the widget
width + reflow on manual resize.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 16:19:00 +02:00
EthanfelandClaude Opus 4.8 66452dc1f0 fix: revert thumbnail size to 96px, keep wider 560 min grid width
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:49:24 +02:00
EthanfelandClaude Opus 4.8 8ea1a02b78 fix: stable grid width — fixed 4 columns + computeSize width floor
ComfyUI snaps the node to computeSize() on selection, and computeSize's
width ignores DOM widgets, so the grid collapsed/clipped on click.
Override node.computeSize to floor the width at the column-fit width.
Lay the grid out as a fixed 4 columns (128px cells) with the node sized
to fit; base width doubled to 560.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:45:41 +02:00
EthanfelandClaude Opus 4.8 d9671b3098 docs: README for Image Pool (Grid)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:13:56 +02:00
EthanfelandClaude Opus 4.8 bc5c50b9a8 feat: grid badges + empty state polish
Index badge, has-mask dot, count, and empty-state message were added in
Phase 1; add drag affordances (grab cursor, cell hover) now that
reorder exists.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:13:19 +02:00
EthanfelandClaude Opus 4.8 25e89ada2b feat: drag-reorder slots
pool.reorder() permutes slots (validated permutation) and keeps the
active selection on its slot; exposed via /grid_pool/reorder. The grid
thumbnails are drag handles; dropping on another cell reorders.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:12:53 +02:00
EthanfelandClaude Opus 4.8 b115a0d449 feat: detach-pool context menu
Right-click 'Detach pool (new id)' assigns a fresh UUID so a cloned
node gets its own independent pool.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:10:46 +02:00
EthanfelandClaude Opus 4.8 a6ed79aabc feat: MaskEditor round-trip — per-slot mask persistence (Phase 2 complete)
Wire the per-slot mask button to ComfyUI's MaskEditor (frontend 1.45):
point the editor at the slot image via node.images + previewMediaType,
open it through the Comfy.MaskEditor.OpenMaskEditor command, poll for
the saved clipspace ref, bake the alpha channel into a grayscale mask
(white = painted) and POST it to /grid_pool/set_mask.

Also fixes DOM-widget sizing for frontend 1.45: size via the getMinHeight
option (the computeLayoutSize path) with NO max, so the grid fills and
grows with the node instead of detaching/locking on click; hide pool_id
via widget.hidden; suppress node.imgs so a registered output never
reserves a preview strip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:03:39 +02:00
EthanfelandClaude Opus 4.8 6feb2c6e63 feat: pool set_mask + route
Write a per-slot grayscale mask sidecar (img_XXXX.mask.png) and record
it on the slot. Add the multipart /grid_pool/set_mask route.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 14:01:26 +02:00
EthanfelandClaude Opus 4.8 cd0b8783dc 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>
2026-06-21 13:59:59 +02:00
EthanfelandClaude Opus 4.8 08df5c8840 Add Folder Image Loader design + implementation plan
Dataset-oriented loader: folder path, control_after_generate index
(fixed/increment/decrement), depth control, sidecar .txt text output,
alpha->mask, stem filename, resolved index. TDD plan with a pure stdlib
scan layer; self-contained except a merge-aware root __init__ registration
(pool node is being built concurrently).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 13:15:05 +02:00
EthanfelandClaude Opus 4.8 de688a514c feat: pool handlers + aiohttp routes
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 13:02:49 +02:00
EthanfelandClaude Opus 4.8 1db94dd57d feat: GridImagePool node (image/mask/index/count/label + IS_CHANGED)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 13:01:39 +02:00
EthanfelandClaude Opus 4.8 40be11cd95 feat: imaging tensor loaders + change hash
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 13:00:30 +02:00
EthanfelandClaude Opus 4.8 6b59a8d54f feat: pool rebuild_manifest recovery
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 12:59:50 +02:00
EthanfelandClaude Opus 4.8 2b3f2ffc88 feat: pool set_label
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 12:59:09 +02:00
EthanfelandClaude Opus 4.8 8b3043f3d4 feat: pool remove_slot with file cleanup
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 12:58:36 +02:00
EthanfelandClaude Opus 4.8 9f98775677 feat: pool set_active + resolve_slot selection rule
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 12:58:05 +02:00
EthanfelandClaude Opus 4.8 0bd981d29e feat: pool add_image + monotonic naming
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 12:57:06 +02:00
EthanfelandClaude Opus 4.8 9077969daf feat: pool manifest read/write with atomic save
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 12:56:32 +02:00
EthanfelandClaude Opus 4.8 af3e78b29d fix: make pytest collection coexist with ComfyUI root __init__
pytest collects the repo root as a Package and imports its __init__.py
during test setup; guard the ComfyUI-only relative imports behind
__package__ so the suite can import gates.* standalone. Drop the
tests/ package marker and pin pythonpath/testpaths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 12:56:32 +02:00
EthanfelandClaude Opus 4.8 d75f73af2d chore: scaffold ComfyUI-Datasete-Gates package
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 12:51:54 +02:00