Views
No views yet

pip install torch
pip install git+https://github.com/huggingface/diffusers1import os
2import torch
3from PIL import Image
4from diffusers import QwenImageEditPlusPipeline
5model_name = f"OPPOer/Qwen-Image-Edit-2509-Pruning"
6pipeline = QwenImageEditPlusPipeline.from_pretrained(model_name, torch_dtype=torch.bfloat16)
7print("pipeline loaded")
8pipeline.to('cuda')
9pipeline.set_progress_bar_config(disable=None)
10image1 = Image.open("input1.jpg")
11image2 = Image.open("input2.jpg")
12prompt = "Let the ancient costume beauty in the second picture sit on the sofa in the first picture"
13inputs = {
14 "image": [image1, image2],
15 "prompt": prompt,
16 "generator": torch.manual_seed(0),
17 "true_cfg_scale": 4.0,
18 "negative_prompt": " ",
19 "num_inference_steps": 40,
20 "guidance_scale": 1.0,
21 "num_images_per_prompt": 1,
22}
23with torch.inference_mode():
24 output = pipeline(**inputs)
25 output_image = output.images[0]
26 output_image.save("output_image_edit_plus.png")
27 print("image saved at", os.path.abspath("output_image_edit_plus.png"))1import os
2import torch
3from PIL import Image
4from diffusers import QwenImageEditPlusPipeline
5model_name = f"OPPOer/Qwen-Image-Edit-2509-Pruning/Qwen-Image-Edit-2509-13B-4steps"
6pipeline = QwenImageEditPlusPipeline.from_pretrained(model_name, torch_dtype=torch.bfloat16)
7print("pipeline loaded")
8pipeline.to('cuda')
9pipeline.set_progress_bar_config(disable=None)
10image1 = Image.open("input1.jpg")
11image2 = Image.open("input2.jpg")
12prompt = "Let the ancient costume beauty in the second picture sit on the sofa in the first picture"
13inputs = {
14 "image": [image1, image2],
15 "prompt": prompt,
16 "generator": torch.manual_seed(0),
17 "true_cfg_scale": 1.0,
18 "negative_prompt": " ",
19 "num_inference_steps": 4,
20 "guidance_scale": 1.0,
21 "num_images_per_prompt": 1,
22}
23with torch.inference_mode():
24 output = pipeline(**inputs)
25 output_image = output.images[0]
26 output_image.save("output_image_edit_plus.png")
27 print("image saved at", os.path.abspath("output_image_edit_plus.png"))@misc{ma2025pluggablepruningcontiguouslayer,
title={Pluggable Pruning with Contiguous Layer Distillation for Diffusion Transformers},
author={Jian Ma and Qirong Peng and Xujie Zhu and Peixing Xie and Chen Chen and Haonan Lu},
year={2025},
eprint={2511.16156},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2511.16156},
}