ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

My workflow got overwritten by another one when computer shutted down.

Open LightweightAR opened this issue 1 year ago • 5 comments

Your question

I'm working on a big workflow since a month. We're talking about 200+ hours of work. Silly me, I didn't do any backups.

I'm working on a remote pc (Shadow pc), and it's very often that I leave comfy open and the Shadow computers turns off by itself (without me actually shutting down comfy before). Files are generally saved as usual so nothing to worry about.

But today, I was working earlier on my main workflow, and I had another one opened in a second tab. My computer turned off as usual. And when I turned it on tonight, launched Comfy, opened my main workflow, it was... The other workflow. the one is the other tab. And when I open the file for the other workflow, it's also the other workflow.

I've spent hours looking at the files, duplicating them, trying to find previous versions, ctrl+z in the editor, but.. nothing seems to fix it.

I'm really desperate about this especially because it's associated to a big freelance work that I'm already late for. I can't possibly start from scratch, even if i would be faster re-making it.

Any idea on how I could recover it? I'm also super worried doing what I did to try recovering it made it even worse (like re-starting the computer could have cleared the cache even worse I don't know..!)

Logs

No response

Other

No response

LightweightAR avatar Sep 28 '24 19:09 LightweightAR

Didn't you save any test images, while you're creating the workflow ?

The workflow is stored in the PNG image.

JorgeR81 avatar Sep 28 '24 20:09 JorgeR81

Hi Jorge thanks for your answer. I've had someone mentioning this in the reddit post I did about this issue and actually, I did suppress all the images today to clean up the client's Comfy installation. But someone else mentioned that some softwares could recover these images especially since i deleted those today. I'm crossing fingers!

LightweightAR avatar Sep 28 '24 20:09 LightweightAR

Yes, I think the files are not actually "deleted" from the hard drive. They are hidden, and the OS is allowed to overwrite them, when other files are saved. If they were not overwritten yet, you may be able to recover them.


By the way, if you used the Save image node instead of Preview Image , a copy of the images you created will be saved in your "output" folder ( inside the "ComfyUI" folder )

img


About Comfy UI, when you start it, the last workflow you worked on will be recovered.  But this is simply for user convenience.  The workflow is not really "saved", unless you:

  • use the "save as" option in the GUI ( the saved workflows will be listed in the sidebar )
  • export the workflow as a JSON file
  • save a PNG image created with the workflow   

wf1

JorgeR81 avatar Sep 28 '24 21:09 JorgeR81

Even if you open multiple tabs, ComfyUI's workflow data is shared, so you should not use it in that way. It is risky.

ltdrdata avatar Sep 29 '24 08:09 ltdrdata

Just wanted to chime in on this issue and say I've run into the same problem before on multiple occasions. I created a backup system for my workflows just due to frustration from having my workflows overwritten. There should be a way to set up file saving to prevent multiple tabs from causing this problem since I previously used https://github.com/11cafe/comfyui-workspace-manager to manage saving and opening workflows, and never had this problem even with many tabs open. As of recently that repo went into maintence mode since comfyui is now handling workspace management natively.

akatz-ai avatar Oct 02 '24 22:10 akatz-ai

Had a similar issue due to how on startup Comfy mixes up which workflow to load and which file to display, presumably picking the last one saved for the name while displaying the last one queued, which can easily lead to accidentally overwriting another workflow. Just as @akatz-ai mentioned, I made a backup system, too. Using a batch file to duplicate my workflows folder to have a safety net just in case.

I would welcome a setting for the startup workflow to load the default one or simply nothing, as well as having the full name be displayable by extending the dropdown menu's text box at the top as there is a lot of space and longer names with version differences might look the same when cropped.

PrometheusDante avatar Oct 05 '24 12:10 PrometheusDante

This issue is being marked stale because it has not had any activity for 30 days. Reply below within 7 days if your issue still isn't solved, and it will be left open. Otherwise, the issue will be closed automatically.

github-actions[bot] avatar Nov 05 '24 11:11 github-actions[bot]

This is should be addressed in front repo. https://github.com/Comfy-Org/ComfyUI_frontend

ltdrdata avatar Nov 07 '24 09:11 ltdrdata