huggingface / huggingface/diffusers

[Qwen-image-edit] Batch Inference Issue / Feature Request

Offen
#12,458 13 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
advanced stale
Vorherrschende Sprache
Python
Sterne
34.5k
Forks
7.3k
Ø Merge
3 T. 3 Std.
Gemergte PRs (30 T.)
91

Beschreibung

### Describe the bug

I am trying to run the batch inference for 'Qwen-Image-Edit-2509', but it will raise inference error

```
AttributeError Traceback (most recent call last)
.venv/lib/python3.10/site-packages/diffusers/pipelines/qwenimage/pipeline_qwenimage_edit_plus.py:633) height = height or calculated_height

AttributeError: 'tuple' object has no attribute 'size'
```

### Reproduction

```
import os
import torch
from PIL import Image
from diffusers import QwenImageEditPlusPipeline
from diffusers.utils import load_image

pipeline = QwenImageEditPlusPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2509", torch_dtype=torch.bfloat16)
print("pipeline loaded")

pipeline.to('cuda')
pipeline.set_progress_bar_config(disable=None)
image1 = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/inpaint.png"),
image2 = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png"),
prompts = [
"cinematic photo of a beautiful sunset over mountains, 35mm photograph, film, professional, 4k, highly detailed",
"cinematic film still of a cat basking in the sun on a roof in Turkey, highly detailed, high budget hollywood movie, cinemascope, moody, epic, gorgeous, film grain",
]

with torch.inference_mode():
output = pipeline(
image=[image1, image2],
prompt=prompts,
generator=[torch.manual_seed(0), torch.manual_seed(0)],
true_cfg_scale=4.0,
negative_prompt=" ",
num_inference_steps=40,
guidance_scale=1.0,
)
output_image = output.images
```

### Logs

```shell

```

### System Info

- 🤗 Diffusers version: 0.36.0.dev0
- Platform: Linux-6.8.0-63-generic-x86_64-with-glibc2.39
- Running on Google Colab?: No
- Python version: 3.10.18
- PyTorch version (GPU?): 2.8.0+cu128 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Huggingface_hub version: 0.35.3
- Transformers version: 4.57.0
- Accelerate version: 1.10.1
- PEFT version: not installed
- Bitsandbytes version: not installed
- Safetensors version: 0.6.2
- xFormers version: not installed
- Accelerator: NVIDIA H100 NVL, 95830 MiB
NVIDIA H100 NVL, 95830 MiB
NVIDIA H100 NVL, 95830 MiB
NVIDIA H100 NVL, 95830 MiB
NVIDIA H100 NVL, 95830 MiB
NVIDIA H100 NVL, 95830 MiB
NVIDIA H100 NVL, 95830 MiB
NVIDIA H100 NVL, 95830 MiB

### Who can help?

@naykun

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start with the reproduction and inspect diffusers/pipelines/qwenimage/pipeline_qwenimage_edit_plus.py around line 633, where the traceback occurs. Check how QwenImageEditPlusPipeline handles the batched image and prompt inputs, then run the provided example to determine whether the reported batch behavior is supported and what test should capture the expected result.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python, pytorch
Bereich
computer-vision, machine-learning
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.