Skip to content

Commit

Permalink
Merge branch 'huggingface:main' into vlm-fixes-after-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
zucchini-nlp authored Aug 22, 2024
2 parents be8c441 + 3bb7b05 commit 42042cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker/consistency.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG REF=main
RUN apt-get update && apt-get install -y time git g++ pkg-config make git-lfs
ENV UV_PYTHON=/usr/local/bin/python
RUN pip install uv && uv venv && uv pip install --no-cache-dir -U pip setuptools GitPython
RUN uv pip install --no-cache-dir --upgrade 'torch' --index-url https://download.pytorch.org/whl/cpu
RUN pip install --no-cache-dir --upgrade 'torch' 'torchaudio' --index-url https://download.pytorch.org/whl/cpu
# tensorflow pin matching setup.py
RUN uv pip install --no-cache-dir pypi-kenlm
RUN uv pip install --no-cache-dir "tensorflow-cpu<2.16" "tf-keras<2.16"
Expand Down
3 changes: 3 additions & 0 deletions src/transformers/models/whisper/generation_whisper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,9 @@ def _set_return_outputs(return_dict_in_generate, return_token_timestamps, logpro
return return_dict_in_generate

def _set_return_timestamps(self, return_timestamps, is_shortform, generation_config):
if return_timestamps is None and hasattr(generation_config, "return_timestamps"):
return_timestamps = generation_config.return_timestamps

if not is_shortform:
if return_timestamps is False:
raise ValueError(
Expand Down

0 comments on commit 42042cc

Please sign in to comment.