Skip to content

[backport core/1.41] Use preview downscaling in fewer places#9682

Merged
AustinMroz merged 1 commit intocore/1.41from
backport-9678-to-core-1.41
Mar 9, 2026
Merged

[backport core/1.41] Use preview downscaling in fewer places#9682
AustinMroz merged 1 commit intocore/1.41from
backport-9678-to-core-1.41

Conversation

@comfy-pr-bot
Copy link
Member

@comfy-pr-bot comfy-pr-bot commented Mar 9, 2026

Backport of #9678 to core/1.41

Automatically created by backport workflow.

┆Issue is synchronized with this Notion page by Unito

Thumbnail downscaling is currently being used in more places than it
should be.
- Nodes which display images will display incorrect resolution
indicators
<img width="255" height="372" alt="image"
src="https://github.com/user-attachments/assets/674790b6-04c8-4db0-84c2-2fa2dbaf123d"
/> <img width="255" height="372" alt="image"
src="https://github.com/user-attachments/assets/1dbe751b-7462-4408-9236-9446b005f5fc"
/>

This is particularly confusing with output nodes, which claim the output
is not of the intended resolution
- The "Download Image" and "Open Image" context menu actions will
incorrectly download the downscaled thumbnail.
- The assets panel will incorrectly display the thumbnail resolution as
the resolution of the output
- The lightbox (zoom) of an image will incorrectly display a downscaled
thumbnail.

This PR is a quick workaround to staunch the major problems
- Nodes always display full previews.
- Resolution downscaling is applied on the assert card, not on the
assetItem itself
- Due to implementation, this means that asset cards will still
incorrectly show the resolution of the thumbnail instead of the size of
the full image.

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Alexander Brown <drjkl@comfy.org>
@comfy-pr-bot comfy-pr-bot requested a review from a team as a code owner March 9, 2026 23:04
@comfy-pr-bot comfy-pr-bot added the backport Backporting a PR onto a release candidate label Mar 9, 2026
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Mar 9, 2026
@github-actions
Copy link

github-actions bot commented Mar 9, 2026

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 03/09/2026, 11:05:37 PM UTC

Links

@github-actions
Copy link

github-actions bot commented Mar 9, 2026

🎭 Playwright: ✅ 548 passed, 0 failed · 6 flaky

📊 Browser Reports
  • chromium: View Report (✅ 535 / ❌ 0 / ⚠️ 6 / ⏭️ 10)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 10 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

@github-actions
Copy link

github-actions bot commented Mar 9, 2026

⚡ Performance Report

ℹ️ Collecting baseline variance data (0/5 runs). Significance will appear after 2 main branch runs.

Metric Baseline PR Δ
canvas-idle: style recalcs 125 123 -2%
canvas-idle: layouts 1 0 -100%
canvas-idle: task duration 400ms 382ms -5%
canvas-mouse-sweep: style recalcs 181 169 -7%
canvas-mouse-sweep: layouts 13 12 -5%
canvas-mouse-sweep: task duration 970ms 876ms -10%
dom-widget-clipping: style recalcs 39 43 +8%
dom-widget-clipping: layouts 0 0
dom-widget-clipping: task duration 334ms 358ms +7%
subgraph-dom-widget-clipping: style recalcs 72 73 +1%
subgraph-dom-widget-clipping: layouts 0 0
subgraph-dom-widget-clipping: task duration 396ms 401ms +1%
subgraph-idle: style recalcs 121 121 +0%
subgraph-idle: layouts 0 0 +0%
subgraph-idle: task duration 369ms 373ms +1%
subgraph-mouse-sweep: style recalcs 171 160 -6%
subgraph-mouse-sweep: layouts 16 16 +0%
subgraph-mouse-sweep: task duration 923ms 769ms -17%
Raw data
{
  "timestamp": "2026-03-09T23:08:52.183Z",
  "gitSha": "0694889cf5d57e1c9354d923449a090c88c49437",
  "branch": "backport-9678-to-core-1.41",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2012.9809999999964,
      "styleRecalcs": 123,
      "styleRecalcDurationMs": 21.142,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 383.966,
      "heapDeltaBytes": -3591908
    },
    {
      "name": "canvas-idle",
      "durationMs": 2030.9819999999945,
      "styleRecalcs": 124,
      "styleRecalcDurationMs": 17.283,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 373.71,
      "heapDeltaBytes": -3379852
    },
    {
      "name": "canvas-idle",
      "durationMs": 2011.8810000000167,
      "styleRecalcs": 122,
      "styleRecalcDurationMs": 17.826,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 387.21799999999996,
      "heapDeltaBytes": -2897264
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 2039.3550000000005,
      "styleRecalcs": 183,
      "styleRecalcDurationMs": 55.324999999999996,
      "layouts": 12,
      "layoutDurationMs": 3.5380000000000003,
      "taskDurationMs": 1060.657,
      "heapDeltaBytes": -3091376
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1848.0010000000107,
      "styleRecalcs": 165,
      "styleRecalcDurationMs": 41.818,
      "layouts": 12,
      "layoutDurationMs": 3.0970000000000004,
      "taskDurationMs": 812.118,
      "heapDeltaBytes": -3242196
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1756.1230000000023,
      "styleRecalcs": 159,
      "styleRecalcDurationMs": 43.278999999999996,
      "layouts": 13,
      "layoutDurationMs": 3.0309999999999997,
      "taskDurationMs": 754.3910000000001,
      "heapDeltaBytes": -3453788
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 598.9299999999957,
      "styleRecalcs": 42,
      "styleRecalcDurationMs": 12.884,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 351.534,
      "heapDeltaBytes": 7601772
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 551.7220000000407,
      "styleRecalcs": 41,
      "styleRecalcDurationMs": 12.297999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 340.734,
      "heapDeltaBytes": 7510852
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 599.5290000000182,
      "styleRecalcs": 45,
      "styleRecalcDurationMs": 15.677,
      "layouts": 1,
      "layoutDurationMs": 0.26199999999999996,
      "taskDurationMs": 383.045,
      "heapDeltaBytes": 13694684
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 581.5999999999804,
      "styleRecalcs": 74,
      "styleRecalcDurationMs": 18.144000000000002,
      "layouts": 1,
      "layoutDurationMs": 0.28700000000000003,
      "taskDurationMs": 404.78400000000005,
      "heapDeltaBytes": 16511584
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 577.3300000000177,
      "styleRecalcs": 73,
      "styleRecalcDurationMs": 15.187000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 391.877,
      "heapDeltaBytes": 15360012
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 569.7270000000003,
      "styleRecalcs": 71,
      "styleRecalcDurationMs": 15.39,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 407.06,
      "heapDeltaBytes": 14664084
    },
    {
      "name": "subgraph-idle",
      "durationMs": 1991.3099999999986,
      "styleRecalcs": 120,
      "styleRecalcDurationMs": 18.206,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 361.27000000000004,
      "heapDeltaBytes": -4147100
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2005.7519999999727,
      "styleRecalcs": 121,
      "styleRecalcDurationMs": 20.981999999999996,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 371.492,
      "heapDeltaBytes": -4730628
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2006.4360000000079,
      "styleRecalcs": 122,
      "styleRecalcDurationMs": 22.556,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 387.58400000000006,
      "heapDeltaBytes": -4327432
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1694.529000000017,
      "styleRecalcs": 154,
      "styleRecalcDurationMs": 44.381,
      "layouts": 16,
      "layoutDurationMs": 3.8470000000000004,
      "taskDurationMs": 686.297,
      "heapDeltaBytes": -5143620
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1733.9909999999463,
      "styleRecalcs": 157,
      "styleRecalcDurationMs": 41.535000000000004,
      "layouts": 16,
      "layoutDurationMs": 3.648,
      "taskDurationMs": 692.55,
      "heapDeltaBytes": -5280924
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1979.703000000029,
      "styleRecalcs": 170,
      "styleRecalcDurationMs": 48.20399999999999,
      "layouts": 16,
      "layoutDurationMs": 4.024,
      "taskDurationMs": 927.9280000000001,
      "heapDeltaBytes": -5128824
    }
  ]
}

@AustinMroz AustinMroz merged commit a1af7e4 into core/1.41 Mar 9, 2026
39 checks passed
@AustinMroz AustinMroz deleted the backport-9678-to-core-1.41 branch March 9, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Backporting a PR onto a release candidate size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants