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

最新的2d5模型使用huggingface上的示例下载(model = AutoModel.from_pretrained('internlm/internlm-xcomposer2d5-7b', torch_dtype=torch.bfloat16, trust_remote_code=True).cuda().eval()),不会下载build_mlp.py文件,有没有遇到这个情况的 #446

Open
eternal8080 opened this issue Nov 7, 2024 · 2 comments
Assignees

Comments

@eternal8080
Copy link

No description provided.

@eternal8080
Copy link
Author

找到问题了,在ixc_utils.py中:def get_font():

truetype_url = 'https://huggingface.co/internlm/internlm-xcomposer2d5-7b/resolve/main/SimHei.ttf?download=true'

ff = urlopen(truetype_url)

font = ImageFont.truetype(ff, size=40)

return font

需要把truetype_url = 'https://huggingface.co/internlm/internlm-xcomposer2d5-7b/resolve/main/SimHei.ttf?download=true'这里的url改为SimHei.ttf路径如下:
def get_font():
# 使用本地字体文件路径
font_path = 'your path/SimHei.ttf'
font = ImageFont.truetype(font_path, size=40)
return font

@Leowang980
Copy link

感谢感谢

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

3 participants