Code Monkey home page Code Monkey logo

Comments (11)

gokayfem avatar gokayfem commented on May 28, 2024 1

all i need to check is if the folder is empty or not, otherwise it should use the ````files_for_...``` for each folder. i will do it soon.

from comfyui_vlm_nodes.

gokayfem avatar gokayfem commented on May 28, 2024

well, it should not do that, did you check the inside the folder? are files there?

from comfyui_vlm_nodes.

nomadoor avatar nomadoor commented on May 28, 2024

image
It seems that the files are properly in the specified folder. Of course, it’s an SSD.

It might not be related, but when I ran the program with the PC disconnected from the internet, the following error occurred.

Error occurred when executing Joytag:

[Errno 2] No such file or directory: 'C:\\Users\\---\\.cache\\huggingface\\hub\\models--fancyfeast--joytag\\snapshots\\6b7f16331a6ccf0fdce37d5a9564715f6e772b22\\config.json'

from comfyui_vlm_nodes.

gokayfem avatar gokayfem commented on May 28, 2024

can you change the local_files_only=True in the snapshot_download function inside nodes/joytag.py

from comfyui_vlm_nodes.

nomadoor avatar nomadoor commented on May 28, 2024

I tried it right away, but despite being connected to the internet, I started getting the same error as when the internet connection was cut off.

Error occurred when executing Joytag:

[Errno 2] No such file or directory: 'C:\\Users\\---\\.cache\\huggingface\\hub\\models--fancyfeast--joytag\\snapshots\\6b7f16331a6ccf0fdce37d5a9564715f6e772b22\\config.json'

from comfyui_vlm_nodes.

gokayfem avatar gokayfem commented on May 28, 2024

can you change this

def download_joytag():
    # Ensure the correct behavior based on the existence of the local directory
    print(f"Target directory for download: {files_for_joytagger}")
    
    # Call snapshot_download with specified parameters
    path = snapshot_download(
        "fancyfeast/joytag",  # Example repo_id
        local_dir=files_for_joytagger,
        force_download=False,  # Set to True if you always want to download, regardless of local copy
        local_files_only=False,  # Set to False to allow downloading if not available locally
        local_dir_use_symlinks="auto"  # or set to True/False based on your symlink preference
    )
    print(f"Model path: {path}")
    return path
def download_joytag():
   # Ensure the correct behavior based on the existence of the local directory
   print(f"Target directory for download: {files_for_joytagger}")
   
   # Call snapshot_download with specified parameters
   path = files_for_joytagger
   print(f"Model path: {path}")
   return path

to this

from comfyui_vlm_nodes.

nomadoor avatar nomadoor commented on May 28, 2024

image
It works perfectly! The speed is fantastic.

from comfyui_vlm_nodes.

gokayfem avatar gokayfem commented on May 28, 2024

nice! if you are sure about you downloaded all of the files. you can change any snapshot_download function with files_for_... in any node that has this.

from comfyui_vlm_nodes.

nomadoor avatar nomadoor commented on May 28, 2024

Thank you so much!
However, I’m not very familiar with how git works. Will this code be overwritten in future updates?

I feel like we could avoid such issues by checking if files_for_joytagger exists before executing snapshot_download. What do you think?

from comfyui_vlm_nodes.

gokayfem avatar gokayfem commented on May 28, 2024

yes it could be done, i have tried it messed it up but i will make it work soon.

from comfyui_vlm_nodes.

nomadoor avatar nomadoor commented on May 28, 2024

There’s also a high possibility that the snapshot issue is being caused by my environment, so I’ll report back if I find out anything.
Thank you😄

from comfyui_vlm_nodes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.