Qwen-Image-Edit-2509
examples/qwen_image/model_inference/Qwen-Image-Edit-2509.py
from diffsynth.pipelines.qwen_image import QwenImagePipeline, ModelConfig from PIL import Image import torch
pipe = QwenImagePipeline.from_pretrained( torch_dtype=torch.bfloat16, device="cuda", model_configs=[ ModelConfig(model_id="Qwen/Qwen-Image-Edit-2509", origin_file_pattern="transformer/diffusion_pytorch_model*.safetensors"), ModelConfig(model_id="Qwen/Qwen-Image", origin_file_pattern="text_encoder/model*.safetensors"), ModelConfig(model_id="Qwen/Qwen-Image", origin_file_pattern="vae/diffusion_pytorch_model.safetensors"), ], processor_config=ModelConfig(model_id="Qwen/Qwen-Image-Edit", origin_file_pattern="processor/"), )
image_1 = pipe(prompt="一位少女", seed=0, num_inference_steps=40, height=1328, width=1024) image_1.save("image1.jpg")
image_2 = pipe(prompt="一位老人", seed=0, num_inference_steps=40, height=1328, width=1024) image_2.save("image2.jpg")
prompt = "生成这两个人的合影" edit_image = [Image.open("image1.jpg"), Image.open("image2.jpg")] image_3 = pipe(prompt, edit_image=edit_image, seed=1, num_inference_steps=40, height=1328, width=1024, edit_image_auto_resize=True) image_3.save("image3.jpg")
Traceback (most recent call last):
File "/home/hujh/expriement/1-Qwen/DiffSynth-Studio-main/Qwen-Image-edit-plus.py", line 26, in
@Amark-cheey Please use git clone to download the latest code.
@Amark-cheey Please use
git cloneto download the latest code.
I also face the same question, but I git clone the code just now and the question remained. Could you please tell me why? Thanks.