pypi huggingface-hub 1.16.0
[v1.16.0] Together goes multimodal on Inference Providers, CLI improvements, and token security

3 hours ago

⚡ Together goes multimodal on Inference Providers

Together now supports five additional task types beyond chat and text-to-image on Inference Providers:

  • feature_extraction
  • text_to_speech
  • automatic_speech_recognition
  • image_to_image
  • text_to_video
from huggingface_hub import InferenceClient

client = InferenceClient(provider="together")

# Embeddings
embeddings = client.feature_extraction("Hello world", model="intfloat/multilingual-e5-large-instruct")

# Text-to-speech
audio = client.text_to_speech("Hello world", model="hexgrad/Kokoro-82M", extra_body={'voice': 'af_heart'})

# Text-to-video
video = client.text_to_video("A cat on the moon", model="Wan-AI/Wan2.2-T2V-A14B")
  • [Inference] Add embeddings, TTS, ASR, image-to-image and video tasks for Together by @nbroad1881 in #4164

📚 Documentation: Inference guide

🔗 Centralized hf:// URI parsing

All scattered ad-hoc hf:// URI parsers throughout the codebase have been consolidated onto the new parse_hf_uri/parse_hf_mount helpers. This brings consistent parsing behavior, a new is_hf_uri public helper for validating URIs, and proper handling of @ in filenames (now treated as literal). The CLI error handler now catches HfUriError and displays a clean message instead of a raw traceback.

🚨 Breaking Changes

This migration includes several breaking changes: BucketUrl.handle has been renamed to BucketUrl.uri (type changed from str to HfUri, use .to_uri() for the string form), Volume.to_hf_handle() has been renamed to Volume.to_uri(), single-segment repo IDs (e.g. gpt2) are no longer supported in HfFileSystem paths or CLI -v flags — you must use the namespace/name format instead.

  • [Core] Migrate hf:// URI parsing to centralized parse_hf_uri by @Wauplin in #4189

📚 Documentation: CLI guide | Buckets guide

🖥️ CLI

Global --no-truncate flag for CLI tables

A new --no-truncate global formatting flag disables the ... shortening of scalar values in human-mode tables, letting you see full IDs, names, and other long text at a glance. List- and dict-valued columns (e.g. tags) remain shortened in human mode since they can be arbitrarily long; use --format json for those. When any cell is truncated, human tables now print a one-line hint at the bottom pointing you to the right flag.

# Show full scalar values in table output
hf models ls --no-truncate

📚 Documentation: CLI guide

Miscellaneous

🔒 Token file permissions hardened

Token files written by huggingface_hub (~/.cache/huggingface/token and ~/.cache/huggingface/stored_tokens) were previously created with Python's default modes, leaving them world-readable on most systems. This PR sets file permissions to 0o600 and parent directory permissions to 0o700 after every write, bringing huggingface_hub in line with industry-standard tools like GitHub CLI, AWS CLI, and Google Cloud SDK. Pre-existing installations will converge to safe permissions on the next token save. The chmod calls are wrapped in try/except for Windows, which doesn't support POSIX modes.

  • [Auth] Harden HF_TOKEN_PATH and HF_STORED_TOKENS_PATH to 0o600 / 0o700 by @JAE0Y2N in #4234

📊 Jobs

🐛 Bug and typo fixes

  • [Download] Fix snapshot bar inflation on http_get retry by @popfido in #4209

📖 Documentation

  • [Docs] Refresh contributing guide and README by @Wauplin in #4237

🏗️ Internal

  • Post-release: bump version to 1.16.0.dev0 by @huggingface-hub-bot[bot] in #4230
  • Fix catch-all empty string in CI pytest --only-rerun by @albertvillanova in #4239
  • [Internal] Silence ty invalid-type-form on WebhooksServer annotations by @hanouticelina in #4242
  • [CI] make test_model_info_with_security for robust by @Wauplin in #4246

Don't miss a new huggingface-hub release

NewReleases is sending notifications on new releases.