m0_74196153/Qwen-Edit-2509
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

Qwen-Edit-2509

ComfyUI workflow pack for Qwen-Image-Edit-2509, adapted for Huawei Ascend NPU

Overview

This repository contains ComfyUI workflow configurations for Qwen-Image-Edit-2509, adapted for NPU inference. The workflows include:

  • Line/depth controlled redrawing
  • Image expansion (outpainting)
  • Partial redrawing (inpainting)
  • Pose control
  • Multi-image fusion
  • Virtual try-on

NPU Adaptation

  • Device: Huawei Ascend 910B
  • Framework: diffusers + torch_npu
  • Accuracy: Mean Pixel Error = 0.31%, SSIM = 0.997, PSNR = 45.2 dB (CPU vs NPU)
  • Latency: 8.3s (20 inference steps)

Quick Start

Requirements

pip install diffusers torch-npu transformers scikit-image pillow

Basic Inference (Base Model)

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

With ControlNet Patches

The model_patches/ directory contains files for ComfyUI integration. Copy to your ComfyUI models/model_patches/ directory.

Accuracy Evaluation

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

Project Structure

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

Model Details

  • Base Model: Qwen/Qwen-Image-Edit-2509
  • Required ComfyUI Nodes:
    • ComfyUI-Easy-Use
    • comfyui_controlnet_aux
    • rgthree-comfy
    • was-node-suite-comfyui
  • License: Apache 2.0

Adapted for Huawei Ascend NPU by @m0_74196153