Skip to content

vllm_omni.diffusion.models.soulx_singer.preprocess.payload

SoulX-Singer payload schema (guidance/precomputed tables, dummy builders).

SOULX_PRECOMPUTED_KEYS_BY_KIND module-attribute

SOULX_PRECOMPUTED_KEYS_BY_KIND: dict[
    str, tuple[str, ...]
] = {
    "svs": (
        "prompt_metadata_path",
        "target_metadata_path",
        "audio_path",
    ),
    "svc": (
        "prompt_wav_path",
        "target_wav_path",
        "prompt_f0_path",
        "target_f0_path",
    ),
}

SOULX_PREPROCESSED_KEY module-attribute

SOULX_PREPROCESSED_KEY = 'soulx_preprocessed'

build_dummy_payload

build_dummy_payload(
    kind: str, device: device
) -> dict[str, Any]

consume_payload

consume_payload(
    req: Any, expected_kind: str, device: device | str
) -> dict[str, Any]

Read the payload attached by pre_process_func, validate the kind, and relocate tensors to the compute device.

get_soulx_preprocessed_payload

get_soulx_preprocessed_payload(
    prompt: dict[str, Any],
) -> dict[str, Any] | None

Extract attached payload from a diffusion request prompt dict.

has_precomputed

has_precomputed(
    extra_args: dict[str, Any], kind: str
) -> bool

relocate_tensors

relocate_tensors(
    payload: dict[str, Any], device: device | str
) -> dict[str, Any]

Recursively move all tensors inside the payload to the target device.

Called after decode when the payload is about to be consumed by the diffusion model (which may live on a different device / rank).