Skip to content

Instantly share code, notes, and snippets.

@orangedeng
Last active September 4, 2026 08:29
Show Gist options
  • Select an option

  • Save orangedeng/0a90df909e47d39904329821da86fb2e to your computer and use it in GitHub Desktop.

Select an option

Save orangedeng/0a90df909e47d39904329821da86fb2e to your computer and use it in GitHub Desktop.
使用 GPUStack 部署 MiniMax-H3 并对接 ComfyUI 的例子

前期准备

硬件与操作系统:

  • 设备型号 Atlas 800T A2 (910B2 x 8)
  • 操作系统 Euler 系列 22.10 LTS

软件:

  • GPUStack v2.2.3
  • vLLM-Omni 在 Ascend 平台的 runner,按照 vllm recipes 的推荐,使用 quay.io/ascend/vllm-omni:minimax-h3
  • ComfyUI >= 0.34.0 - 本例子使用的是 ComfyUI Desktop
  • 使用vllm-omni官方的 ComfyUI插件 ComfyUI-vLLM-Omni
  • 模型使用 modelscope 上的 MiniMax/MiniMax-H3,请提前将模型文件放入 GPUStack worker 容器挂载的主机路径,使得worker容器能读取到模型数据
    • 本例子中已经将模型文件放入主机挂载的缓存路径中 -v /data/models:/var/lib/gpustack/cache,容器内模型路径为 /var/lib/gpustack/cache/model_scope/MiniMax/MiniMax-H3

在 GPUStack 上部署 MiniMax-H3

创建自定义后端

在「推理后端」页面中,对 vLLM 进行编辑,切换到 「YAML模式」,把下面的配置复制到输入框进行保存:

version_configs:
  ascend-h3-custom:
    image_name: quay.io/ascend/vllm-omni:minimax-h3
    run_command: ''
    entrypoint: ''
    custom_framework: cann
    env: {}

创建模型部署

在「部署」页面,通过「本地路径」部署模型:

  • 输入「名称」: minimax-h3

  • 输入「模型路径」: /var/lib/gpustack/cache/model_scope/MiniMax/MiniMax-H3/FL2VA

  • 选择 vLLM 作为「后端」,并选择「后端版本」ascend-h3-custom

  • 展开「调度」区域,选择「调度方式」为 手动,并选择主机上所有的GPU

  • 展开「高级」区域,添加以下后端参数:

     --num-gpus=8 \
     --usp=1 \
     --ring=1 \
     --vae-patch-parallel-size=8 \
     --vae-parallel-mode=tile \
     --vae-use-tiling \
     --omni \
     --tensor-parallel-size 8 \
     --enable-layerwise-offload \
     --trust-remote-code \
     --text-encoder-tp-size 8
  • 添加以下「环境变量」

    VLLM_WORKER_MULTIPROC_METHOD=spawn
    VLLM_OMNI_VIDEO_SYNC_TIMEOUT=1800
  • 启用「通用代理」

无视告警,点击「仍然提交」,部署模型,并等待部署完成

修改 MiniMax-H3 路由访问配置

由于 ComfyUI-vLLM-Omni 插件中对限制的声明,需要将路由设置为公开访问,才能在ComfyUI上使用该插件对接 H3。

  • 进入「路由」,对 minimax-h3 这个路径进行「访问设置」,修改为「公开」
  • minimax-h3 路由查看「API 接入信息」,记录「接入地址」,如 http://localhost:20080/model/proxy/1/<YOUR_API_PATH>

配置 ComfyUI 对接 MiniMax-H3

安装插件

引用该指引 https://github.com/vllm-project/vllm-omni/blob/main/apps/ComfyUI-vLLM-Omni/README.md 的步骤

安装前,需要确认 ComfyUI 的 custom_nodes 路径在哪里,本例子使用 ComfyUI-Desktop,其默认安装时,custom_nodes 路径为:~/ComfyUI-Installs/ComfyUI/ComfyUI/custom_nodes

  • 将 vllm-omni 克隆到本地 git clone --depth 1 https://github.com/vllm-project/vllm-omni /tmp/vllm-omni
  • 将插件复制到 custom_nodes cp -r /tmp/vllm-omni/apps/ComfyUI-vLLM-Omni ~/ComfyUI-Installs/ComfyUI/ComfyUI/custom_nodes/

启动 ComfyUI 并使用插件

安装插件后,如果ComfyUI正在运行,则需要重启加载插件。

  • 新建一个工作流
  • 在「节点库」(侧边栏)中找到 vLLM-Omni 分类,添加以下节点:
    • Generate Video - 主生成节点
    • Diffusion Sampling Params(可选) - 控制生成质量/速度
    • Save Video - 输出生成结果
  • 配置 Generate Video 节点:
    • url: 前面记录的「接入地址」,如 http://localhost:20080/model/proxy/1/v1
    • model: minimax-h3
    • prompt: 文本描述,如 A cat playing with yarn
    • width: 768
    • height: 512
    • fps: 24
    • num_frames: 121(24fps 下约 5 秒)
  • 连接节点:将 Generate Video 的输出连接到 Save Video 的输入
  • 点击「Queue Prompt」开始生成
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment