mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-22 22:02:51 +08:00
fix bug
Former-commit-id: a8f22d8895c07ce37e8cb34b7014f3e9bcdbf6a3
This commit is contained in:
parent
d9fd8f26cc
commit
5730243179
@ -50,7 +50,7 @@ def _encode_supervised_example(
|
|||||||
train_on_prompt: bool,
|
train_on_prompt: bool,
|
||||||
mask_history: bool,
|
mask_history: bool,
|
||||||
) -> Tuple[List[int], List[int]]:
|
) -> 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")
|
image_processor = getattr(processor, "image_processor")
|
||||||
merge_length = image_processor.merge_size**2
|
merge_length = image_processor.merge_size**2
|
||||||
if len(images) > 0:
|
if len(images) > 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user