convert : fix qwen omni conversion (#13859)
* convert : fix qwen omni conversion * fix typo
This commit is contained in:
parent
f7873fc698
commit
a3938fb53d
1 changed files with 9 additions and 9 deletions
|
@ -423,7 +423,7 @@ class ModelBase:
|
||||||
try:
|
try:
|
||||||
# for security reason, we don't allow loading remote code by default
|
# for security reason, we don't allow loading remote code by default
|
||||||
# if a model need remote code, we will fallback to config.json
|
# if a model need remote code, we will fallback to config.json
|
||||||
return AutoConfig.from_pretrained(dir_model, trust_remote_code=False).to_dict()
|
config = AutoConfig.from_pretrained(dir_model, trust_remote_code=False).to_dict()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning(f"Failed to load model config from {dir_model}: {e}")
|
logger.warning(f"Failed to load model config from {dir_model}: {e}")
|
||||||
logger.warning("Trying to load config.json instead")
|
logger.warning("Trying to load config.json instead")
|
||||||
|
@ -1207,7 +1207,7 @@ class MmprojModel(ModelBase):
|
||||||
self.gguf_writer.add_audio_block_count(self.find_aparam(self.n_block_keys))
|
self.gguf_writer.add_audio_block_count(self.find_aparam(self.n_block_keys))
|
||||||
self.gguf_writer.add_audio_head_count(self.find_aparam(["num_attention_heads"]))
|
self.gguf_writer.add_audio_head_count(self.find_aparam(["num_attention_heads"]))
|
||||||
|
|
||||||
else:
|
if not self.has_vision_encoder and not self.has_audio_encoder:
|
||||||
raise ValueError("MmprojModel must have either vision or audio encoder")
|
raise ValueError("MmprojModel must have either vision or audio encoder")
|
||||||
|
|
||||||
def write_vocab(self):
|
def write_vocab(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue