ComfyUI-Phi

ComfyUI-Phi
★ 9

模型推理多模态Microsoft PhiComfyUI 插件
为ComfyUI提供自定义节点,便捷加载并在界面内运行Microsoft Phi系列文本与多模态模型,简化模型推理与集成调试。
💡 在ComfyUI中加载并运行Microsoft Phi系列模型进行推理
🍴 6 Forks💻 Python🔄 2025-09-22
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/e98a62d17551
📦 requirements.txt
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
Example Phi Multimodal
Example Phi Vision
Example Phi
📄 README

ComfyUI Phi

Custom ComfyUI nodes to run Microsoft’s Phi models. Supported versions:

  • Lexius/Phi-3.5-mini-instruct
  • Lexius/Phi-3.5-vision-instruct
  • Lexius/Phi-4-multimodal-instruct
  • Models have been forked to correct various issues that were not addressed in the original repositories

    Getting started

    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

    Updates

  • 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.
  • Examples

    Drag and drop the image in ComfyUI to reload the workflow.

    Example Phi Multimodal

    Example Phi Vision

    Example Phi