ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

[feature request] undo-redo

Open PladsElsker opened this issue 2 years ago • 4 comments

I would like to be able to accidentally delete 40 nodes, and hit "ctrl-z" to bring them back with the correct states. An action manager would be quite nice, although I understand this feature can be annoying to implement in an already existing software.

PladsElsker avatar Mar 16 '23 14:03 PladsElsker

Undo/Redo would be a nice addition to the UI! :)

paulo-coronado avatar Mar 17 '23 14:03 paulo-coronado

I keep banging my head everytime I do something and "OH right, there's no ctrl+z"

Natotela avatar Apr 16 '23 10:04 Natotela

https://gist.github.com/bmad4ever/9b35f6857ff9d1be3d79549c839356be

This is not an action manager, and is somewhat dirty and untested, but should help.

bmad4ever avatar Jun 06 '23 22:06 bmad4ever

Just finished implementing a significantly more robust solution as an extension: https://github.com/bmad4ever/ComfyUI-Bmad-DirtyUndoRedo

bmad4ever avatar Jun 16 '23 01:06 bmad4ever

Ummm... bump?

I consider such functionality essential. Even though, yeah, it's a real pain in the... (somwhere) to implement.

Lex-DRL avatar Jul 29 '23 15:07 Lex-DRL

https://github.com/comfyanonymous/ComfyUI/pull/2080

comfyanonymous avatar Dec 08 '23 19:12 comfyanonymous

Shouldn't we wait for the PR to be merged before closing this?

PladsElsker avatar Dec 09 '23 20:12 PladsElsker

It's already merged, isn't it? Works for me, with Bmad's custom node removed (which you should do).

However, same as Bmad's implementation, the one in the core resets all the previews on undo. While under the hood all the nodes stay marked as calculated. So each time you ctrl+Z, you also have to change something at the very start of your graph and re-calculate everything. It makes you fear of ctrl+z, especially when your image is generated at stages.

Lex-DRL avatar Dec 09 '23 20:12 Lex-DRL

Hmm not sure why I thought it was not merged, I probably got confused with another PR.

PladsElsker avatar Dec 09 '23 21:12 PladsElsker

Ah it's arnon-1's PR that's not merged. It implements ctrl+z as well.

PladsElsker avatar Dec 09 '23 21:12 PladsElsker

NOOO, I got rejected! XD

arnon-1 avatar Dec 17 '23 15:12 arnon-1