Qwen-image-edit在ComfyUI部署使用

背景

今天在做产品宣传图片、公司海报的时候,使用了Qwen-image-edit模型,它的生图,以及编辑能力确实很好用。就顺手把它部署到我的AI主机里面。

本文旨在ComfyUI中调用模型服务的功能学习。

  • 关键词:ComfyUI,Qwen image edit
  • 目的:模型调用,ComfyUI版本升级
  • 难度:低;

模型介绍

项目地址

github仓库:https://github.com/QwenLM/Qwen-Image

huggingface社区:https://huggingface.co/Qwen/Qwen-Image-Edit

modelscope魔搭社区:https://www.modelscope.cn/models/Qwen/Qwen-Image-Edit

技术报告

https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/Qwen_Image.pdf

免费试用

https://chat.qwen.ai/

阿里云百炼接入

https://help.aliyun.com/zh/model-studio/qwen-image-edit-guide

comfyui接入

https://docs.comfy.org/tutorials/image/qwen/qwen-image-edit

安装部署

油管视频

https://www.youtube.com/watch?v=TZIijn-tvoc&t=710s

B站视频

https://www.bilibili.com/video/BV16SeqzVEm2/

参照comfyui官方给的文章,现在我们来快速接入

升级comfy ui

https://docs.comfy.org/installation/update_comfyui#manual-installation

运行comfyui,查看打印

复制代码
Checkpoint files will always be loaded safely.
Total VRAM 32607 MB, total RAM 48273 MB
pytorch version: 2.9.0.dev20250810+cu128
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 5090 : cudaMallocAsync
Using pytorch attention
Python version: 3.12.11 | packaged by Anaconda, Inc. | (main, Jun  5 2025, 12:58:53) [MSC v.1929 64 bit (AMD64)]
ComfyUI version: 0.3.59

https://github.com/comfyanonymous/ComfyUI/releases/tag/v0.3.59的版本对的上,确实更新到最新release。

加载workflow json文件,运行ok。50~80秒跑完demo,需要占用20GB内存。

跑了几次,后续时间稳定在50s左右,效果有时候不好。针对demo图片的prompt 如下

Remove all UI text elements from the image. Keep the feeling that the characters and scene are in water. Also, remove the green UI elements at the bottom.

"移除图像中的所有界面文字元素。保留角色和场景处于水中的感觉。同时移除底部的绿色界面元素。"

比如这张,没有完全按照prompt去除上面的字体。

这一轮结果处理还是符合预期的。

最后,RTX5090显卡已经出了一些时间了,CUDA已经从12.8升级到12.9,到最新的13.0了。当前torch稳定版已经支持12.8和12.9了。13.0停留在dev版本。

https://pytorch.org/

CUDA12.8

CUDA 13.0

我快速pip uninstall 卸载了原来dev的库,并升级了下torch的三个库

复制代码
pip uninstall torch torchvision torchaudio
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128

Checkpoint files will always be loaded safely.
Total VRAM 32607 MB, total RAM 48273 MB
pytorch version: 2.8.0+cu128
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 5090 : cudaMallocAsync
Using pytorch attention
Python version: 3.12.11 | packaged by Anaconda, Inc. | (main, Jun  5 2025, 12:58:53) [MSC v.1929 64 bit (AMD64)]
ComfyUI version: 0.3.59
ComfyUI frontend version: 1.26.13
相关推荐
鲨莎分不晴1 分钟前
注意力的本质:信息加权而已
人工智能
万俟淋曦2 分钟前
【论文速递】2025年第52周(Dec-21-27)(Robotics/Embodied AI/LLM)
人工智能·深度学习·机器学习·机器人·大模型·论文·具身智能
专注数据的痴汉2 分钟前
「数据获取」吉林地理基础数据(道路、水系、四级行政边界、地级城市、DEM等)
大数据·人工智能·信息可视化
dagouaofei6 分钟前
AI 生成 2026 年工作计划 PPT,内容质量差异在哪里
人工智能·python·powerpoint
ai_top_trends7 分钟前
2026 年工作计划汇报 PPT:AI 生成方案实测对比
人工智能·python·powerpoint
JicasdC123asd9 分钟前
基于YOLO11-seg的MultiSEAMHead驾驶员疲劳检测系统_计算机视觉实时监测_眼睛嘴巴状态识别
人工智能·计算机视觉
极新10 分钟前
飞书产品营销&增长经理王屹煊:飞书多维表格驱动业务新增长|2025极新AIGC峰会演讲实录
人工智能
寻星探路11 分钟前
【Python 全栈测开之路】Python 基础语法精讲(三):函数、容器类型与文件处理
java·开发语言·c++·人工智能·python·ai·c#
且去填词11 分钟前
构建基于 DeepEval 的 LLM 自动化评估流水线
运维·人工智能·python·自动化·llm·deepseek·deepeval
dagouaofei14 分钟前
不同 AI 生成 2026 年工作计划 PPT 的使用门槛对比
人工智能·python·powerpoint