Skip to content

Conversation

@pcuenca
Copy link
Member

@pcuenca pcuenca commented Feb 26, 2025

  • Import torch earlier
  • Refer to transformers stable branch
  • Do not use undefined DEVICE
  • Convert inputs to bfloat16
  • Clarify image inputs and use URLs

I opened PRs to the Hub repos with similar changes, and @kubistmi fixed the bfloat16 types there.

# Make sure we are running the latest version of Transformers
!pip install git+https://github.com/huggingface/transformers.git
# Install transformers from `main` or from this stable branch:
!pip install git+https://github.com/huggingface/transformers@v4.49.0-SmolVLM-2
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer to use the stable tagged release rather than main

{"type": "image", "path": "image_1.png"},
{"type": "image", "path": "image_2.png"}
{"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/bee.jpg"},
{"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/0052a70beed5bf71b92610a43a52df6d286cd5f3/diffusers/rabbit.jpg"},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to make the example runnable (and fun)

Copy link
Contributor

@merveenoyan merveenoyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you <3

@merveenoyan merveenoyan merged commit e8ed179 into main Feb 26, 2025
@merveenoyan merveenoyan deleted the pcuenca-patch-4 branch February 26, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants