[Feature request] add option to set TRANSFORMERS_OFFLINE env_var to prevent unwarranted huggingface updates #938
mr555ru
started this conversation in
Feature suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This feature request is a suggestion for preventing bugs like #919.
A buggy update from Huggingface accidentally denied access to SD for the users who were under impression that they have a net-independent, locally built version of SD.
After some investigation as to why a local model can suddenly stop working without user intent or notice, I have come to a preliminary conclusion that it could be fixed by providing an option to deny internet access to
transformers
package and force it to run only from cache and never attempt to re-synchronize the cache.It seems like there are roughly 2 ways to do this, outlined in this post on Huggingface:
TRANSFORMERS_OFFLINE
environment variable to 1 to enable transformers offline mode.from_pretrained()
method of all transformers models and add a keyword argumentlocal_files_only=True
.Given that it seems that calls to
from_pretrained()
which were affected by this bug stem fromhttps://github.com/CompVis/stable-diffusion/
repository which is used in this fork (invoked vialdm.util.instantiate_from_config
), it would suggest that an option to turntransformers_offline
on in one of the scripts would be easier to implement.ED: spelling, revised information
Beta Was this translation helpful? Give feedback.
All reactions