mirror of
https://github.com/saymrwulf/transformers.git
synced 2026-05-14 20:58:08 +00:00
temp
This commit is contained in:
parent
ce222a6990
commit
876cb6b217
1 changed files with 1 additions and 1 deletions
|
|
@ -2227,7 +2227,7 @@ class Kosmos2_5ForConditionalGeneration(Kosmos2_5PreTrainedModel, GenerationMixi
|
|||
**model_kwargs,
|
||||
)
|
||||
|
||||
if past_key_values is None:
|
||||
if cache_position[0] == 0:
|
||||
# If we're in cached decoding stage, pixel values should be None because input ids do not contain special image token anymore
|
||||
# Otherwise we need `flattened_patches` to be passed to model
|
||||
model_inputs["flattened_patches"] = flattened_patches
|
||||
|
|
|
|||
Loading…
Reference in a new issue