Fix config crash and make decord optional

#17

Two minimal fixes:

  1. configuration_ernie4_5_vl.py: Use kwargs.get("num_hidden_layers", 2) instead of self.num_hidden_layers in Ernie4_5_MoEConfig.init, since the parent class has not set the attribute yet. Fixes crash in to_diff_dict() when creating a default instance.

  2. processing_ernie4_5_vl.py: Wrap import decord in try/except so the tokenizer and processor can load without decord installed. decord is only needed for video processing.

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment