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

loading model from glm-4v crashed #12608

Open
zalsay opened this issue Dec 25, 2024 · 3 comments
Open

loading model from glm-4v crashed #12608

zalsay opened this issue Dec 25, 2024 · 3 comments
Assignees

Comments

@zalsay
Copy link

zalsay commented Dec 25, 2024

(glm-4v) PS D:\dev\models> python D:\dev\models\vllm-ipex-server\glm-4v.py
C:\ProgramData\miniconda3\envs\glm-4v\Lib\site-packages\torchvision\io\image.py:13: UserWarning: Failed to load image Python extension: 'Could not find module 'C:\ProgramData\miniconda3\envs\glm-4v\Lib\site-packages\torchvision\image.pyd' (or one of its dependencies). Try using the full path with constructor syntax.'If you don't plan on using image functionality from torchvision.io, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have libjpeg or libpng installed before building torchvision from source?
warn(
2024-12-25 12:12:09,139 - INFO - intel_extension_for_pytorch auto imported
2024-12-25 12:12:11,063 - modelscope - INFO - PyTorch version 2.1.0a0+cxx11.abi Found.
2024-12-25 12:12:11,064 - modelscope - INFO - Loading ast index from C:\Users\sisu.cache\modelscope\ast_indexer
2024-12-25 12:12:11,223 - modelscope - INFO - Loading done! Current index file version is 1.11.0, with md5 061b1804e8e732cc7bbff4121137b87c and a total number of 953 components indexed
Loading checkpoint shards: 67%|███████████████████████████████████████████████████████████▎ | 10/15 [00:01<00:00, 7.34it/s]
(glm-4v) PS D:\dev\models>
platform: win11 dGPU: A770

@zalsay
Copy link
Author

zalsay commented Dec 25, 2024

code:
model_path = "ZhipuAI/glm-4v-9b"
model = AutoModel.from_pretrained(model_path,
load_in_4bit=True,
optimize_model=True,
trust_remote_code=True,
use_cache=True,
model_hub="modelscope")
model = model.half().to('xpu')

tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)

@zalsay
Copy link
Author

zalsay commented Dec 25, 2024

in the model's config.json, I added "image_size": 1120,

@glorysdj glorysdj self-assigned this Dec 26, 2024
@hzjane
Copy link
Contributor

hzjane commented Dec 26, 2024

Hi, You can follow this guide to check whether your environment and code are correct.

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