11cafe / comfyui-workspace-manager

A ComfyUI workflows and models management extension to organize and manage all your workflows, models in one place. Seamlessly switch between workflows, as well as import, export workflows, reuse subworkflows, install models, browse your models in a single workspace
MIT License
1.08k stars 51 forks source link

Is the workflow being overwritten and saved? #68

Open nefudev opened 9 months ago

nefudev commented 9 months ago

When I change a workflow saved by comfyui-workspace-manager without saving it and refresh the browser, it is saved. Is this a specification? I would like the workflow to be saved when the save button is pressed.

Environment comfy:2c4e92a98b8338f754855a0db7dce164945e366e this node:faec53571df6c91a6b7ad9813f208a0210d3a5c0 browser:Chrome/firefox

  1. Create a workflow, save it, and execute it. In this example, a LoadImage and a Preview are placed and named "img_A". img_001

  2. Modify the "img_A" workflow saved above without saving it.  Here, we have replaced the loaded image and added a Preview. img_002

  3. Restart the browser or restart ComfyUI and select "img_A" to see the modified workflow. Saved img_A can no longer be displayed. img_003

Weixuanf commented 9 months ago

Hi yes right now it is auto saving your workflow, this is to avoid accidentally losing your unsaved changes, (for example, you accidentally refreshed your page or close your page without pressing saving can cause losing your valuable changes)

You can easily discard the unsaved changes and revert to your last saved status by pressing "Discard unsaved changes":

Screenshot 2024-01-03 at 7 35 45 PM

I chose this strategy on purpose because this not only avoids losing any changes accidentally but also lets you go back to your last manually saved version easily. So you have the best of two worlds. You also gets a automatic version history too! Everytime you press save, it logs a new version in the history so you can easily revert back to any history versions you have!

Please let me know if you think there's a better way to do this! Your feedbacks and suggestions are very welcomed and valued!

nefudev commented 9 months ago

Thank you for your answer.

I was not aware of the auto-save and "Discard unsaved changes" features. I checked the "Discard unsaved changes" feature and sometimes it works and sometimes it doesn't...

I think the auto-save and "Discard unsaved changes" are very useful for experimental workflows.However, I personally want to create a template workflow for each function and do not want to make any changes in the first place. Therefore, I would like the ability to lock the workflow to read-only.

For example, if I select a locked workflow, it will create a new workflow with that workflow.

Weixuanf commented 9 months ago

Ok I see, i think what you want is a "Lock" button to lock a certain workflow once locked it cannot be modified until unlocked. I've noted this and will see if i can implement when have time

I checked the "Discard unsaved changes" feature and sometimes it works and sometimes it doesn't...

when it doesn't work, try the "Version history" option on a workflow, it will list all the "snapshot json" everytime you pressed save on this workflow. you can easily go back to any version you like by pressing it. so you will never lose any versions or changes.

Screenshot 2023-12-29 at 11 17 37 PM
nefudev commented 9 months ago

Thank you! Looking forward to it. I checked the functionality in the version history!

gisu commented 9 months ago

Please Remove Auto Save by Default. I have quite a few problems with this, workflow files with .json.json.json.json. Furthermore, I call workflows in the manager and often get a different workflow. This is probably because I have ComfyUI running on multiple tabs, which messes up the manager. Therefore it would be nice if I could switch on or off Auto Save in the settings.

Weixuanf commented 9 months ago

Please Remove Auto Save by Default. I have quite a few problems with this, workflow files with .json.json.json.json. Furthermore, I call workflows in the manager and often get a different workflow. This is probably because I have ComfyUI running on multiple tabs, which messes up the manager. Therefore it would be nice if I could switch on or off Auto Save in the settings.

Yes! We are working on disabling workflow auto save completely and enabling multi tab browsing! right now the multiple browser tab experience is not good, i just shipped a small update to make multi tab experience better, avoiding workflows accidentally overwrite wrong flow when you have multiple browser tabs open. You can update extension to see this update

next we will improve multi browser experience even better by allowing you to open in new tab in files list which will open it with workflow id routes

stay tuned! Will update here when launched

Weixuanf commented 9 months ago

Hi auto save now is completely disabled, you will not have your workflow overwritten unintentionally anymore.

https://github.com/11cafe/comfyui-workspace-manager/pull/99

upgrade to latest version to use this feature

pvp-by commented 7 months ago

https://github.com/11cafe/comfyui-workspace-manager/commit/51084bb0389f22c538cd301ae114903fb768aa92 The version of the extension is up to date at the time of my post. I attach the settings I have (they are default, I have not changed anything): image

but if I refresh the page, I see a warning about unsaved, (I don't click yes/no) the page reloads and I get the default workflow (which is load default) no undo version in the list, but my workflow is overwritten.

If it helps you, the comfyUI server is on a neighboring computer relative to the browser tab where I am. time 22-49 (~8 min change last data - deleted) image