Shakker-Labs / ComfyUI-IPAdapter-Flux

Apache License 2.0
169 stars 6 forks source link

google/siglip-so400m-patch14-384 #4

Open zhaoqi571436204 opened 1 week ago

zhaoqi571436204 commented 1 week ago

ComfyUI Error Report

Error Details

tanggogogo123 commented 6 days ago

same Error,Have you solved this problem?

zhaoqi571436204 commented 6 days ago

同样的错误,你解决这个问题了吗?

Nope.

ericxl277 commented 6 days ago

I'm also having the same problem, the model file is actually in the clip vision directory, but it still says it can't be found. By modifying the ipadapter_flux.py line 111 of this file, you can replace the model path with your own. but there are still other errors(issue 10), and the workflow still doesn't work.

AaronPanXiaoFeng commented 6 days ago

Modify "clip_vision" key in ipadapter_flux.py line 112 works, e.g., POPO-20241123-152453

ericxl277 commented 6 days ago

I'm also having the same problem, the model file is actually in the clip vision directory, but it still says it can't be found. By modifying the ipadapter_flux.py line 111 of this file, you can replace the model path with your own. but there are still other errors(issue 10), and the workflow still doesn't work.

line 112, made a mistake

zhaoqi571436204 commented 6 days ago

修改 ipadapter_flux.py 行 112 中的 “clip_vision” 键,例如: POPO-20241123-152453

How does that work?

AaronPanXiaoFeng commented 6 days ago

修改 ipadapter_flux.py 行 112 中的 “clip_vision” 键,例如: POPO-20241123-152453

How does that work?

add your path of "google/siglip-so400m-patch14-384" to "clip_vision" key in ipadapter_flux.py line 112, and switch to it in your workflow, POPO-20241123-175207

philipy1219 commented 6 days ago

This module reads the Hugging Face cache directory's path, not the clip_vision folder. The clip_vision folder in the original ComfyUI directory does not contain folders for Hugging Face Transformers but rather a single file. If you have an additional Hugging Face cache directory, you can modify the Hugging Face cache directory configuration. The specific method is as follows:


How to Modify the Hugging Face Cache Directory via Environment Variables and Global Configuration:

1. Setting the Environment Variable

You can set the HF_HOME environment variable to specify a new cache directory.

For Linux/Mac, run the following command in the terminal:

export HF_HOME=/path/to/your/cache

For Windows, use the following command:

set HF_HOME=C:\path\to\your\cache

2. Modifying the Global Configuration File

Hugging Face uses a global configuration file to manage settings such as the cache directory:

  1. Open or create the global configuration file at the following paths:

    • Linux/Mac: ~/.cache/huggingface/hub/config.json
    • Windows: %USERPROFILE%\.cache\huggingface\hub\config.json
  2. Add or update the following entry:

{
    "cache_dir": "/path/to/your/cache"
}

这个module读取的是huggingface缓存目录的地址,而不是clip_vision文件夹,comfyui原始目录的clip_vision文件夹内放置的不是供huggingface transformers访问的文件夹而是单个文件。如果您有一个额外的huggingface缓存目录,可以修改 Hugging Face 的缓存目录配置。具体方法如下:


如何通过环境变量和全局配置文件修改 Hugging Face 缓存目录:

1. 设置环境变量

您可以通过设置 HF_HOME 环境变量来指定新的缓存目录。

对于 Linux/Mac,在终端中运行以下命令:

export HF_HOME=/path/to/your/cache

对于 Windows,使用以下命令:

set HF_HOME=C:\path\to\your\cache

2. 修改全局配置文件

Hugging Face 使用全局配置文件来管理缓存目录等设置:

  1. 打开或创建全局配置文件,路径如下:

    • Linux/Mac: ~/.cache/huggingface/hub/config.json
    • Windows: %USERPROFILE%\.cache\huggingface\hub\config.json
  2. 添加或更新以下内容:

{
    "cache_dir": "/path/to/your/cache"
}
Amazon90 commented 5 days ago

修改 ipadapter_flux.py 行 112 中的 “clip_vision” 键,例如: POPO-20241123-152453

How does that work?

add your path of "google/siglip-so400m-patch14-384" to "clip_vision" key in ipadapter_flux.py line 112, and switch to it in your workflow, POPO-20241123-175207

1 This doesn't work for me, how should I modify it? https://github.com/Shakker-Labs/ComfyUI-IPAdapter-Flux/issues/15