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

Qwen-Image-Edit-2509-White_to_Scene

LoRA adapter for Qwen-Image-Edit-2509: Convert white-background product photos to outdoor scenes

Overview

This repository contains the White_to_Scene LoRA adapter for Qwen-Image-Edit-2509, adapted for Huawei Ascend NPU inference.

Trigger word: 白底图转场景

Same LoRA as White_to_Scene with full base model name in path.

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

python3 inference.py --image test_images/product.png \
    --prompt "白底图转场景, 将图片中的汽车放在户外场景中" \
    --output result.png

Project Structure

Qwen-Image-Edit-2509-White_to_Scene/
├── 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
  • LoRA Weight: 白底图转场景.safetensors (236 MB)
  • License: Apache 2.0

Adapted for Huawei Ascend NPU by @m0_74196153