diff --git a/docs/.nav.yml b/docs/.nav.yml index 6b7047f4d..2c5f16d99 100644 --- a/docs/.nav.yml +++ b/docs/.nav.yml @@ -7,12 +7,14 @@ nav: - Examples: - examples/README.md - Offline Inference: - - Offline Example of vLLM-Omni for Qwen2.5-Omni: user_guide/examples/offline_inference/qwen2_5_omni.md - - Offline Example of vLLM-Omni for Qwen3-Omni: user_guide/examples/offline_inference/qwen3_omni.md - - Qwen-Image Offline Inference: user_guide/examples/offline_inference/qwen_image.md + - Qwen2.5-Omni: user_guide/examples/offline_inference/qwen2_5_omni.md + - Qwen3-Omni: user_guide/examples/offline_inference/qwen3_omni.md + - Text-To-Image: user_guide/examples/offline_inference/text_to_image.md + - Image-To-Image: user_guide/examples/offline_inference/image_to_image.md + - Text-To-Video: user_guide/examples/offline_inference/text_to_video.md - Online Serving: - - Online serving Example of vLLM-Omni for Qwen2.5-Omni: user_guide/examples/online_serving/qwen2_5_omni.md - - Online serving Example of vLLM-Omni for Qwen3-omni: user_guide/examples/online_serving/qwen3_omni.md + - Qwen2.5-Omni: user_guide/examples/online_serving/qwen2_5_omni.md + - Qwen3-Omni: user_guide/examples/online_serving/qwen3_omni.md - General: - usage/* - Configuration: diff --git a/docs/user_guide/examples/offline_inference/image_to_image.md b/docs/user_guide/examples/offline_inference/image_to_image.md new file mode 100644 index 000000000..5bdb8ecd9 --- /dev/null +++ b/docs/user_guide/examples/offline_inference/image_to_image.md @@ -0,0 +1,30 @@ +# Qwen-Image-Edit Offline Inference + +Source . Added in PR [#196](https://github.com/vllm-project/vllm-omni/pull/196). + +This example edits an input image with `Qwen/Qwen-Image-Edit` using the `image_edit.py` CLI. + +## Local CLI Usage + +```bash +python image_edit.py \ + --image qwen_bear.png \ + --prompt "Let this mascot dance under the moon, surrounded by floating stars and poetic bubbles such as 'Be Kind'" \ + --output output_image_edit.png \ + --num_inference_steps 50 \ + --cfg_scale 4.0 +``` + +Key arguments: +- `--image`: path to the source image (PNG/JPG, converted to RGB). +- `--prompt` / `--negative_prompt`: text description (string). +- `--cfg_scale`: true CFG scale for Qwen-Image-Edit (quality vs. fidelity). +- `--num_inference_steps`: diffusion sampling steps (more steps = higher quality, slower). +- `--output`: path to save the generated PNG. + +## Example materials + +??? abstract "image_edit.py" + ``````py + --8<-- "examples/offline_inference/image_to_image/image_edit.py" + `````` diff --git a/docs/user_guide/examples/offline_inference/qwen_image.md b/docs/user_guide/examples/offline_inference/text_to_image.md similarity index 75% rename from docs/user_guide/examples/offline_inference/qwen_image.md rename to docs/user_guide/examples/offline_inference/text_to_image.md index 575da435a..14e7a699d 100644 --- a/docs/user_guide/examples/offline_inference/qwen_image.md +++ b/docs/user_guide/examples/offline_inference/text_to_image.md @@ -1,9 +1,9 @@ # Qwen-Image Offline Inference -Source . +Source . -This folder provides two simple entrypoints for experimenting with `Qwen/Qwen-Image` using vLLM-Omni: +This folder provides two simple entrypoints for experimenting with `Qwen/Qwen-Image` `Tongyi-MAI/Z-Image-Turbo` using vLLM-Omni: - `text_to_image.py`: command-line script for single image generation. - `web_demo.py`: lightweight Gradio UI for interactive prompt/seed/CFG exploration. @@ -13,6 +13,7 @@ This folder provides two simple entrypoints for experimenting with `Qwen/Qwen-Im ```bash python text_to_image.py \ + --model Tongyi-MAI/Z-Image-Turbo \ --prompt "a cup of coffee on the table" \ --seed 42 \ --cfg_scale 4.0 \ @@ -33,8 +34,6 @@ Key arguments: - `--height/--width`: output resolution (defaults 1024x1024). - `--output`: path to save the generated PNG. -> ℹ️ Qwen-Image currently publishes best-effort presets at `1328x1328`, `1664x928`, `928x1664`, `1472x1140`, `1140x1472`, `1584x1056`, and `1056x1584`. Adjust `--height/--width` accordingly for the most reliable outcomes. - ## Web UI Demo Launch the gradio demo: @@ -49,9 +48,9 @@ Then open `http://localhost:7862/` on your local browser to interact with the we ??? abstract "gradio_demo.py" ``````py - --8<-- "examples/offline_inference/qwen_image/gradio_demo.py" + --8<-- "examples/offline_inference/text_to_image/gradio_demo.py" `````` ??? abstract "text_to_image.py" ``````py - --8<-- "examples/offline_inference/qwen_image/text_to_image.py" + --8<-- "examples/offline_inference/text_to_image/text_to_image.py" `````` diff --git a/docs/user_guide/examples/offline_inference/text_to_video.md b/docs/user_guide/examples/offline_inference/text_to_video.md new file mode 100644 index 000000000..2e9c833c2 --- /dev/null +++ b/docs/user_guide/examples/offline_inference/text_to_video.md @@ -0,0 +1,38 @@ +# Wan2.2 Text-to-Video Offline Inference + +Source . Added in PR [#202](https://github.com/vllm-project/vllm-omni/pull/202). + +The `Wan-AI/Wan2.2-T2V-A14B-Diffusers` pipeline generates short videos from text prompts. + +## Local CLI Usage + +```bash +python text_to_video.py \ + --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage." \ + --negative_prompt "" \ + --height 480 \ + --width 640 \ + --num_frames 32 \ + --guidance_scale 4.0 \ + --guidance_scale_high 3.0 \ + --num_inference_steps 40 \ + --fps 16 \ + --output t2v_out.mp4 +``` + +Key arguments: +- `--prompt`: text description (string). +- `--height/--width`: output resolution (defaults 720x1280). Dimensions should align with Wan VAE downsampling (multiples of 8). +- `--num_frames`: Number of frames (Wan default is 81). +- `--guidance_scale` and `--guidance_scale_high`: CFG scale (applied to low/high).. +- `--negative_prompt`: optional list of artifacts to suppress (the PR demo used a long Chinese string). +- `--boundary_ratio`: Boundary split ratio for low/high DiT. +- `--fps`: frames per second for the saved MP4 (requires `diffusers` export_to_video). +- `--output`: path to save the generated video. + +## Example materials + +??? abstract "text_to_video.py" + ``````py + --8<-- "examples/offline_inference/wan22/text_to_video.py" + `````` diff --git a/examples/offline_inference/qwen_image/image_edit.py b/examples/offline_inference/image_to_image/image_edit.py similarity index 100% rename from examples/offline_inference/qwen_image/image_edit.py rename to examples/offline_inference/image_to_image/image_edit.py diff --git a/examples/offline_inference/image_to_image/image_to_image.md b/examples/offline_inference/image_to_image/image_to_image.md new file mode 100644 index 000000000..5bdb8ecd9 --- /dev/null +++ b/examples/offline_inference/image_to_image/image_to_image.md @@ -0,0 +1,30 @@ +# Qwen-Image-Edit Offline Inference + +Source . Added in PR [#196](https://github.com/vllm-project/vllm-omni/pull/196). + +This example edits an input image with `Qwen/Qwen-Image-Edit` using the `image_edit.py` CLI. + +## Local CLI Usage + +```bash +python image_edit.py \ + --image qwen_bear.png \ + --prompt "Let this mascot dance under the moon, surrounded by floating stars and poetic bubbles such as 'Be Kind'" \ + --output output_image_edit.png \ + --num_inference_steps 50 \ + --cfg_scale 4.0 +``` + +Key arguments: +- `--image`: path to the source image (PNG/JPG, converted to RGB). +- `--prompt` / `--negative_prompt`: text description (string). +- `--cfg_scale`: true CFG scale for Qwen-Image-Edit (quality vs. fidelity). +- `--num_inference_steps`: diffusion sampling steps (more steps = higher quality, slower). +- `--output`: path to save the generated PNG. + +## Example materials + +??? abstract "image_edit.py" + ``````py + --8<-- "examples/offline_inference/image_to_image/image_edit.py" + `````` diff --git a/examples/offline_inference/qwen_image/README.md b/examples/offline_inference/text_to_image/README.md similarity index 100% rename from examples/offline_inference/qwen_image/README.md rename to examples/offline_inference/text_to_image/README.md diff --git a/examples/offline_inference/qwen_image/gradio_demo.py b/examples/offline_inference/text_to_image/gradio_demo.py similarity index 100% rename from examples/offline_inference/qwen_image/gradio_demo.py rename to examples/offline_inference/text_to_image/gradio_demo.py diff --git a/examples/offline_inference/qwen_image/text_to_image.py b/examples/offline_inference/text_to_image/text_to_image.py similarity index 100% rename from examples/offline_inference/qwen_image/text_to_image.py rename to examples/offline_inference/text_to_image/text_to_image.py diff --git a/examples/offline_inference/text_to_video/text_to_video.md b/examples/offline_inference/text_to_video/text_to_video.md new file mode 100644 index 000000000..2e9c833c2 --- /dev/null +++ b/examples/offline_inference/text_to_video/text_to_video.md @@ -0,0 +1,38 @@ +# Wan2.2 Text-to-Video Offline Inference + +Source . Added in PR [#202](https://github.com/vllm-project/vllm-omni/pull/202). + +The `Wan-AI/Wan2.2-T2V-A14B-Diffusers` pipeline generates short videos from text prompts. + +## Local CLI Usage + +```bash +python text_to_video.py \ + --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage." \ + --negative_prompt "" \ + --height 480 \ + --width 640 \ + --num_frames 32 \ + --guidance_scale 4.0 \ + --guidance_scale_high 3.0 \ + --num_inference_steps 40 \ + --fps 16 \ + --output t2v_out.mp4 +``` + +Key arguments: +- `--prompt`: text description (string). +- `--height/--width`: output resolution (defaults 720x1280). Dimensions should align with Wan VAE downsampling (multiples of 8). +- `--num_frames`: Number of frames (Wan default is 81). +- `--guidance_scale` and `--guidance_scale_high`: CFG scale (applied to low/high).. +- `--negative_prompt`: optional list of artifacts to suppress (the PR demo used a long Chinese string). +- `--boundary_ratio`: Boundary split ratio for low/high DiT. +- `--fps`: frames per second for the saved MP4 (requires `diffusers` export_to_video). +- `--output`: path to save the generated video. + +## Example materials + +??? abstract "text_to_video.py" + ``````py + --8<-- "examples/offline_inference/wan22/text_to_video.py" + `````` diff --git a/examples/offline_inference/wan22/text_to_video.py b/examples/offline_inference/text_to_video/text_to_video.py similarity index 100% rename from examples/offline_inference/wan22/text_to_video.py rename to examples/offline_inference/text_to_video/text_to_video.py