Skip to content

Fix: Replace deprecated huggingface_hub.get_token_permission() with whoami()#8913

Merged
lstein merged 3 commits intoinvoke-ai:mainfrom
Pfannkuchensack:fix/replace-deprecated-hf-get-token-permission
Feb 28, 2026
Merged

Fix: Replace deprecated huggingface_hub.get_token_permission() with whoami()#8913
lstein merged 3 commits intoinvoke-ai:mainfrom
Pfannkuchensack:fix/replace-deprecated-hf-get-token-permission

Conversation

@Pfannkuchensack
Copy link
Collaborator

Summary

get_token_permission is deprecated and will be removed in huggingface_hub 1.0. Use whoami() to validate the token instead, as recommended by the deprecation warning.

Related Issues / Discussions

N/A

QA Instructions

  1. Set a valid Hugging Face token in the UI (Settings > Model Manager > HF Token)
  2. Verify the token status shows as valid
  3. Confirm no FutureWarning about get_token_permission appears in the console

Merge Plan

No special merge considerations. This is a small, self-contained change.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

…hoami()

`get_token_permission` is deprecated and will be removed in huggingface_hub 1.0.
Use `whoami()` to validate the token instead, as recommended by the deprecation warning.
@github-actions github-actions bot added api python PRs that change python files labels Feb 25, 2026
@lstein lstein self-assigned this Feb 27, 2026
@lstein lstein added the v6.12.0 Intended for 6.12.0 release label Feb 27, 2026
Copy link
Collaborator

@lstein lstein left a comment

Choose a reason for hiding this comment

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

I confirm that the deprecation warning goes away and that I am still able to download gated access repos.

@lstein lstein enabled auto-merge (squash) February 28, 2026 15:26
@lstein lstein merged commit ec46b5c into invoke-ai:main Feb 28, 2026
13 of 31 checks passed
@Pfannkuchensack Pfannkuchensack deleted the fix/replace-deprecated-hf-get-token-permission branch February 28, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api python PRs that change python files v6.12.0 Intended for 6.12.0 release

Projects

Status: 6.12.x

Development

Successfully merging this pull request may close these issues.

2 participants