[Entrypoints] Support Qwen-Image-Edit 2509 online serving & update doc (#368)
Signed-off-by: David Chen <530634352@qq.com>
This commit is contained in:
1 parent
8939eb835d
commit
628c0a9217
14 files changed
+382
-37
No files matched your search
@@ -1033,7 +1033,20 @@ class OmniOpenAIServingChat(OpenAIServingChat):
|
||||
|
||||
# Add reference image if provided
|
||||
if pil_images:
|
||||
gen_kwargs["pil_image"] = pil_images[0]
|
||||
if len(pil_images) == 1:
|
||||
gen_kwargs["pil_image"] = pil_images[0]
|
||||
else:
|
||||
od_config = getattr(self._diffusion_engine, "od_config", None)
|
||||
supports_multimodal_inputs = getattr(od_config, "supports_multimodal_inputs", False)
|
||||
if supports_multimodal_inputs:
|
||||
gen_kwargs["pil_image"] = pil_images
|
||||
else:
|
||||
return self._create_error_response(
|
||||
"Multiple input images are not supported by the current diffusion model. "
|
||||
"For multi-image editing, start the server with Qwen-Image-Edit-2509 "
|
||||
"and send multiple images in the user message content.",
|
||||
status_code=400,
|
||||
)
|
||||
|
||||
# Generate image
|
||||
result = await self._diffusion_engine.generate(**gen_kwargs)
|
||||
|
||||
Reference in new issue
Block a user