Comfy-Org / Comfy-Org/ComfyUI_frontend

[Bug]: ctrl+z undo returns to a way back previous state

Open
#4,087 3 comments 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

### Custom Node Testing

- [ ] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Frontend Version

[ComfyUI 0.3.39]
[ComfyUI_frontend v1.20.7]

### Expected Behavior

CTRL + Z to undo ONE step
Preferable a REDO button that is not bugged and returns the workflow to current state.

### Actual Behavior

I have not tested this on a clean ComfyUI. But this happens all the time since forever... It's not a recent bug.

When working with a large (I mean 1MB or more) workflows. I have more than once wanted to die when I accidentally did a ctrl+z and the workflow instead of returning one steps returns to a state of MANY HOURS ago.

One even "saving" returned my workflow to a previous state. The only way I see to make this not happen sometimes is to export the workflow or generate a image that embeds it. More than once my embedded image had a more accurate workflow than the one I accidentally pressed "undo" and it returned to many many steps ago.

I don't know how to reproduce it. What I know is that it happens frequently when working with large workflows, adding, rearranging or removing nodes.

This can't be happing only to me. I found a reddit post about it but not much more: https://www.reddit.com/r/comfyui/comments/1huhriv/bug_related_to_undo/

### Steps to Reproduce

I don't know how. I know that it happens on large workflows with many custom nodes. IDK if it happens without them because WHY would I be working on a clean comfyui large workflow? Yes, I lied, I have not disable custom nodes.

This just happened when I was deleting and adding new nodes to the attached workflow

[Flux LoRA Block Weights Preset Tester.json](https://github.com/user-attachments/files/20620667/Flux.LoRA.Block.Weights.Preset.Tester.json)

### Debug Logs

```powershell
There is no message on the terminal about this
```

### Browser Logs

.

### Setting JSON

[comfy.settings.json](https://github.com/user-attachments/files/20620666/comfy.settings.json)

### What browsers do you use to access the UI ?

Microsoft Edge

### Other Information

_No response_

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-4087-Bug-ctrl-z-undo-returns-to-a-way-back-previous-state-20a6d73d3650813e81d7efce032ddd21) by [Unito](https://www.unito.io)

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.