workflow: forward x-ip-token so zerogpu spaces bill the caller - #13747
Merged
Conversation
Collaborator
🪼 branch checks and previews
Install Gradio from this PR pip install https://huggingface.co/buckets/gradio/pypi-previews/resolve/da76169521194fc0722bdd05d0382964f3e0b92a/gradio-6.24.0-py3-none-any.whlInstall Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@da76169521194fc0722bdd05d0382964f3e0b92a#subdirectory=client/python"Import Gradio JS Client from this PR via CDN import { Client } from "https://huggingface.co/buckets/gradio/npm-previews/resolve/da76169521194fc0722bdd05d0382964f3e0b92a/browser.js"; |
Collaborator
🦄 change detectedThis Pull Request includes changes to the following packages.
|
…o workflow-quota-fix
abidlabs
reviewed
Aug 12, 2026
AK391
approved these changes
Aug 13, 2026
AK391
left a comment
Contributor
There was a problem hiding this comment.
Tested this on my workflow Space
(https://huggingface.co/spaces/akhaliq/workflow-test) using the PR preview
wheel, called the workflow via gradio_client both logged in (OAuth) and
logged out, and the ZeroGPU operator (Z-Image-Turbo) completed successfully
both times instead of failing with the busy/quota error. LGTM!
Collaborator
Author
|
great, thanks for testing @AK391! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
@AK391's issue around busy zerogpu spaces was caused because the
x-ip-tokenheader wasn't reaching the target spaces, so ZeroGPU couldn't identify the caller and fell back to the workflow Space's shared IP quota, which was exhausted almost instantly.the fix is to set
LocalContext.requestaround the fn call in/component_server, matching whatget_function_with_localsalready does for normal event listeners. only/component_serverwas broken. every other user func dispatch already goes throughget_function_with_locals.