Skip to content

port(main): apply PR #251 node updates onto public main - #9

Merged
QuQingY merged 6 commits into
mainfrom
codex/port-pr251
Aug 11, 2026
Merged

port(main): apply PR #251 node updates onto public main#9
QuQingY merged 6 commits into
mainfrom
codex/port-pr251

Conversation

@QuQingY

@QuQingY QuQingY commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Port of ComfyResearch-dev PR #251 onto public main

This branch applies the change set of PR #251 ("Merge self-driving-complete node updates into main") onto this repository's main, without carrying over other features from the dev repo's history.

What is included

  • New moving_statistics node (backend definition, generated contracts, frontend component, wiring)
  • Node definition fixes (metric_compare generalization, representationId runtime resolution with fallback, fourier/information-plane/weight-product warnings + NaN, vocabCap removal from toy-language datasets)
  • Engine fixes (multi-slot CE loss, representation collector fallback, information-plane per-feature MI, CPU eigh retry, NDJSON error events)
  • Frontend canvas/visualization updates (1D curve transform wiring, tensor selector hub, compare handles, sidebar connectability grouping)
  • Tests and refreshed golden snapshots

Conflicts resolved against this repo's refactored baseline

  • test_frontend_channel_ledger.py / test_frontend_channel_endstate.py: kept this repo's naming (REGISTERED_FRONTEND_TYPES), bumped counts 51 -> 52 (moving_statistics)
  • recorder.py: kept this repo's comment, added the new observable_warnings state
  • generate-connection-golden.ts / connectionRules.ts: adopted the shared CONNECTION_PROBE_HANDLE_PAIRS export
  • GenericObservableNode.tsx: adopted the representation dropdown / auto-fix logic
  • selfDrivingGraph.ts: this repo's lottery path already had no vocabCap; no change needed

Verified on this branch

  • comfy_research/nodes/generate.py --check passes (node manifest / generated contracts current)
  • validate_defs() registry validation passes
  • Backend tests: 16 passed (frontend-channel ledger/endstate, representation resolve smoke)
  • Frontend: full npm run build (vite + all codegen verifiers) passes; 87 tests in the PR-related suites pass

@JinxinWonderWorld JinxinWonderWorld left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review result: request changes

I found two merge-blocking regressions and four additional correctness or contract gaps:

  1. [P1] moving_statistics changes its React Hook count on the normal empty to computed transition.
  2. [P1] saxe_fixed_width_0_07 information-plane binning emits negative state ids, crashes np.bincount, and the exception is silently converted to an empty frame.
  3. [P2] generalized Metric compare discards available xTicks and relabels real steps as 0..N-1.
  4. [P2] observable warnings are set but never cleared by a later clean run.
  5. [P2] sidebar socket metadata omits the new legal tensor_selector.tensor_list to tensor_viz_general or tensor_viz_2d tensor_list path.
  6. [P2] vocabCap removal is incomplete: ToyLanguageLmDatasetNode.tsx still reads and writes the removed key at lines 112-115, 225-235, and 319-325. A read-only fallback for old graphs is reasonable, but new edits should write only vocabSize.

Verification: GitHub CI is green; locally, all 320 frontend tests and npm run build plus codegen gates pass, and the targeted backend set passes. A minimal negative-activation model reproduces the Saxe failure as ValueError: list argument must have no negative elements. Current tests do not exercise the moving-statistics render transition or this Saxe option.

Also, git diff --check reports trailing whitespace at the EOF of five newly added files.

Comment thread frontend/src/components/nodes/MovingStatisticsNode.tsx Outdated
Comment thread frontend/src/graph/trainerVizPayload.ts Outdated
Comment thread frontend/src/graph/nodeSockets.ts Outdated
Comment thread frontend/src/graph/tensorVizCompareResolution.ts
Comment thread comfy_research/engine/trainer/information_plane.py Outdated

@JinxinWonderWorld JinxinWonderWorld left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review of 3372334 (incremental from 455ec118).

Verified that this commit fixes the six previously reported issues: React hook ordering, negative Saxe state IDs plus warning propagation, Metric Compare xTicks, stale warning clearing, socket metadata, and vocabCap writeback. Local verification passed: 54 frontend test files / 325 tests, production build plus codegen/manifest gates, 26 targeted backend tests, and git diff --check; GitHub CI is also green.

One curve-correctness issue remains, detailed inline: Moving Statistics does not preserve the selected output step coordinates when stride or minPeriods shortens the series.

Comment thread frontend/src/components/nodes/MovingStatisticsNode.tsx

@JinxinWonderWorld JinxinWonderWorld left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final re-review of 7fa231f (incremental from 3372334).

The output-anchor math now correctly maps non-uniform ticks and the previous thread is addressed. I cannot approve this head yet because the fix introduces one main-path runtime failure and still drops coordinates for valid chained transforms:

  1. Tensor selector → Moving Statistics calls a runtime helper whose import was removed, causing ReferenceError during render.
  2. Moving Statistics still reads coordinates from a bespoke graph walker instead of the resolved tensor, so Moving Statistics → Moving Statistics and other valid 1D-series inputs lose xTicks.

Verification: 54 frontend test files / 330 tests passed; production build and codegen/manifest gates passed; 26 targeted backend tests passed; both incremental and full git diff --check passed; GitHub CI is green. A targeted TypeScript check reports five errors in MovingStatisticsNode.tsx, including the missing runtime helper. Details are inline.

Comment thread frontend/src/components/nodes/MovingStatisticsNode.tsx Outdated
Comment thread frontend/src/components/nodes/MovingStatisticsNode.tsx Outdated

@JinxinWonderWorld JinxinWonderWorld left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review of 20abac1 (incremental from 7fa231f).

Both prior Moving Statistics blockers are fixed: the unresolved selector helper path was removed, compute now consumes hydrated.xTicks, and all earlier review threads are resolved. I cannot approve this head yet because two correctness gaps remain:

  1. Non-finite eigen results raise ValueError outside the retry handling, so the remaining jitter attempts and CPU-double fallback are skipped.
  2. MultiSlot CE checks ranks but not that target [B, K] matches logits first two dimensions, allowing a transposed or wrong-slot target with the same element count to compute a silently mispaired loss.

Verification: 54 frontend files / 331 tests passed; production build plus codegen/manifest gates passed; the 6 new backend tests and Ruff undefined-name gate passed; incremental and full git diff --check passed; GitHub CI is green. The full local backend run reached 791 passed / 6 skipped, with 4 unrelated failures because this local environment lacks the repository-pinned antlr4 runtime. Both reported gaps were independently reproduced; details are inline.

Comment thread comfy_research/engine/trainer/loss_terms.py
Comment thread comfy_research/engine/optimizers/matrix_preconditioner_optimizers.py Outdated

@JinxinWonderWorld JinxinWonderWorld left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head 87885e6, including the incremental fix over 20abac1. The two prior blockers are resolved: MultiSlot CE now enforces target [B,K] against pred [B,K,V] at both trainer and criterion boundaries, and non-finite eigh outputs remain inside the jitter/CPU fallback flow. Local targeted tests: 9 passed; Ruff and diff check passed. Current-head CI passed backend, frontend build/drift guard, and Playwright; all review threads are resolved. No remaining blocking findings on the Standards or Spec axes.

@QuQingY
QuQingY merged commit a39eafc into main Aug 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants