kijai / ComfyUI-Florence2

Inference Microsoft Florence2 VLM
MIT License
280 stars 15 forks source link

Error occurred when executing DownloadAndLoadFlorence2Model: #22

Open yonghao5 opened 4 days ago

yonghao5 commented 4 days ago

Error occurred when executing DownloadAndLoadFlorence2Model:

Failed to import transformers.models.cohere.configuration_cohere because of the following error (look up to see its traceback): No module named 'transformers.models.cohere.configuration_cohere'

File "D:\ComfyUI-aki\ComfyUI-aki-v1.3\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "D:\ComfyUI-aki\ComfyUI-aki-v1.3\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "D:\ComfyUI-aki\ComfyUI-aki-v1.3\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "D:\ComfyUI-aki\ComfyUI-aki-v1.3\custom_nodes\ComfyUI-Florence2\nodes.py", line 85, in loadmodel model = AutoModelForCausalLM.from_pretrained(model_path, attn_implementation=attention, device_map=device, torch_dtype=dtype,trust_remote_code=True) File "D:\ComfyUI-aki\ComfyUI-aki-v1.3\python\lib\site-packages\transformers\models\auto\auto_factory.py", line 540, in from_pretrained trust_remote_code, pretrained_model_name_or_path, has_local_code, has_remote_code File "D:\ComfyUI-aki\ComfyUI-aki-v1.3\python\lib\site-packages\transformers\models\auto\auto_factory.py", line 751, in keys for key, name in self._config_mapping.items() File "D:\ComfyUI-aki\ComfyUI-aki-v1.3\python\lib\site-packages\transformers\models\auto\auto_factory.py", line 752, in if key in self._model_mapping.keys() File "D:\ComfyUI-aki\ComfyUI-aki-v1.3\python\lib\site-packages\transformers\models\auto\auto_factory.py", line 748, in _load_attr_from_module def keys(self): File "D:\ComfyUI-aki\ComfyUI-aki-v1.3\python\lib\site-packages\transformers\models\auto\auto_factory.py", line 692, in getattribute_from_module

Some of the mappings have entries model_type -> object of another model type. In that case we try to grab the

File "D:\ComfyUI-aki\ComfyUI-aki-v1.3\python\lib\site-packages\transformers\utils\import_utils.py", line 1525, in getattr File "D:\ComfyUI-aki\ComfyUI-aki-v1.3\python\lib\site-packages\transformers\utils\import_utils.py", line 1537, in _get_module

kijai commented 3 days ago

Probably need up update transformers.