Skip to content

fix: correct logic error in is_tiktoken_available function#44778

Closed
LincolnBurrows2017 wants to merge 4 commits intohuggingface:mainfrom
LincolnBurrows2017:fix-tiktoken-logic
Closed

fix: correct logic error in is_tiktoken_available function#44778
LincolnBurrows2017 wants to merge 4 commits intohuggingface:mainfrom
LincolnBurrows2017:fix-tiktoken-logic

Conversation

@LincolnBurrows2017
Copy link
Copy Markdown

Fixed logic error in is_tiktoken_available function. The original code return with_blobfile and _is_package_available("blobfile")[0] or True would always return True due to operator precedence.

LincolnBurrows2017 and others added 4 commits March 13, 2026 20:44
The is_batched_video() and convert_pil_frames_to_video() functions
were accessing videos[0] without first checking if the list is empty,
causing IndexError when empty lists are passed.

This is similar to the fix applied to image_utils.py in commit 4afe016.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants