m0_74196153/Qwen-Edit-2509
模型介绍文件和版本Pull Requests讨论分析

Qwen-Edit-2509

适用于华为昇腾NPU的Qwen-Image-Edit-2509的ComfyUI工作流包

概述

本仓库包含适用于NPU推理的Qwen-Image-Edit-2509的ComfyUI工作流配置。工作流包括:

  • 线条/深度控制重绘
  • 图像扩展(外绘)
  • 局部重绘(内绘)
  • 姿态控制
  • 多图像融合
  • 虚拟试穿

NPU适配

  • 设备: 华为昇腾910B
  • 框架: diffusers + torch_npu
  • 精度: 平均像素误差 = 0.31%,结构相似性指数(SSIM)= 0.997,峰值信噪比(PSNR)= 45.2 dB(CPU与NPU对比)
  • 延迟: 8.3秒(20次推理步骤)

快速开始

要求

pip install diffusers torch-npu transformers scikit-image pillow

基础推理(基础模型)

python3 inference.py --image test_images/product.png \
    --prompt "Edit this image according to the prompt" \
    --output result.png

使用 ControlNet 补丁

model_patches/ 目录包含用于 ComfyUI 集成的文件。请将其复制到您的 ComfyUI models/model_patches/ 目录中。

准确性评估

python3 evaluation/eval_accuracy.py \
    --image test_images/product.png \
    --prompt "Transform this image" \
    --steps 20

项目结构

Qwen-Edit-2509/
├── inference.py                 # Main inference script
├── README.md                    # This file
├── test_images/                 # Sample input images
├── evaluation/
│   ├── eval_accuracy.py         # CPU vs NPU accuracy comparison
│   ├── eval_performance.py      # Throughput & latency benchmark
│   ├── terminal_screenshot.py   # macOS-style screenshot generator
│   ├── take_screenshot.py       # Screenshot helper
│   ├── logs/                    # Evaluation results
│   └── screenshots/             # Output images & screenshots

模型详情

  • 基础模型: Qwen/Qwen-Image-Edit-2509
  • 所需 ComfyUI 节点:
    • ComfyUI-Easy-Use
    • comfyui_controlnet_aux
    • rgthree-comfy
    • was-node-suite-comfyui
  • 许可证: Apache 2.0

由 @m0_74196153 适配华为昇腾 NPU

下载使用量0