Skip to content

Conversation

@Zanz2
Copy link
Contributor

@Zanz2 Zanz2 commented Sep 28, 2023

Fixes constants.py not using HF_ENDPOINT environment variable

Encountered this issue today, i was expecting to be able to connect to my custom HF_ENDPOINT repository however the diffusers repo did not have this functionality (https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables) .

As most hugging face repositories already have this functionality, i did not update the documentation (https://github.com/search?q=org%3Ahuggingface%20HF_ENDPOINT&type=code)

My current fix was to use sed in my docker image workflow, which is not optimal if the filename/location changes. Not sure who to tag, but as the title is pretty self explanatory and the fix trivial i expect most people can pick it up.

@bghira
Copy link
Contributor

bghira commented Sep 29, 2023

@patrickvonplaten this one seems like a low-hanging fruit for next release

SAFETENSORS_WEIGHTS_NAME = "diffusion_pytorch_model.safetensors"
ONNX_EXTERNAL_WEIGHTS_NAME = "weights.pb"
HUGGINGFACE_CO_RESOLVE_ENDPOINT = "https://huggingface.co"
HUGGINGFACE_CO_RESOLVE_ENDPOINT = os.environ.get("HF_ENDPOINT", "https://huggingface.co")
Copy link
Contributor

Choose a reason for hiding this comment

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

@patrickvonplaten
Copy link
Contributor

Thanks for the fix!

@patrickvonplaten patrickvonplaten merged commit 907fd91 into huggingface:main Oct 2, 2023
chuzhdontcode pushed a commit to chuzhdontcode/diffusers that referenced this pull request Oct 4, 2023
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
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.

3 participants