chflame163 / ComfyUI_LayerStyle

A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.
MIT License
676 stars 33 forks source link

关于自动下载或离线使用VITMatte失败 #87

Closed T1987125630 closed 1 month ago

T1987125630 commented 2 months ago

运行SegmentAnythingUltra V2或者其他V2版本的VITMatte时报错:

Error occurred when executing LayerMask: SegmentAnythingUltra V2: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like hustvl/vitmatte-small-composition-1k is not the path to a directory containing a file named config.json. Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.

我的网络实际上没有问题,单独使用PY运行如下程序,是可以正常下载模型的,但是无论是否事先下载,插件都提示上述报错,请协助解决,谢谢。

用环境PY解析如下段落可以成功下载 from transformers import VitMatteImageProcessor, VitMatteForImageMatting processor = VitMatteImageProcessor.from_pretrained("hustvl/vitmatte-small-composition-1k") model = VitMatteForImageMatting.from_pretrained("hustvl/vitmatte-small-composition-1k")

chflame163 commented 2 months ago

https://www.bilibili.com/video/BV1EZ421J751

T1987125630 commented 1 month ago

谢谢大佬,视频启发一下想明白了,秋叶整合包的缓存地址不是通用环境的地址,而是在整合包目录下的.CACHE下,放到这个文件下面问题就解决了~