Closed paintbot closed 4 months ago
You don't need to run the python on it's own like that, with portable you just run this whole command in the ComfyUI_windows_portable
-folder
python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt
thank you for the help! I did that and also reinstalled the plugin via manager and getting this from the power shell: (1)
However i still get an error when running Florence in comfy: (2)
(1) PS C:\ComfyUI_windows_portable> python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt Requirement already satisfied: transformers>=4.39.0 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from -r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 1)) (4.42.4) Requirement already satisfied: matplotlib in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from -r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 2)) (3.9.1) Requirement already satisfied: timm in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from -r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 3)) (1.0.7) Requirement already satisfied: pillow>=10.2.0 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from -r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 4)) (10.4.0) Requirement already satisfied: filelock in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from transformers>=4.39.0->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 1)) (3.15.4) Requirement already satisfied: huggingface-hub<1.0,>=0.23.2 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from transformers>=4.39.0->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 1)) (0.23.4) Requirement already satisfied: numpy<2.0,>=1.17 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from transformers>=4.39.0->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 1)) (1.26.4) Requirement already satisfied: packaging>=20.0 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from transformers>=4.39.0->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 1)) (23.2) Requirement already satisfied: pyyaml>=5.1 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from transformers>=4.39.0->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 1)) (6.0.1) Requirement already satisfied: regex!=2019.12.17 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from transformers>=4.39.0->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 1)) (2024.5.15) Requirement already satisfied: requests in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from transformers>=4.39.0->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 1)) (2.32.3) Requirement already satisfied: safetensors>=0.4.1 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from transformers>=4.39.0->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 1)) (0.4.3) Requirement already satisfied: tokenizers<0.20,>=0.19 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from transformers>=4.39.0->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 1)) (0.19.1) Requirement already satisfied: tqdm>=4.27 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from transformers>=4.39.0->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 1)) (4.66.4) Requirement already satisfied: contourpy>=1.0.1 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 2)) (1.2.1) Requirement already satisfied: cycler>=0.10 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 2)) (0.12.1) Requirement already satisfied: fonttools>=4.22.0 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 2)) (4.53.1) Requirement already satisfied: kiwisolver>=1.3.1 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 2)) (1.4.5) Requirement already satisfied: pyparsing>=2.3.1 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 2)) (3.1.2) Requirement already satisfied: python-dateutil>=2.7 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 2)) (2.9.0.post0) Requirement already satisfied: torch in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from timm->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 3)) (2.3.1+cu121) Requirement already satisfied: torchvision in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from timm->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 3)) (0.18.1+cu121) Requirement already satisfied: fsspec>=2023.5.0 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from huggingface-hub<1.0,>=0.23.2->transformers>=4.39.0->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 1)) (2024.6.1) Requirement already satisfied: typing-extensions>=3.7.4.3 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from huggingface-hub<1.0,>=0.23.2->transformers>=4.39.0->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 1)) (4.12.2) Requirement already satisfied: six>=1.5 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from python-dateutil>=2.7->matplotlib->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 2)) (1.16.0) Requirement already satisfied: colorama in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from tqdm>=4.27->transformers>=4.39.0->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 1)) (0.4.6) Requirement already satisfied: charset-normalizer<4,>=2 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from requests->transformers>=4.39.0->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 1)) (3.3.2) Requirement already satisfied: idna<4,>=2.5 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from requests->transformers>=4.39.0->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 1)) (3.7) Requirement already satisfied: urllib3<3,>=1.21.1 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from requests->transformers>=4.39.0->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 1)) (1.26.19) Requirement already satisfied: certifi>=2017.4.17 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from requests->transformers>=4.39.0->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 1)) (2024.7.4) Requirement already satisfied: sympy in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from torch->timm->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 3)) (1.13.0) Requirement already satisfied: networkx in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from torch->timm->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 3)) (3.3) Requirement already satisfied: jinja2 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from torch->timm->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 3)) (3.1.4) Requirement already satisfied: mkl<=2021.4.0,>=2021.1.1 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from torch->timm->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 3)) (2021.4.0) Requirement already satisfied: intel-openmp==2021. in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from mkl<=2021.4.0,>=2021.1.1->torch->timm->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 3)) (2021.4.0) Requirement already satisfied: tbb==2021. in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from mkl<=2021.4.0,>=2021.1.1->torch->timm->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 3)) (2021.13.0) Requirement already satisfied: MarkupSafe>=2.0 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from jinja2->torch->timm->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 3)) (2.1.5) Requirement already satisfied: mpmath<1.4,>=1.1.0 in c:\comfyui_windows_portable\python_embeded\lib\site-packages (from sympy->torch->timm->-r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt (line 3)) (1.3.0) PS C:\ComfyUI_windows_portable>
this is the error from comfy
(2)
Error occurred when executing DownloadAndLoadFlorence2Model:
Error no file named pytorch_model.bin, model.safetensors, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory C:\ComfyUI_windows_portable\ComfyUI\models\LLM\Florence-2-base.
File "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI_windows_portable\ComfyUI\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 "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\transformers\models\auto\auto_factory.py", line 559, in from_pretrained return model_class.from_pretrained( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\transformers\modeling_utils.py", line 3382, in from_pretrained raise EnvironmentError(
Something must have gone wrong with the autodownload process, the files in that folder should be like this:
You can try deleting the "Florence-2-base" -folder and see if it works on next run, or try one of the other models.
It can also be manually downloaded from here, but it's bit of a hassle as there's many files and you need most of them:
Indeed there seems to be something strange with the download. I deleted the folder and redownloaded and the files seem to be there with the right sizes (screenshot). This is what comfyui says when i download:
After reinstalling and deleting everything a second time everything seems to work!
Im struggling to install the requirements from 'requirements.txt' in standalone.
I run python.exe in python python_embeded and than copy / paste this line write?
-m pip install -r ComfyUI\custom_nodes\ComfyUI-Florence2\requirements.txt
right? i always get an syntax error when id do so. I might be a noob but what am i doing wrong?