Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssetCardFieldNotFoundError: The asset card 'seamlessM4T_v2_large' must have a field named 'model_type'. #532

Open
CaiJichang212 opened this issue Dec 11, 2024 · 0 comments

Comments

@CaiJichang212
Copy link

CaiJichang212 commented Dec 11, 2024

import yaml

model_yaml = './src/seamless_communication/cards/seamlessM4T_v2_large_local.yaml'
vocoder_yaml = './src/seamless_communication/cards/vocoder_v2_local.yaml'

# 打开YAML文件并加载内容
with open(model_yaml, 'r') as f1, open(vocoder_yaml, 'r') as f2:
    model_metadata = yaml.safe_load(f1)
    vocoder_metadata = yaml.safe_load(f2)
    
from fairseq2.assets.card import AssetCard

model_card = AssetCard(model_metadata)
vocoder_card = AssetCard(vocoder_metadata)

translator = Translator(
    model_card,
    vocoder_card,
    # device=torch.device("cuda:0"),
    device=torch.device("cpu"),
    dtype=torch.float16,
)

AssetCardFieldNotFoundError: The asset card 'seamlessM4T_v2_large' must have a field named 'model_type'.
The weight of the model downloaded to the local is used by AssetCard. An error occurs during the loading process, so it is necessary to set the seamlessM4T model_type. I found that none of the seamlessM4T series models has set model_type, and the corresponding model_type has been set in other models. Looking forward to your answer.
通过AssetCard的方式使用下载到本地的模型权重,加载过程中出现报错,需要制定seamlessM4T的model_type,我发现seamlessM4T系列模型都没有设置model_type,其他模型都设置了对应的model_type?期待你的解答。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant