Comfy-Org / Comfy-Org/ComfyUI_frontend

[Nodes 2.0] Compare Images node does not persist in some cases

Open
#13,604 1 comment 0 reactions 0 assignees View on GitHub
area:nodes area:undo-redo area:workflows Potential Bug
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

### Prerequisites

- [x] I am running the latest version of ComfyUI
- [ ] I have custom nodes enabled

### What happened?

The Compare Images node unexpectedly clears itself in the following cases:
- Switching to another workflow and back
- Pressing Ctrl+Z to undo an unrelated change (e.g. moving a different node)

This is disruptive as you cannot leave the workflow or undo any changes while comparing images in a workflow, or the comparison gets erased. This behavior is also unexpected because it differs from similar display nodes, like Preview Image (which does not clear during either of these cases).

Confirmed this behavior on Firefox, Chrome, Edge, and ComfyUI Desktop.

### Steps to Reproduce

1. Create a new workflow with Nodes 2.0 enabled
2. Load two images and feed them into the Compare Images node, and run the workflow (see images get compared)
3. Switch to a different workflow then switch back (see images no longer compared)
4. Run the workflow again (see images compared)
5. Make any unrelated change like moving one of the Load Image nodes
6. Use CTRL+Z to undo that change (see images no longer compared)

### How is this affecting you?

Feature doesn't work as expected

### ComfyUI Frontend Version

1.46.15

### Browser

Chrome/Chromium

### Console Errors

```javascript

```

### Logs

```shell

```

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Compare Images node behavior with Nodes 2.0 enabled, checking state after switching workflows and undoing an unrelated change. Compare its persistence behavior with the Preview Image node. Done means the two compared images remain displayed after both workflow switching and unrelated undo operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.