[Model] Support Qwen3-TTS model series (#895)
Signed-off-by: Gaohan123 <hgaoaf@connect.ust.hk>
This commit is contained in:
1 parent
0df8e80574
commit
a54c323952
35 files changed
+9642
-42
No files matched your search
@@ -232,8 +232,8 @@ class OmniInputProcessor(InputProcessor):
|
||||
# (direct-transfer path)
|
||||
prompt_embeds_payload: PromptEmbedsPayload | None = None
|
||||
additional_information_payload: AdditionalInformationPayload | None = None
|
||||
if "prompt_embeds" in decoder_inputs: # type: ignore[operator]
|
||||
pe: torch.Tensor = decoder_inputs["prompt_embeds"] # type: ignore[index]
|
||||
pe: torch.Tensor | None = decoder_inputs.get("prompt_embeds") # type: ignore[operator]
|
||||
if pe is not None:
|
||||
if pe.ndim != 2:
|
||||
raise ValueError("prompt_embeds must be of shape (seq_len, hidden_size)")
|
||||
# Move to CPU and ensure contiguous memory for stable serialization
|
||||
@@ -246,8 +246,8 @@ class OmniInputProcessor(InputProcessor):
|
||||
shape=[int(seq_len), int(hidden_size)],
|
||||
dtype=dtype_str,
|
||||
)
|
||||
if "additional_information" in decoder_inputs: # type: ignore[operator]
|
||||
raw_info: dict[str, Any] = decoder_inputs["additional_information"] # type: ignore[index] # noqa: E501
|
||||
raw_info: dict[str, Any] | None = decoder_inputs.get("additional_information") # type: ignore[operator]
|
||||
if raw_info is not None:
|
||||
entries: dict[str, AdditionalInformationEntry] = {}
|
||||
for key, value in raw_info.items():
|
||||
if isinstance(value, torch.Tensor):
|
||||
|
||||
Reference in new issue
Block a user