[Model] Add JoyAI-Image-Edit pipeline support (#4112)
Signed-off-by: nagisa-kun <1434936049@qq.com> Signed-off-by: nagisa <1434936049@qq.com> Signed-off-by: hurukawa <61525444+nagisa-kunhah@users.noreply.github.com>
This commit is contained in:
1 parent
6a70bda0f6
commit
3e705fcdb1
21 files changed
+4141
-10
No files matched your search
@@ -3,7 +3,7 @@
|
||||
Source <https://github.com/vllm-project/vllm-omni/tree/main/examples/offline_inference/image_to_image>.
|
||||
|
||||
|
||||
This example edits an input image with `Qwen/Qwen-Image-Edit` using the `image_edit.py` CLI.
|
||||
This example edits an input image with `Qwen/Qwen-Image-Edit` and `JoyAI-Image-Edit` using the `image_edit.py` CLI.
|
||||
|
||||
## Local CLI Usage
|
||||
|
||||
@@ -26,6 +26,27 @@ python image_edit.py \
|
||||
--cfg-scale 4.0
|
||||
```
|
||||
|
||||
### JoyAI-Image-Edit
|
||||
|
||||
JoyAI-Image-Edit uses the same `image_edit.py` CLI and supports one input
|
||||
image per request. Requested dimensions are snapped to the nearest supported
|
||||
Joy bucket; for square outputs, use `1024x1024`.
|
||||
|
||||
```bash
|
||||
python image_edit.py \
|
||||
--model jdopensource/JoyAI-Image-Edit-Diffusers \
|
||||
--image input.png \
|
||||
--prompt "Change the background to a clean studio while preserving the subject." \
|
||||
--height 1024 \
|
||||
--width 1024 \
|
||||
--num-inference-steps 50 \
|
||||
--guidance-scale 4.0 \
|
||||
--output output_joyai_edit.png
|
||||
```
|
||||
|
||||
JoyAI defaults to guidance scale `4.0`; pass `--guidance-scale` explicitly when
|
||||
you need a different value.
|
||||
|
||||
### Multiple Image Editing (Qwen-Image-Edit-2509)
|
||||
|
||||
For multiple image inputs, use `Qwen/Qwen-Image-Edit-2509` or `Qwen/Qwen-Image-Edit-2511`:
|
||||
@@ -43,7 +64,7 @@ python image_edit.py \
|
||||
|
||||
Key arguments:
|
||||
|
||||
- `--model`: model name or path. Use `Qwen/Qwen-Image-Edit-2509` or later for multiple image support.
|
||||
- `--model`: model name or path. Use `Qwen/Qwen-Image-Edit-2509` or later for multiple image support. `jdopensource/JoyAI-Image-Edit-Diffusers` supports one input image.
|
||||
- `--image`: path(s) to the source image(s) (PNG/JPG, converted to RGB). Can specify multiple images.
|
||||
- `--prompt` / `--negative-prompt`: text description (string).
|
||||
- `--cfg-scale`: true classifier-free guidance scale (default: 4.0). Classifier-free guidance is enabled by setting cfg_scale > 1 and providing a negative_prompt. Higher guidance scale encourages images closely linked to the text prompt, usually at the expense of lower image quality.
|
||||
|
||||
@@ -3,10 +3,14 @@
|
||||
Source <https://github.com/vllm-project/vllm-omni/tree/main/examples/online_serving/image_to_image>.
|
||||
|
||||
|
||||
This example demonstrates how to deploy Qwen-Image-Edit model for online image editing service using vLLM-Omni.
|
||||
This example demonstrates how to deploy image-to-image models for online image editing service using vLLM-Omni.
|
||||
|
||||
Supported models include Qwen-Image-Edit, BAGEL, JoyAI-Image-Edit, and other image-to-image pipelines.
|
||||
|
||||
For **multi-image** input editing, use **Qwen-Image-Edit-2509** (QwenImageEditPlusPipeline) and send multiple images in the user message content.
|
||||
|
||||
For **JoyAI-Image-Edit**, use `jdopensource/JoyAI-Image-Edit-Diffusers` and send exactly one input image.
|
||||
|
||||
## Start Server
|
||||
|
||||
### Basic Start
|
||||
@@ -24,6 +28,12 @@ vllm serve Qwen/Qwen-Image-Edit --omni --port 8092
|
||||
vllm serve Qwen/Qwen-Image-Edit-2509 --omni --port 8092
|
||||
```
|
||||
|
||||
### JoyAI-Image-Edit
|
||||
|
||||
```bash
|
||||
vllm serve jdopensource/JoyAI-Image-Edit-Diffusers --omni --port 8092
|
||||
```
|
||||
|
||||
### Start with Parameters
|
||||
|
||||
|
||||
@@ -76,6 +86,11 @@ curl -s http://localhost:8092/v1/chat/completions \
|
||||
| cut -d',' -f2 | base64 -d > output.png
|
||||
```
|
||||
|
||||
For JoyAI-Image-Edit, set classifier-free guidance with `guidance_scale`
|
||||
in `extra_body` (default: `4.0`). `true_cfg_scale` remains supported as an
|
||||
alias; if both are provided, their values must match. Values at or below `1.0`
|
||||
disable CFG.
|
||||
|
||||
### Method 2: Using OpenAI Python SDK
|
||||
|
||||
```python
|
||||
|
||||
Reference in new issue
Block a user