Loading...

文章背景图

HunyuanImage-3.0 保姆级部署教程:腾讯 80B MoE 原生多模态图像生成模型,从环境搭建到 Gradio 界面

2026-11-09
1
- 字
- 分钟
|

HunyuanImage-3.0

[{"source":{"position":14,"lines":["

硬件门槛说明:80B MoE 模型即使是 13B 激活,也需要多卡。T2I 版最少 3 张 80GB(如 A100/H100 80GB),Instruct 版 8 张。这意味着普通个人用户(单卡 4090)基本跑不起来——本文更多是给有 GPU 集群的团队/研究机构看的。个人用户建议直接用腾讯混元官网的在线版(https://hunyuan.tencent.com/chat/)。

"]},"target":{"position":14,"lines":["

硬件门槛说明:80B MoE 模型即使是 13B 激活,也需要多卡。T2I 版最少 3 张 80GB(如 A100/H100 80GB),Instruct 版 8 张。这意味着普通个人用户(单卡 4090)基本跑不起来——本文更多是给有 GPU 集群的团队/研究机构看的。个人用户建议直接用腾讯混元官网的在线版(<a href="https://hunyuan.tencent.com/chat/)" target="_blank" rel="noopener">https://hunyuan.tencent.com/chat/)。

"]},"type":"CHANGE"},{"source":{"position":41,"lines":["https://github.com/Tencent-Hunyuan/HunyuanImage-3.0"]},"target":{"position":41,"lines":["<a href="https://github.com/Tencent-Hunyuan/HunyuanImage-3.0" target="_blank" rel="noopener">https://github.com/Tencent-Hunyuan/HunyuanImage-3.0"]},"type":"CHANGE"},{"source":{"position":45,"lines":["https://hunyuan.tencent.com/image"]},"target":{"position":45,"lines":["<a href="https://hunyuan.tencent.com/image" target="_blank" rel="noopener">https://hunyuan.tencent.com/image"]},"type":"CHANGE"},{"source":{"position":49,"lines":["https://huggingface.co/tencent/HunyuanImage-3.0"]},"target":{"position":49,"lines":["<a href="https://huggingface.co/tencent/HunyuanImage-3.0" target="_blank" rel="noopener">https://huggingface.co/tencent/HunyuanImage-3.0"]},"type":"CHANGE"},{"source":{"position":53,"lines":["https://huggingface.co/tencent/HunyuanImage-3.0-Instruct"]},"target":{"position":53,"lines":["<a href="https://huggingface.co/tencent/HunyuanImage-3.0-Instruct" target="_blank" rel="noopener">https://huggingface.co/tencent/HunyuanImage-3.0-Instruct"]},"type":"CHANGE"},{"source":{"position":57,"lines":["https://huggingface.co/tencent/HunyuanImage-3.0-Instruct-Distil"]},"target":{"position":57,"lines":["<a href="https://huggingface.co/tencent/HunyuanImage-3.0-Instruct-Distil" target="_blank" rel="noopener">https://huggingface.co/tencent/HunyuanImage-3.0-Instruct-Distil"]},"type":"CHANGE"},{"source":{"position":61,"lines":["https://arxiv.org/pdf/2509.23951"]},"target":{"position":61,"lines":["<a href="https://arxiv.org/pdf/2509.23951" target="_blank" rel="noopener">https://arxiv.org/pdf/2509.23951"]},"type":"CHANGE"},{"source":{"position":78,"lines":["

补充说明:普通个人用户能跑吗?T2I 版最少 3×80GB,普通单卡 4090(24GB)跑不起来。Instruct 版需要 8×80GB,更夸张。这不是给个人玩家的项目——它是给有 GPU 集群的团队/研究机构准备的。个人用户建议直接用腾讯混元官网的在线版(https://hunyuan.tencent.com/chat/HunyuanDefault?modelId=Hunyuan-Image-3.0-Instruct),免费试用。如果你只有单卡且想玩开源图像生成,推荐 FLUX.1-schnell 或 SDXL,它们对显存友好得多。

"]},"target":{"position":78,"lines":["

补充说明:普通个人用户能跑吗?T2I 版最少 3×80GB,普通单卡 4090(24GB)跑不起来。Instruct 版需要 8×80GB,更夸张。这不是给个人玩家的项目——它是给有 GPU 集群的团队/研究机构准备的。个人用户建议直接用腾讯混元官网的在线版(<a href="https://hunyuan.tencent.com/chat/HunyuanDefault?modelId=Hunyuan-Image-3.0-Instruct)" target="_blank" rel="noopener">https://hunyuan.tencent.com/chat/HunyuanDefault?modelId=Hunyuan-Image-3.0-Instruct),免费试用。如果你只有单卡且想玩开源图像生成,推荐 FLUX.1-schnell 或 SDXL,它们对显存友好得多。

"]},"type":"CHANGE"},{"source":{"position":289,"lines":["

第 11 步:使用官方 Prompt Handbook。官方提供了中文 Prompt Handbook(https://docs.qq.com/doc/DUVVadmhCdG9qRXBU),里面详细教你怎么写 prompt 才能出好图。写 prompt 时建议参考:主体+场景+光线+风格+质量词。

"]},"target":{"position":289,"lines":["

第 11 步:使用官方 Prompt Handbook。官方提供了中文 Prompt Handbook(<a href="https://docs.qq.com/doc/DUVVadmhCdG9qRXBU)" target="_blank" rel="noopener">https://docs.qq.com/doc/DUVVadmhCdG9qRXBU),里面详细教你怎么写 prompt 才能出好图。写 prompt 时建议参考:主体+场景+光线+风格+质量词。

"]},"type":"CHANGE"},{"source":{"position":434,"lines":["
  • GitHub 仓库:https://github.com/Tencent-Hunyuan/HunyuanImage-3.0
  • ","
  • 官网:https://hunyuan.tencent.com/image
  • ","
  • HuggingFace:https://huggingface.co/tencent/HunyuanImage-3.0
  • ","
  • 技术报告:https://arxiv.org/pdf/2509.23951
  • "]},"target":{"position":434,"lines":["
  • GitHub 仓库:<a href="https://github.com/Tencent-Hunyuan/HunyuanImage-3.0" target="_blank" rel="noopener">https://github.com/Tencent-Hunyuan/HunyuanImage-3.0
  • ","
  • 官网:<a href="https://hunyuan.tencent.com/image" target="_blank" rel="noopener">https://hunyuan.tencent.com/image
  • ","
  • HuggingFace:<a href="https://huggingface.co/tencent/HunyuanImage-3.0" target="_blank" rel="noopener">https://huggingface.co/tencent/HunyuanImage-3.0
  • ","
  • 技术报告:<a href="https://arxiv.org/pdf/2509.23951" target="_blank" rel="noopener">https://arxiv.org/pdf/2509.23951
  • "]},"type":"CHANGE"}]

    安装部署(实操步骤)

    1. 前置准备

    • 项目仓库:Tencent-Hunyuan/HunyuanImage-3.0(https://github.com/Tencent-Hunyuan/HunyuanImage-3.0)
    • 需要本机具备 Git;按项目语言准备对应运行时(Python / Node.js / Go / Java 等)
    • 建议先在本机或测试服务器上跑通,再部署到生产环境
    • 遇到依赖版本问题时,以仓库 README 与 Releases 说明为准

    2. 官方安装 / 启动命令(摘自项目 README,可直接复制执行)

    # 1. First install PyTorch (CUDA 12.8 Version)
    pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu128
    
    # 2. Install tencentcloud-sdk for Prompt Enhancement (PE) only for HunyuanImage-3.0 not HunyuanImage-3.0-Instruct
    pip install -i https://mirrors.tencent.com/pypi/simple/ --upgrade tencentcloud-sdk-python
    
    # 3. Then install other dependencies
    pip install -r requirements.txt
    # FlashInfer for optimized moe inference. v0.5.0 is tested.
    pip install flashinfer-python==0.5.0
    # Download from HuggingFace and rename the directory.
    # Notice that the directory name should not contain dots, which may cause issues when loading using Transformers.
    hf download tencent/HunyuanImage-3.0-Instruct --local-dir ./HunyuanImage-3-Instruct

    3. 部署流程

    1. 克隆仓库:git clone https://github.com/Tencent-Hunyuan/HunyuanImage-3.0
    2. 进入目录后按上面的官方命令安装依赖
    3. 参考 README 的配置说明填写配置文件或环境变量
    4. 按官方说明启动服务,确认监听端口与访问地址
    5. 浏览器访问验证功能,确认无报错后再开放外网

    4. 常见问题排查

    • 依赖安装失败:先升级包管理器,再确认运行时版本符合 README 要求
    • 启动报端口占用:修改配置中的端口或释放被占用端口
    • 页面打不开:检查防火墙 / 安全组是否放行对应端口
    • 功能异常:查看运行日志,对照 Issues 中同类问题处理

    5. 官方链接

    评论交流

    文章目录