comfyanonymous / ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
50.22k stars 5.29k forks source link

Update process is deleting the model folder if it is of type junction #4412

Open gontz opened 3 weeks ago

gontz commented 3 weeks ago

Your question

Situation: When I use the update_comfyui.bat or update_comfyui_and_python_dependencies.bat it always deletes the folder models if that folder is a junction folder (like a symlink for folders) As I like to keep all my models in folders outside the comfyui folder, can you do something about it? As in not to delete the folder during the update? Thank you

Logs

No response

Other

No response

comfyanonymous commented 3 weeks ago

Use the https://github.com/comfyanonymous/ComfyUI/blob/master/extra_model_paths.yaml.example config file instead of symlinks.

gontz commented 3 weeks ago

Yes, I do use the extra path file but there are always new models and models folders being constantly added therefore it is more efficient to have a folder outside comfyui and symlink it. And having multiple comfyui installations depending on the plugins used, it is more efficient a symlink folder than extra paths file

oliverban commented 3 weeks ago

Yes, I do use the extra path file but there are always new models and models folders being constantly added therefore it is more efficient to have a folder outside comfyui and symlink it. And having multiple comfyui installations depending on the plugins used, it is more efficient a symlink folder than extra paths file

It is not more efficient since it is the same thing. Just point to the parent folder where you put all your models and the subfolders will be loaded by the config accordingly.

gontz commented 3 weeks ago

A lot of plugins are creating folders inside models folder and downloading files in it. When I reinstall Comfy (quite often) I would need to go check what new files/folders have been added in the meantime. Your solution (pointing to a models folder in the extra paths file) would work only if the new files would be downloaded in the new path (the one from extra paths file). Which is not the case.

comfyanonymous commented 3 weeks ago

If you have git you can try: git stash pop in the ComfyUI directory after running the update. The updater pushes current changes into the stack it doesn't discard them.