Skip to content

fix(core): use from_env for sandboxed apps#2064

Open
setoelkahfi wants to merge 1 commit intoEricLBuehler:masterfrom
setoelkahfi:fix/api-builder-from-env
Open

fix(core): use from_env for sandboxed apps#2064
setoelkahfi wants to merge 1 commit intoEricLBuehler:masterfrom
setoelkahfi:fix/api-builder-from-env

Conversation

@setoelkahfi
Copy link
Copy Markdown
Contributor

This pull request updates how the Hugging Face Hub API client is initialized throughout the codebase, switching from direct construction with Api::new() and ApiBuilder::new() to using ApiBuilder::from_env(). This change ensures that environment variables are consistently respected when building the API client, improving configuration reliability.

Hugging Face Hub API Initialization

  • Replaced direct instantiation of the API client (Api::new()) with ApiBuilder::from_env().build() in FluxStepper::new to ensure environment variables are used for configuration.
  • Updated DiffusionLoader to use ApiBuilder::from_env() instead of ApiBuilder::new(), further standardizing API client initialization.
  • Updated imports to include ApiBuilder in addition to Api and ApiError in stepper.rs.

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.

1 participant