accelerate>=1.3.0 # flash_attn~=2.8 # If you want to use flash_attention_v2 see install process in https://github.com/Dao-AILab/flash-attention?tab=readme-ov-file#installation-and-features backoff>=2.2.1 peft>=0.13.2



Custom ComfyUI nodes to run Microsoft’s Phi models. Supported versions:
Models have been forked to correct various issues that were not addressed in the original repositories
Download the model files from the link above and place them in their corresponding folders like this:
.\ComfyUI\models\microsoft\Phi-3.5-mini-instruct\.\ComfyUI\models\microsoft\Phi-3.5-vision-instruct\.\ComfyUI\models\microsoft\Phi-4-multimodal-instruct\You can download the files with the followng commands:
# Got to Microsoft models folder
cd .\ComfyUI\models\microsoft
git clone https://huggingface.co/microsoft/Phi-3.5-mini-instruct
git clone https://huggingface.co/microsoft/Phi-3.5-vision-instruct
git clone https://huggingface.co/microsoft/Phi-4-multimodal-instruct
Go to the ComfyUI folder .\ComfyUI\custom_nodes, clone this repository and install Python dependencies:
# Clone repo
git clone https://github.com/alexisrolland/ComfyUI-Phi.git
# Install dependencies
..\..\python_embeded\python.exe -s -m pip install -r .\ComfyUI-Phi\requirements.txt
# For Windows users download Flash Attention wheel for Python 3.12
https://huggingface.co/lldacing/flash-attention-windows-wheel/resolve/main/flash_attn-2.7.4%2Bcu126torch2.6.0cxx11abiFALSE-cp312-cp312-win_amd64.whl
# Install Flash Attention
..\..\python_embeded\python.exe -s -m pip install flash_attn-2.7.4%2Bcu126torch2.6.0cxx11abiFALSE-cp312-cp312-win_amd64.whl
# And install Triton for Windows
..\..\python_embeded\python.exe -s -m pip install triton-windows
4.1.0: Add dtype and attention widgets in LoadPhiVision node.4.0.3: Update dependencies to remove pinned version of transformers in requirements.txt and add triton-windows installation step in the README.4.0.2: Add support for loading model via extra_model_paths.yaml.4.0.0: Add support for Phi-4-multimodal-instruct.3.0.0: Enforce manual download of model files for cleaner file organization.2.0.0: This major version introduces new inputs to provide a pair of image and response examples to the node Run Phi Vision.Drag and drop the image in ComfyUI to reload the workflow.