Repository navigation
[backport core/1.51] feat(widgets): add RESOLUTION_PREVIEW readout wi… - #17069
Conversation
…dget (#16511) Display-only widget for the ResolutionSelector node showing the width/height computed from the sibling aspect_ratio/megapixels/multiple widgets, updating live as they change. Reads sibling values reactively via widgetValueStore and mirrors the backend rounding math. Follows the CURVE/VIDEO_EDIT rails: input spec in nodeDefSchemaV2, constructor in widgets.ts map, Vue component via widgetRegistry. The widget sets serialize=false on both the widget (widgets_values) and its options (API prompt), so workflow files and prompts are unchanged. Need BE Comfy-Org/ComfyUI#16013 ## Backport notes Conflict in nodeDefSchemaV2.ts: main's trailing type guards (isColorInputSpec / isTextareaInputSpec / isGalleriaInputSpec) are not on core/1.51, so only isResolutionPreviewInputSpec was added. ## Backport-only compatibility fix core/1.51 still types widget values as IBaseWidget<boolean | number | string | object | undefined> and derives TWidgetValue from the IWidget union, so a widget whose value is `null` does not typecheck (addWidget rejects it and TWidgetValue widening breaks useNodeReplacement). The widget value is `undefined` on this branch instead of `null`; the value is never read, so behaviour is unchanged.
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1832 passed, 0 failed · 1 flaky📊 Browser Reports
📦 Bundle Size
⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-05T13:45:41.343Z",
"gitSha": "89491e9664f870dca3a2493bdac54b50eaaa03eb",
"branch": "backport-16511-to-core-1.51",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2054.979000000003,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.9049999999999985,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 460.85900000000004,
"heapDeltaBytes": 5061084,
"heapUsedBytes": 71516712,
"domNodes": 18,
"jsHeapTotalBytes": 24379392,
"scriptDurationMs": 7.353,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2038.4149999999863,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.993999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 540.7570000000001,
"heapDeltaBytes": 4994740,
"heapUsedBytes": 71568740,
"domNodes": 18,
"jsHeapTotalBytes": 24117248,
"scriptDurationMs": 10.004,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1996.4329999999961,
"styleRecalcs": 80,
"styleRecalcDurationMs": 51.931000000000004,
"layouts": 12,
"layoutDurationMs": 5.430000000000001,
"taskDurationMs": 973.931,
"heapDeltaBytes": 378424,
"heapUsedBytes": 66713908,
"domNodes": 63,
"jsHeapTotalBytes": 24645632,
"scriptDurationMs": 121.13300000000001,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1870.4790000000457,
"styleRecalcs": 74,
"styleRecalcDurationMs": 41.24,
"layouts": 12,
"layoutDurationMs": 3.6960000000000006,
"taskDurationMs": 903.941,
"heapDeltaBytes": 85072,
"heapUsedBytes": 66375548,
"domNodes": 56,
"jsHeapTotalBytes": 24907776,
"scriptDurationMs": 120.36099999999999,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1753.1000000000176,
"styleRecalcs": 32,
"styleRecalcDurationMs": 20.881999999999998,
"layouts": 6,
"layoutDurationMs": 0.7540000000000001,
"taskDurationMs": 418.70799999999997,
"heapDeltaBytes": 8246416,
"heapUsedBytes": 74645384,
"domNodes": 79,
"jsHeapTotalBytes": 23330816,
"scriptDurationMs": 12.187,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1734.8200000000134,
"styleRecalcs": 32,
"styleRecalcDurationMs": 16.129,
"layouts": 6,
"layoutDurationMs": 0.675,
"taskDurationMs": 407.312,
"heapDeltaBytes": 8390936,
"heapUsedBytes": 74767596,
"domNodes": 75,
"jsHeapTotalBytes": 23592960,
"scriptDurationMs": 11.132,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 594.4630000000188,
"styleRecalcs": 13,
"styleRecalcDurationMs": 9.507,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 388.57,
"heapDeltaBytes": -11528012,
"heapUsedBytes": 54901164,
"domNodes": 22,
"jsHeapTotalBytes": 25427968,
"scriptDurationMs": 60.251,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 607.3179999999638,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.815000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 394.879,
"heapDeltaBytes": -11127496,
"heapUsedBytes": 55298472,
"domNodes": 16,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 58.989,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2036.941000000013,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.504000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 613.856,
"heapDeltaBytes": 12672860,
"heapUsedBytes": 73796916,
"domNodes": -281,
"jsHeapTotalBytes": 2719744,
"scriptDurationMs": 16.330000000000005,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2009.1879999999946,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.738000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 678.837,
"heapDeltaBytes": 11550924,
"heapUsedBytes": 72473108,
"domNodes": -281,
"jsHeapTotalBytes": 2981888,
"scriptDurationMs": 16.858,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2227.9100000000085,
"styleRecalcs": 69,
"styleRecalcDurationMs": 14.421999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1213.0149999999999,
"heapDeltaBytes": 2520740,
"heapUsedBytes": 64321424,
"domNodes": -283,
"jsHeapTotalBytes": 3698688,
"scriptDurationMs": 336.61199999999997,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2250.637999999981,
"styleRecalcs": 68,
"styleRecalcDurationMs": 14.4,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1241.459,
"heapDeltaBytes": -6938716,
"heapUsedBytes": 55478740,
"domNodes": -284,
"jsHeapTotalBytes": 4554752,
"scriptDurationMs": 339.393,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3333.2269999999653,
"styleRecalcs": 64,
"styleRecalcDurationMs": 14.316000000000003,
"layouts": 60,
"layoutDurationMs": 7.626,
"taskDurationMs": 1468.839,
"heapDeltaBytes": 1689248,
"heapUsedBytes": 65383224,
"domNodes": -286,
"jsHeapTotalBytes": 3506176,
"scriptDurationMs": 398.864,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3283.0300000000534,
"styleRecalcs": 64,
"styleRecalcDurationMs": 14.356,
"layouts": 60,
"layoutDurationMs": 7.797999999999999,
"taskDurationMs": 1458.3750000000002,
"heapDeltaBytes": -642252,
"heapUsedBytes": 62139428,
"domNodes": -289,
"jsHeapTotalBytes": 3506176,
"scriptDurationMs": 405.161,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2040.3879999999504,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.893,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 709.007,
"heapDeltaBytes": 11792368,
"heapUsedBytes": 74162724,
"domNodes": -283,
"jsHeapTotalBytes": 3768320,
"scriptDurationMs": 17.233999999999998,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "minimap-idle",
"durationMs": 2057.5569999999743,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.552999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 743.1370000000002,
"heapDeltaBytes": 7066412,
"heapUsedBytes": 68526584,
"domNodes": -284,
"jsHeapTotalBytes": 2195456,
"scriptDurationMs": 17.919999999999998,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 604.8150000000305,
"styleRecalcs": 46,
"styleRecalcDurationMs": 10.9,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 410.374,
"heapDeltaBytes": -9902080,
"heapUsedBytes": 56574540,
"domNodes": 18,
"jsHeapTotalBytes": 24117248,
"scriptDurationMs": 122.01800000000001,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 558.4479999999985,
"styleRecalcs": 46,
"styleRecalcDurationMs": 10.815999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 406.518,
"heapDeltaBytes": -10264644,
"heapUsedBytes": 56302636,
"domNodes": 18,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 118.71,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2018.622999999991,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.530999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 465.254,
"heapDeltaBytes": 5586728,
"heapUsedBytes": 71912188,
"domNodes": 20,
"jsHeapTotalBytes": 24117248,
"scriptDurationMs": 6.943,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2029.3249999999716,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.147000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 532.5020000000001,
"heapDeltaBytes": 5419132,
"heapUsedBytes": 72087240,
"domNodes": 18,
"jsHeapTotalBytes": 23855104,
"scriptDurationMs": 9.081000000000001,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1691.1820000000262,
"styleRecalcs": 75,
"styleRecalcDurationMs": 37.574000000000005,
"layouts": 16,
"layoutDurationMs": 4.66,
"taskDurationMs": 806.824,
"heapDeltaBytes": -3749816,
"heapUsedBytes": 62813376,
"domNodes": 61,
"jsHeapTotalBytes": 23855104,
"scriptDurationMs": 94.164,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1731.7509999999174,
"styleRecalcs": 76,
"styleRecalcDurationMs": 40.198,
"layouts": 16,
"layoutDurationMs": 4.874,
"taskDurationMs": 816.797,
"heapDeltaBytes": -3773496,
"heapUsedBytes": 62827728,
"domNodes": 62,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 92.5,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-transition-enter",
"durationMs": 1435.2230000000077,
"styleRecalcs": 20,
"styleRecalcDurationMs": 33.516000000000005,
"layouts": 15,
"layoutDurationMs": 13.461,
"taskDurationMs": 1011.847,
"heapDeltaBytes": 23847136,
"heapUsedBytes": 88257476,
"domNodes": 13673,
"jsHeapTotalBytes": 10223616,
"scriptDurationMs": 18.762999999999995,
"eventListeners": 2375,
"totalBlockingTimeMs": 143,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 8682.809999999961,
"styleRecalcs": 249,
"styleRecalcDurationMs": 37.952,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4519.717,
"heapDeltaBytes": 17171884,
"heapUsedBytes": 77762192,
"domNodes": -280,
"jsHeapTotalBytes": 2912256,
"scriptDurationMs": 1076.706,
"eventListeners": -163,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8406.034999999974,
"styleRecalcs": 250,
"styleRecalcDurationMs": 38.998000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4349.661,
"heapDeltaBytes": -5145712,
"heapUsedBytes": 55941964,
"domNodes": -283,
"jsHeapTotalBytes": 2981888,
"scriptDurationMs": 1065.4379999999999,
"eventListeners": -133,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 18061.692999999992,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17174.635,
"heapDeltaBytes": -27013652,
"heapUsedBytes": 171833564,
"domNodes": -8312,
"jsHeapTotalBytes": -13541376,
"scriptDurationMs": 117.78399999999999,
"eventListeners": -16389,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.779999999999927,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17738.73500000002,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16894.477000000003,
"heapDeltaBytes": -53096884,
"heapUsedBytes": 158630560,
"domNodes": -8311,
"jsHeapTotalBytes": -7020544,
"scriptDurationMs": 127.08500000000001,
"eventListeners": -16387,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 21871.56100000004,
"styleRecalcs": 174,
"styleRecalcDurationMs": 20.070000000000032,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21201.87,
"heapDeltaBytes": -15061500,
"heapUsedBytes": 184293296,
"domNodes": -8312,
"jsHeapTotalBytes": -14688256,
"scriptDurationMs": 437.592,
"eventListeners": -16385,
"totalBlockingTimeMs": 101,
"frameDurationMs": 18.886666666666617,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 21770.647999999936,
"styleRecalcs": 175,
"styleRecalcDurationMs": 21.140999999999966,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21118.535,
"heapDeltaBytes": -48829380,
"heapUsedBytes": 164496496,
"domNodes": -8312,
"jsHeapTotalBytes": -15929344,
"scriptDurationMs": 458.27700000000004,
"eventListeners": -16381,
"totalBlockingTimeMs": 164,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 452.15100000001485,
"styleRecalcs": 13,
"styleRecalcDurationMs": 18.599000000000004,
"layouts": 2,
"layoutDurationMs": 0.418,
"taskDurationMs": 103.212,
"heapDeltaBytes": 4977672,
"heapUsedBytes": 70347860,
"domNodes": 126,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 7.253000000000001,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 455.9679999999844,
"styleRecalcs": 12,
"styleRecalcDurationMs": 20.147000000000002,
"layouts": 3,
"layoutDurationMs": 0.556,
"taskDurationMs": 112.13999999999999,
"heapDeltaBytes": 4951776,
"heapUsedBytes": 70511548,
"domNodes": 121,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 7.555999999999998,
"eventListeners": 97,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
}
]
} |
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## core/1.51 #17069 +/- ##
===========================================
Coverage 81.75% 81.75%
===========================================
Files 1886 1888 +2
Lines 107473 107529 +56
Branches 29431 29920 +489
===========================================
+ Hits 87867 87913 +46
- Misses 19257 19267 +10
Partials 349 349
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
dante01yoon
left a comment
There was a problem hiding this comment.
Approved — faithful backport of #16511 to core/1.51.
What I verified
- Backport fidelity: diffed this PR's full diff against the merged #16511 diff. Identical apart from hunk offsets and the documented
null->undefinedswap in 6 places. - BE dependency: Comfy-Org/ComfyUI#16013 (
Add live resolution preview widget to ResolutionSelector) merged 2026-09-02, so theRESOLUTION_PREVIEWinput spec this consumes actually exists on the backend. - Schema union ordering:
zResolutionPreviewInputSpecis inserted beforezCustomInputSpecinzInputSpec. That ordering matters —zCustomInputSpechastype: z.string()and would otherwise swallow the spec. Correct here, same as main. - CI: green (unit
test, 16 Playwright chromium shards, storybook build, licenses, fonts, scan).
On the null → undefined compat change
I checked the "the value is never read" claim rather than taking it at face value, and it holds:
WidgetResolutionPreview.vueonly ever toucheswidget.nameandwidget.options?.{ratio,megapixels,multiple}_widget. There is nowidget.valueread anywhere in the feature.useResolutionPreviewWidgetsetsserialize: falseon the options andrawWidget.serialize = falseon the widget, so the value never reacheswidgets_valuesor the API prompt.
So the swap is inert for behaviour, and it buys typecheck compatibility with this branch's IBaseWidget<boolean | number | string | object | undefined>. Good call keeping the backport type-safe instead of loosening the base type on a release branch.
| IWidgetResolutionPreviewOptions | ||
| > { | ||
| type: 'resolutionpreview' | ||
| value: undefined |
There was a problem hiding this comment.
nit-pick (non-blocking): this undefined (and the five other null -> undefined sites in this PR) is a real, deliberate deviation from the merged #16511, but this PR's description does not mention it.
Its sibling backport #17070 (cloud/1.51) carries the identical code delta and documents both the nodeDefSchemaV2.ts conflict resolution and a "Backport-only compatibility fix" section explaining exactly why null does not typecheck on the 1.51 branches. #17071 and #17074 have it too. Only this one is missing both sections.
Could we paste the same two sections into this description? Otherwise someone bisecting core/1.51 later finds an unexplained divergence from main with no rationale attached. No code change needed — the diff itself is correct.
| return floor % 2 === 0 ? floor : floor + 1 | ||
| } | ||
|
|
||
| // Mirrors ResolutionSelector.execute in comfy_extras/nodes_resolution.py — |
There was a problem hiding this comment.
suggestion (non-blocking, and not for this backport — it belongs on main):
This block reimplements the backend's resolution math in the frontend, and the comment right above it is the whole contract:
// Mirrors ResolutionSelector.execute in comfy_extras/nodes_resolution.py —
// keep the math in sync with the backend.
That includes a hand-rolled roundHalfToEven to imitate Python's banker's rounding, the megapixels * 1024 * 1024 scale factor, and the round(x / multiple) * multiple snapping. Nothing enforces that these stay in sync — if nodes_resolution.py ever changes its rounding or scale base, this widget silently shows a resolution the user will not actually get. Because it is display-only, there is no error path: the user just sees one number and receives a differently-sized image.
I am not blocking on it here — this code is already merged on main via #16511, and holding the backports would only leave the release branches diverged from main, which is worse.
For a follow-up on main, the cheapest durable fix is a golden-vector contract test: a small fixture of (aspect_ratio, megapixels, multiple) -> (width, height) cases generated from ResolutionSelector.execute and asserted against this composable, so a backend formula change fails CI here instead of shipping a wrong preview. Longer term, having the backend return the computed width/height on the input spec would remove the duplicate math entirely.
I have left this note only on this PR (oldest release branch, longest-lived) rather than repeating it on all six.
…dget (#16511)
Display-only widget for the ResolutionSelector node showing the width/height computed from the sibling aspect_ratio/megapixels/multiple widgets, updating live as they change. Reads sibling values reactively via widgetValueStore and mirrors the backend rounding math.
Follows the CURVE/VIDEO_EDIT rails: input spec in nodeDefSchemaV2, constructor in widgets.ts map, Vue component via widgetRegistry. The widget sets serialize=false on both the widget (widgets_values) and its options (API prompt), so workflow files and prompts are unchanged.
Need BE Comfy-Org/ComfyUI#16013