Nodes Browser

ComfyDeploy: How ComfyUI-Qwen-2 works in ComfyUI?

What is ComfyUI-Qwen-2?

Using Qwen-2 in ComfyUI

How to install it in ComfyDeploy?

Head over to the machine page

  1. Click on the "Create a new machine" button
  2. Select the Edit build steps
  3. Add a new step -> Custom Node
  4. Search for ComfyUI-Qwen-2 and select it
  5. Close the build step dialig and then click on the "Save" button to rebuild the machine

qwen2

<h1 align="center">Qwen-2 in ComfyUI</h1>

screenshot-20240612-002830

项目介绍 | Info

  • Qwen2 模型引入到 ComfyUI 中,目前支持 Qwen2-7B-Instruct 和 Qwen2-72B-Instruct 双模型,速度快且性能强,中文表现很不错,可用于 生成/补全提示词 或畅聊人生!

  • 版本:V1.0 支持系统提示词,支持单/多轮对话双模式,支持中文输入自动并输出英文提示词

详细说明 | Features

  • 节点:

    • ⛱️Qwen2 ModelLoader:会自动下载模型(请保持网络畅通),Qwen2-7B-Instruct 约 16G(所需 VRAM > 12GB),Qwen2-72B-Instruct 约 160G(所需 VRAM > 24GB)

    • ⛱️Qwen2:支持系统指令设置(System Instruction)

    • ⛱️Qwen2 Chat:支持系统指令设置(System Instruction)+ 多轮对话

  • 节点示例:

screenshot-20240611-235613

  • 上下文多轮对话:

screenshot-20240611-234410

参数说明 | Parameters

  • model:接入模型
  • tokenizer:分词器
  • prompt:提示词
  • system_instruction:系统指令

安装 | Install

  • 环境依赖要求:transformers>=4.40.0,手动升级:pip uninstall -y transformers && pip install git+https://github.com/huggingface/transformers

  • 推荐使用管理器 ComfyUI Manager 安装(ON THE WAY)

  • 手动安装:

    1. cd custom_nodes
    2. git clone https://github.com/ZHO-ZHO-ZHO/ComfyUI-Qwen-2.git
    3. cd custom_nodes/ComfyUI-Qwen-2
    4. pip install -r requirements.txt
    5. 重启 ComfyUI
  • 输出节点可配合像ComfyUI-Gemini中 ✨DisplayText_Zho 一样的任何接受文本的节点

工作流 | Workflow

V1.0 工作流

Qwen2 + CosXL【Zho】

screenshot-20240612-000459

Qwen2 Chat【Zho】

screenshot-20240612-003348

更新日志 | Changelog

20240611

  • V1.0: 支持系统提示词,支持单/多轮对话双模式,支持中文输入自动并输出英文提示词

  • 创建项目

Stars

Star History Chart

关于我 | About me

📬 联系我

  • 邮箱:zhozho3965@gmail.com
  • QQ 群:839821928

🔗 社交媒体

💡 支持我

Credits

Qwen2