fix bug
This commit is contained in:
1 parent
734e019cc1
commit
a8f22d8895
1 file changed
+1
-1
@@ -50,7 +50,7 @@ def _encode_supervised_example(
|
||||
train_on_prompt: bool,
|
||||
mask_history: bool,
|
||||
) -> Tuple[List[int], List[int]]:
|
||||
if "image_grid_thw" in processor.model_input_names: # qwen2_vl models
|
||||
if processor is not None and "image_grid_thw" in processor.model_input_names: # qwen2_vl models
|
||||
image_processor = getattr(processor, "image_processor")
|
||||
merge_length = image_processor.merge_size**2
|
||||
if len(images) > 0:
|
||||
|
||||
Reference in new issue
Block a user