Skip to content

[Bug]: Qwen-Image performance degrade when set tensor_parallel_size > 1 #1713

@knlnguyen1802

Description

@knlnguyen1802

Your current environment

The output of python collect_env.py
Your output of `python collect_env.py` here

Your code version

The commit id or version of vllm
0.16.0
The commit id or version of vllm-omni
90ec499bd557537088cbdf50259453b3a2f2d13e

🐛 Describe the bug

Reproduce code

from vllm_omni.entrypoints.omni import Omni
from vllm_omni.diffusion.data import DiffusionParallelConfig
from vllm_omni.inputs.data import OmniDiffusionSamplingParams


def main():
    """Generate an image of a cup of coffee on a table using the Omni model."""
    omni = Omni(
        model="Qwen/Qwen-Image",
        vae_use_tiling=True,
        parallel_config=DiffusionParallelConfig(
            tensor_parallel_size=2,
            vae_patch_parallel_size=2,  # or 2
        ),
    )

    prompt = {
        "prompt": "a cup of coffee on a table",
        "negative_prompt": "low resolution",
    }

    sampling_params = OmniDiffusionSamplingParams(
        num_inference_steps=10,
        width=512,
        height=512,
    )

    outputs = omni.generate(
        prompt,
        sampling_params_list=[sampling_params],
    )

    images = outputs[0].request_output[0].images
    if images:
        images[0].save("coffee.png")
        print("✅ Image saved to coffee.png")
    else:
        print("⚠️ No images were generated.")


if __name__ == "__main__":
    main()

Here is result when run tensor_parallel_size=2

Image

Here is result when run tensor_parallel_size=1

Image

cc: @hsliuustc0106 @Gaohan123 @SamitHuang @ZJY0516

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions