Comfy-Org / Comfy-Org/ComfyUI_frontend

Load Image node preview shows a previous template's example image while the widget holds the uploaded asset

Open
#17,580 0 comments 0 reactions 1 assignee Claimed by @christian-byrne View on GitHub
Dominant language
TypeScript
Stars
2k
Forks
697
Avg merge
1d 3h
Merged PRs (30d)
495

Description

## Problem / Goal

Reported on the internal bug dump by Ali Ranjah ([Slack thread](https://comfy-organization.slack.com/archives/C0A4XMHANP3/p1788586947461519), 2026-09-05), surface `nightly.engcomfy.com`.

A Load Image node whose widget is set to an uploaded asset keeps drawing a previous template's bundled example image as its node thumbnail. The two images involved:

```
widget value (correct): qa-scene-01.jpg — 1368x768, uploaded during the session
drawn thumbnail (stale): flux_fill_inpaint_example_input_image.png — 1024x1024, bundled with the previously loaded template
```

The widget resolved correctly to the uploaded photograph — verified by fetching the widget's target through `/api/view` — while the node thumbnail still drew the example image from the previously loaded template. The MaskEditor, opened on the same node, showed the correct image.

So the selection and the execution path are both right; only the drawn preview is stale. That points at the preview refresh path — the thumbnail is not re-rendered when the widget value changes away from a template's example image, or is cached from the template-load path — rather than at asset selection.

The consequence worth stating explicitly: on this surface the drawn node thumbnail is not evidence of which asset a widget holds. Any manual QA step or screenshot check that asserts asset identity from the canvas thumbnail can pass or fail for the wrong reason, and must verify through `/api/view` (or by opening the MaskEditor) instead.

## Proposed Solution

- Find why the Load Image preview is not invalidated when the widget value changes from a template's bundled example image to an uploaded asset. Two paths to check: the widget value-change path, and the template-load path that can preload an example image into the widget.
- Re-render (or re-key) the preview from the current widget value whenever the value changes, so the thumbnail always reflects the asset the widget actually holds.
- If the preview is cached for performance, key that cache by widget value and invalidate it on change, instead of keeping the last drawn image.

## Acceptance Criteria

- Changing a Load Image widget from one asset to another — in particular from a template's bundled example image to an uploaded asset — updates the drawn preview without reloading the node.
- The reported case no longer reproduces: with the widget set to the uploaded photograph, the thumbnail shows that image, not the previous template's example.
- A regression test asserts the preview reflects the current widget value after a value change, not only after a fresh upload.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.