modelscope / modelscope/DiffSynth-Studio

Cannot load Qwen-Image-Edit-2509

Open
#959 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13.1k
Forks
1.3k
Avg merge
13h 12m
Merged PRs (30d)
45

Description

I modified example code as follows, since my env has no internet connection. Error occurs while loading model as:
...
Using qwen_image_vae from ['/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/vae/diffusion_pytorch_model.safetensors'].
No qwen_image_blockwise_controlnet models available.

my code:
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(path=[
"/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/transformer/diffusion_pytorch_model-00001-of-00005.safetensors",
"/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/transformer/diffusion_pytorch_model-00002-of-00005.safetensors",
"/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/transformer/diffusion_pytorch_model-00003-of-00005.safetensors",
"/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/transformer/diffusion_pytorch_model-00004-of-00005.safetensors",
"/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/transformer/diffusion_pytorch_model-00005-of-00005.safetensors",
], skip_download=True),
ModelConfig(path=[
"/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/text_encoder/model-00001-of-00004.safetensors",
"/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/text_encoder/model-00002-of-00004.safetensors",
"/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/text_encoder/model-00003-of-00004.safetensors",
"/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/text_encoder/model-00004-of-00004.safetensors",
], skip_download=True),
ModelConfig(path=[
"/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/vae/diffusion_pytorch_model.safetensors"
], skip_download=True),
],
processor_config=ModelConfig(path=[
"/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/processor/added_tokens.json",
"/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/processor/chat_template.jinja",
"/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/processor/preprocessor_config.json",
"/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/processor/special_tokens_map.json",
"/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/processor/tokenizer_config.json",
"/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/processor/tokenizer.json",
"/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/processor/video_preprocessor_config.json",
"/home/xx/models/huggingface.co/Qwen/Qwen-Image-Edit-2509/processor/vocab.json",
], skip_download=True)
)

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")

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at diffsynth.pipelines.qwen_image.QwenImagePipeline.from_pretrained and inspect how the supplied local ModelConfig and processor_config paths are handled with skip_download=True. Reproduce the offline load using the posted paths and determine why qwen_image_blockwise_controlnet is unavailable; done means the pipeline loads and reaches the shown image-generation calls.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.