Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load Florence 2 Model from extra path #482

Open
franckdsf opened this issue Jan 22, 2025 · 2 comments
Open

Load Florence 2 Model from extra path #482

franckdsf opened this issue Jan 22, 2025 · 2 comments

Comments

@franckdsf
Copy link

Hey,
Load Florence 2 Model doesn't work with the extra_paths from comfyUi. It looks like it's not picking the florence2 folder.

I verified that my extra_model_paths.yml works correctly, and it works perfectly, loading the upscale model from the extra path. But as for florence2, it's not recognized and keeps downloading the model.

built-in-volume:
    base_path: /comfy-models/
    upscale_models: models/upscale_models/
    florence2: models/florence2/

the error comes from the load_model function of florence2_ultra.py:

def load_model(version):
    florence_path = os.path.join(folder_paths.models_dir, "florence2")
    >>>> log(florence_path)
    >>>> log(version)
# 😺dzNodes: LayerStyle -> /ComfyUI/models/florence2
# 😺dzNodes: LayerStyle -> base-PromptGen-v2.0
# 😺dzNodes: LayerStyle -> Downloading Florence2 base-PromptGen-v2.0 model...

I tried adding the following line in the folder_paths.py from Comfy

folder_names_and_paths["florence2"] = ([os.path.join(models_dir, "florence2")], supported_pt_extensions)

But the folder is still not being picked up..

@franckdsf
Copy link
Author

Also,
Comfy seems to be correctly picking the folder because it logs the following line on load:

Adding extra search path florence2 /models/florence2/

@franckdsf
Copy link
Author

This repo seems to have implemented it sucessfully with the florence2 folder. I tried it and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant