Audio_VLM bug fix
This commit is contained in:
parent
7d23da6877
commit
111caf636f
2 changed files with 6 additions and 4 deletions
|
|
@ -214,8 +214,9 @@ class InferenceBackend:
|
|||
self.models[model_name]["model"] = model
|
||||
self.models[model_name]["tokenizer"] = tokenizer
|
||||
|
||||
# Load the external codec for TTS audio types (Whisper is ASR, no codec needed)
|
||||
if audio_type != "whisper":
|
||||
# Load the external codec for TTS audio types
|
||||
# (Whisper is ASR, audio_vlm is audio input — neither needs a codec)
|
||||
if audio_type not in ("whisper", "audio_vlm"):
|
||||
model_repo_path = self.models[model_name].get("model_repo_path")
|
||||
self._audio_codec_manager.load_codec(audio_type, self.device, model_repo_path=model_repo_path)
|
||||
|
||||
|
|
@ -835,6 +836,7 @@ class InferenceBackend:
|
|||
tokenize=True,
|
||||
return_dict=True,
|
||||
return_tensors="pt",
|
||||
truncation=False,
|
||||
).to(self.device)
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -1258,7 +1258,7 @@ class ModelConfig:
|
|||
is_cached=True, # Local LoRAs are always "cached"
|
||||
is_vision=is_vision,
|
||||
is_lora=True,
|
||||
is_audio=audio_type is not None,
|
||||
is_audio=audio_type is not None and audio_type != 'audio_vlm',
|
||||
audio_type=audio_type,
|
||||
has_audio_input=is_audio_input_type(audio_type),
|
||||
base_model=base_model,
|
||||
|
|
@ -1456,7 +1456,7 @@ class ModelConfig:
|
|||
is_cached=is_model_cached(identifier) if not is_local else True,
|
||||
is_vision=vision,
|
||||
is_lora=is_lora,
|
||||
is_audio=audio_type_val is not None,
|
||||
is_audio=audio_type_val is not None and audio_type_val != 'audio_vlm',
|
||||
audio_type=audio_type_val,
|
||||
has_audio_input=has_audio_in,
|
||||
base_model=base_model,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue