X-PLUG / mPLUG-Owl

mPLUG-Owl: The Powerful Multi-modal Large Language Model Family
https://www.modelscope.cn/studios/damo/mPLUG-Owl
MIT License
2.25k stars 171 forks source link

video_inference problem #100

Closed BruceChen15 closed 1 year ago

BruceChen15 commented 1 year ago

Hi, First of all, thank you for providing such amazing works. But when I trying to inference video inference code that you provided. I got these error. Can you figure it out? thx image

MAGAer13 commented 1 year ago

You can put the model on the GPU.

BruceChen15 commented 1 year ago

Hi, do you mean that I can revise the code at line 33,34 like below? Or I just run the command CUDA_VISIBLE_DEVICES=1 python inference_video.py? thx image

MAGAer13 commented 1 year ago
model = MplugOwlForConditionalGeneration.from_pretrained(
   pretrained_ckpt,
   torch_dtype=torch.bfloat16,
   device_map={'': 0},
)

You can modify like this, and try run with CUDA_VISIBLE_DEVICES=1 python inference_video.py

BruceChen15 commented 1 year ago

thank you. problem sloved.

MAGAer13 commented 1 year ago

thank you. problem sloved.

Did you observe the nan phenomenon?

BruceChen15 commented 1 year ago

Yes... I find out that x.half() would become nan after some iterations. And I have try the way 2 and 3 you provide, but did not work.

image image image

MAGAer13 commented 1 year ago

What about bfloat16?

MAGAer13 commented 1 year ago

Do you test it on inference?

BruceChen15 commented 1 year ago

I change the code like below, and get the bfloat16 not implement on conv_depthwise3d error image image

yinkangning0124 commented 1 year ago

Have you solve this problem? I also got the NAN problem when running video_inference

BruceChen15 commented 1 year ago

Have you solve this problem? I also got the NAN problem when running video_inference

Not yet

MAGAer13 commented 1 year ago

See #101 .