Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5bdc2fa345 | ||
|
|
881c675087 | ||
|
|
d05212cd5f | ||
|
|
66457c39fa | ||
|
|
c9786c5c0c |
No files matched your search
@@ -1,4 +1,4 @@
|
||||
ARG BASE_IMAGE=vllm/vllm-openai-rocm:v0.15.0
|
||||
ARG BASE_IMAGE=vllm/vllm-openai-rocm:v0.16.0
|
||||
FROM ${BASE_IMAGE} AS base
|
||||
|
||||
# Declare a variable to know if we want to use the nightly build or the stable build.
|
||||
@@ -9,7 +9,7 @@ FROM ${BASE_IMAGE} AS base
|
||||
# 2. Whenever vLLM upstream has released a stable version,
|
||||
# we should swap over to use stable release ASAP.
|
||||
# We should avoid relying on custom commits.
|
||||
ARG USE_NIGHTLY_BUILD=1
|
||||
ARG USE_NIGHTLY_BUILD=0
|
||||
ARG VLLM_VERSION_OR_COMMIT_HASH=2d5be1dd5ce2e44dfea53ea03ff61143da5137eb
|
||||
ARG ARG_PYTORCH_ROCM_ARCH
|
||||
ENV PYTORCH_ROCM_ARCH=${ARG_PYTORCH_ROCM_ARCH:-${PYTORCH_ROCM_ARCH}}
|
||||
|
||||
@@ -13,7 +13,7 @@ vLLM-Omni current recommends the steps in under setup through Docker Images.
|
||||
|
||||
vLLM-Omni is built based on vLLM. Please install it with command below.
|
||||
```bash
|
||||
uv pip install vllm==0.14.0+rocm700 --extra-index-url https://wheels.vllm.ai/rocm/0.14.0/rocm700
|
||||
uv pip install vllm==0.16.0+rocm700 --extra-index-url https://wheels.vllm.ai/rocm/0.16.0/rocm700
|
||||
```
|
||||
|
||||
#### Installation of vLLM-Omni
|
||||
@@ -34,13 +34,13 @@ uv pip install onnxruntime-rocm sox
|
||||
# --8<-- [start:build-wheel-from-source]
|
||||
|
||||
#### Installation of vLLM
|
||||
If you do not need to modify source code of vLLM, you can directly install the stable 0.14.0 release version of the library
|
||||
If you do not need to modify source code of vLLM, you can directly install the stable 0.16.0 release version of the library
|
||||
|
||||
```bash
|
||||
uv pip install vllm==0.14.0+rocm700 --extra-index-url https://wheels.vllm.ai/rocm/0.14.0/rocm700
|
||||
uv pip install vllm==0.16.0+rocm700 --extra-index-url https://wheels.vllm.ai/rocm/0.16.0/rocm700
|
||||
```
|
||||
|
||||
The release 0.14.0 of vLLM requires ROCm 7.0 environment.
|
||||
The release 0.16.0 of vLLM requires ROCm 7.0 environment.
|
||||
|
||||
#### Installation of vLLM-Omni
|
||||
Since vllm-omni is rapidly evolving, it's recommended to install it from source
|
||||
@@ -58,7 +58,7 @@ If you want to check, modify or debug with source code of vLLM, install the libr
|
||||
```bash
|
||||
git clone https://github.com/vllm-project/vllm.git
|
||||
cd vllm
|
||||
git checkout v0.14.0
|
||||
git checkout v0.16.0
|
||||
python3 -m pip install -r requirements/rocm.txt
|
||||
python3 setup.py develop
|
||||
```
|
||||
|
||||
@@ -36,6 +36,7 @@ th {
|
||||
|`StableDiffusion3Pipeline` | Stable-Diffusion-3 | `stabilityai/stable-diffusion-3.5-medium` |
|
||||
|`Flux2KleinPipeline` | FLUX.2-klein | `black-forest-labs/FLUX.2-klein-4B`, `black-forest-labs/FLUX.2-klein-9B` |
|
||||
|`FluxPipeline` | FLUX.1-dev | `black-forest-labs/FLUX.1-dev` |
|
||||
|`OmniGen2Pipeline` | OmniGen2 | `OmniGen2/OmniGen2` |
|
||||
|`StableAudioPipeline` | Stable-Audio-Open | `stabilityai/stable-audio-open-1.0` |
|
||||
|`Qwen3TTSForConditionalGeneration` | Qwen3-TTS-12Hz-1.7B-CustomVoice | `Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice` |
|
||||
|`Qwen3TTSForConditionalGeneration` | Qwen3-TTS-12Hz-1.7B-VoiceDesign | `Qwen/Qwen3-TTS-12Hz-1.7B-VoiceDesign` |
|
||||
|
||||
@@ -2,6 +2,23 @@
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
"""
|
||||
Example script for image editing with OmniGen2.
|
||||
|
||||
python image_edit.py \
|
||||
--image input.png \
|
||||
--model "OmniGen2/OmniGen2" \
|
||||
--prompt "Change the background to classroom." \
|
||||
--negative-prompt "(((deformed))), blurry, over saturation, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (extra_limb), (ugly), (poorly drawn hands), fused fingers, messy drawing, broken legs censor, censored, censor_bar" \
|
||||
--num-inference-steps 50 \
|
||||
--seed 0 \
|
||||
--guidance-scale 5.0 \
|
||||
--guidance-scale-2 2.0 \
|
||||
--output outputs/image_edit.png \
|
||||
--num-outputs-per-prompt 2
|
||||
|
||||
Note: For OmniGen2, `guidance_scale` works as `text_guidance_scale`,
|
||||
and `guidance_scale_2` works as `image_guidance_scale`.
|
||||
|
||||
Example script for image editing with Qwen-Image-Edit.
|
||||
|
||||
Usage (single image):
|
||||
@@ -141,6 +158,9 @@ def parse_args() -> argparse.Namespace:
|
||||
"directly as an input parameter. Enabled when guidance_scale > 1. Ignored when not using guidance-distilled models."
|
||||
),
|
||||
)
|
||||
parser.add_argument(
|
||||
"--guidance-scale-2", type=float, default=None, help="image guidance scale for image-to-image generation."
|
||||
)
|
||||
parser.add_argument(
|
||||
"--output",
|
||||
type=str,
|
||||
@@ -403,6 +423,7 @@ def main():
|
||||
generator=generator,
|
||||
true_cfg_scale=args.cfg_scale,
|
||||
guidance_scale=args.guidance_scale,
|
||||
guidance_scale_2=args.guidance_scale_2,
|
||||
num_inference_steps=args.num_inference_steps,
|
||||
num_outputs_per_prompt=args.num_outputs_per_prompt,
|
||||
layers=args.layers,
|
||||
|
||||
Whitespace-only changes.
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -105,6 +105,11 @@ _DIFFUSION_MODELS = {
|
||||
"pipeline_flux",
|
||||
"FluxPipeline",
|
||||
),
|
||||
"OmniGen2Pipeline": (
|
||||
"omnigen2",
|
||||
"pipeline_omnigen2",
|
||||
"OmniGen2Pipeline",
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
@@ -289,6 +294,7 @@ _DIFFUSION_POST_PROCESS_FUNCS = {
|
||||
"Flux2KleinPipeline": "get_flux2_klein_post_process_func",
|
||||
"NextStep11Pipeline": "get_nextstep11_post_process_func",
|
||||
"FluxPipeline": "get_flux_post_process_func",
|
||||
"OmniGen2Pipeline": "get_omnigen2_post_process_func",
|
||||
}
|
||||
|
||||
_DIFFUSION_PRE_PROCESS_FUNCS = {
|
||||
@@ -302,6 +308,7 @@ _DIFFUSION_PRE_PROCESS_FUNCS = {
|
||||
"QwenImageLayeredPipeline": "get_qwen_image_layered_pre_process_func",
|
||||
"WanPipeline": "get_wan22_pre_process_func",
|
||||
"WanImageToVideoPipeline": "get_wan22_i2v_pre_process_func",
|
||||
"OmniGen2Pipeline": "get_omnigen2_pre_process_func",
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -328,7 +328,7 @@ class Qwen3TTSTokenizer:
|
||||
else:
|
||||
# List[Tensor/np]
|
||||
audio_codes_list = [_to_tensor(c, dtype=torch.long) for c in audio_codes_list]
|
||||
audio_codes_padded = pad_sequence(audio_codes_list, batch_first=True, padding_value=0).to(self.device)
|
||||
audio_codes_padded = pad_sequence(audio_codes_list, batch_first=True, padding_value=-1).to(self.device)
|
||||
|
||||
with torch.inference_mode():
|
||||
if model_type == "qwen3_tts_tokenizer_25hz":
|
||||
|
||||
+2
-1
@@ -991,10 +991,11 @@ class Qwen3TTSTokenizerV2Model(Qwen3TTSTokenizerV2PreTrainedModel):
|
||||
|
||||
"""
|
||||
return_dict = return_dict if return_dict is not None else self.config.return_dict
|
||||
audio_lengths = (audio_codes[..., 0] > -1).sum(1) * self.decode_upsample_rate
|
||||
|
||||
audio_codes = torch.clamp(audio_codes, min=0)
|
||||
audio_values = self.decoder.chunked_decode(audio_codes.transpose(1, 2)).squeeze(1)
|
||||
|
||||
audio_lengths = (audio_codes[..., 0] > 0).sum(1) * self.decode_upsample_rate
|
||||
audio_values = [a[:length] for a, length in zip(audio_values, audio_lengths)]
|
||||
|
||||
if not return_dict:
|
||||
|
||||
+2
-1
@@ -1508,10 +1508,11 @@ class Qwen3TTSTokenizerV1Model(Qwen3TTSTokenizerV1PreTrainedModel):
|
||||
|
||||
"""
|
||||
return_dict = return_dict if return_dict is not None else self.config.return_dict
|
||||
audio_lengths = (audio_codes > -1).sum(1) * self.decode_upsample_rate
|
||||
|
||||
audio_codes = torch.clamp(audio_codes, min=0)
|
||||
audio_values = self.decoder(code=audio_codes, reference_mel=ref_mels, conditioning=xvectors)
|
||||
|
||||
audio_lengths = (audio_codes > 0).sum(1) * self.decode_upsample_rate
|
||||
audio_values = [a[:length] for a, length in zip(audio_values, audio_lengths)]
|
||||
|
||||
if not return_dict:
|
||||
|
||||
Reference in new issue
Block a user