gokayfem / ComfyUI_VLM_nodes

Custom ComfyUI nodes for Vision Language Models, Large Language Models, Image to Music, Text to Music, Consistent and Random Creative Prompt Generation
Apache License 2.0
297 stars 23 forks source link

Symlinks are breaking these nodes for me #55

Open ManOrMonster opened 3 months ago

ManOrMonster commented 3 months ago

I used to have these models (such as Joytagger) downloaded, but now this node is replacing them with symlinks that are pointing to a huggingface cache folder. I don't want to use the cache folder, or symlinks. Deleting the symlinks and putting the actual files back in the folders doesn't work, they get overwriten.

The symlinks have also broken these nodes for me. I now get errors like these:

OSError: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory C:\stable-diffusion\data\models\LLavacheckpoints\files_for_moondream2

ValueError: The provided filename C:\stable-diffusion\data\models\LLavacheckpoints\files_for__moondream/vision.pt does not exist

OSError: [WinError 448] The path cannot be traversed because it contains an untrusted mount point: 'C:\\stable-diffusion\\data\\models\\LLavacheckpoints\\files_for_joytagger\\model.safetensors'

I looked at your code and saw several files where one can set symlinks to "auto", True, or False. I edited the Joytagger one and set it to False, which fixed that node.

Do we need to edit these individual scripts to prevent this behavior? If so, adding a generated user-configured config file would be a good idea so that we don't have to edit scripts, which can get reverted when updating. And I think most people would choose to have all symlinks either on or off, so one place to change that makes sense.

gokayfem commented 3 months ago

old file system for this repo was messed up, i fixed it, but i kept it "auto" for old users that have caches in their huggingface cache folder. i will look into this and find a better way to do this. thanks for the feedback.