[Diffusion] Qwen image support (#82)
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
This commit is contained in:
1 parent
db81ee9f69
commit
4049f356f2
22 files changed
+2435
-8
No files matched your search
@@ -0,0 +1,20 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
import torch
|
||||
|
||||
from vllm_omni.entrypoints.omni import Omni
|
||||
|
||||
model_name = "Qwen/Qwen-Image"
|
||||
prompt = "a cup of coffee on the table"
|
||||
if __name__ == "__main__":
|
||||
m = Omni(
|
||||
model=model_name,
|
||||
)
|
||||
image = m.generate(
|
||||
prompt,
|
||||
height=1024,
|
||||
width=1024,
|
||||
generator=torch.Generator(device="cuda").manual_seed(42),
|
||||
)
|
||||
image[0].save("qwen_image_output.png")
|
||||
@@ -16,7 +16,7 @@ from vllm.multimodal.image import convert_image_mode
|
||||
from vllm.sampling_params import SamplingParams
|
||||
from vllm.utils import FlexibleArgumentParser
|
||||
|
||||
from vllm_omni import OmniLLM
|
||||
from vllm_omni import Omni
|
||||
|
||||
SEED = 42
|
||||
|
||||
@@ -140,7 +140,7 @@ def main(args):
|
||||
model_name = "Qwen/Qwen2.5-Omni-7B"
|
||||
query_result = query_map[args.query_type]()
|
||||
|
||||
omni_llm = OmniLLM(
|
||||
omni_llm = Omni(
|
||||
model=model_name,
|
||||
log_stats=args.enable_stats,
|
||||
log_file=("omni_llm_pipeline.log" if args.enable_stats else None),
|
||||
|
||||
Reference in new issue
Block a user