[Feature]: Migrate magi human example (#4572)
Signed-off-by: princepride <wangzhipeng628@gmail.com> Signed-off-by: 汪志鹏 <wangzhipeng628@gmail.com>
This commit is contained in:
8 files changed
+163
-227
No files matched your search
@@ -157,7 +157,7 @@ class T5GemmaEncoderLayer(nn.Module):
|
||||
num_kv_heads=config.num_key_value_heads,
|
||||
head_dim=config.head_dim,
|
||||
max_position_embeddings=config.max_position_embeddings,
|
||||
rope_theta=config.rope_theta,
|
||||
rope_theta=getattr(config, "rope_theta", 10000.0),
|
||||
)
|
||||
self.mlp = T5GemmaMLP(
|
||||
hidden_size=config.hidden_size,
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
# MagiHuman is a text -> video+audio model. Its model-specific knobs are read
|
||||
# from sampling_params.extra_args in pipeline_magi_human.py; declaring them here
|
||||
# routes request `extra_body` fields into OmniDiffusionSamplingParams.extra_args
|
||||
# so the model can be driven through the standard task example.
|
||||
MAGI_HUMAN_EXTRA_BODY_PARAMS = frozenset(
|
||||
{
|
||||
"seconds",
|
||||
"audio_path",
|
||||
"image_path",
|
||||
"sr_height",
|
||||
"sr_width",
|
||||
"sr_num_inference_steps",
|
||||
}
|
||||
)
|
||||
MAGI_HUMAN_EXTRA_OUTPUT_PARAMS = frozenset()
|
||||
@@ -23,6 +23,10 @@ from vllm_omni.model_extras.helios import (
|
||||
HELIOS_EXTRA_BODY_PARAMS,
|
||||
HELIOS_EXTRA_OUTPUT_PARAMS,
|
||||
)
|
||||
from vllm_omni.model_extras.magi_human import (
|
||||
MAGI_HUMAN_EXTRA_BODY_PARAMS,
|
||||
MAGI_HUMAN_EXTRA_OUTPUT_PARAMS,
|
||||
)
|
||||
from vllm_omni.model_extras.sensenova_u1 import (
|
||||
SENSENOVA_U1_EXTRA_BODY_PARAMS,
|
||||
SENSENOVA_U1_EXTRA_OUTPUT_PARAMS,
|
||||
@@ -80,6 +84,10 @@ _EXTRA_SPECS: dict[str, dict[str, Any]] = {
|
||||
"extra_body_params": SENSENOVA_U1_EXTRA_BODY_PARAMS,
|
||||
"extra_output_params": SENSENOVA_U1_EXTRA_OUTPUT_PARAMS,
|
||||
},
|
||||
"MagiHumanPipeline": {
|
||||
"extra_body_params": MAGI_HUMAN_EXTRA_BODY_PARAMS,
|
||||
"extra_output_params": MAGI_HUMAN_EXTRA_OUTPUT_PARAMS,
|
||||
},
|
||||
"HeliosPipeline": {
|
||||
"extra_body_params": HELIOS_EXTRA_BODY_PARAMS,
|
||||
"extra_output_params": HELIOS_EXTRA_OUTPUT_PARAMS,
|
||||
|
||||
Reference in new issue
Block a user