LoRA adapter for Qwen-Image-Edit-2509: Convert white-background product photos to outdoor scenes
This repository contains the White_to_Scene LoRA adapter for Qwen-Image-Edit-2509, adapted for Huawei Ascend NPU inference.
Trigger word: 白底图转场景
The LoRA transforms white-background product images into contextual outdoor scenes while preserving product identity.
pip install diffusers torch-npu transformers scikit-image pillowpython3 inference.py --image test_images/product.png \
--prompt "白底图转场景, 将产品放在户外场景中" \
--output result.pngpython3 evaluation/eval_accuracy.py \
--image test_images/product.png \
--prompt "白底图转场景, 将产品放在户外场景中" \
--steps 20python3 evaluation/eval_performance.py \
--image test_images/product.png \
--prompt "白底图转场景, 将产品放在户外场景中" \
--num_runs 3White_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白底图转场景.safetensors (236 MB)Adapted for Huawei Ascend NPU by @m0_74196153