Skip to content

Commit 6e97b9a

Browse files
committed
fix doctrings idefics
1 parent 49fe60a commit 6e97b9a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/transformers/models/idefics/processing_idefics.py

+3
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@ def __call__(
259259
text (`Union[List[TextInput], [List[List[TextInput]]]]`):
260260
either a single prompt or a batched list of prompts - see the detailed description immediately after
261261
the end of the arguments doc section.
262+
return_tensors (`str` or `TensorType`, *optional*, defaults to `TensorType.PYTORCH`):
263+
The type of tensors to return. Can be one of:
264+
- `TensorType.PYTORCH` or `'pt'`: Return a batch of type `torch.Tensor`.
262265
263266
Returns:
264267
a dict with entries: `input_ids`, `attention_mask`, `pixel_values`, `image_attention_mask` which can be

src/transformers/models/idefics2/processing_idefics2.py

+3
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ def __call__(
167167
168168
Wherever an image token, `<image>` is encountered it is expanded to
169169
`<fake_token_around_image>` + `<image>` * `image_seq_len` * <fake_token_around_image>`.
170+
return_tensors (`Union[str, TensorType]`, *optional*):
171+
If set, will return tensors of a particular framework. See [`PreTrainedTokenizerFast.__call__`] for more
172+
information.
170173
171174
"""
172175
if text is None and images is None:

0 commit comments

Comments
 (0)