Fix config crash and make decord optional
#16
by haosdent - opened
Two fixes:
configuration_ernie4_5_vl.py: Fix Ernie4_5_MoEConfig.init crash when to_diff_dict() creates a default instance with no args. Changed self.num_hidden_layers to kwargs.get("num_hidden_layers", 2) since parent class has not set the attribute yet.
processing_ernie4_5_vl.py: Make decord an optional dependency by wrapping the import in try/except. This allows the tokenizer and image processor to load without decord, which is only needed for video processing.
haosdent changed pull request status to closed