bes-dev / stable_diffusion.openvino

Apache License 2.0
1.54k stars 206 forks source link

Can it be made to run entirely offline? #12

Closed logicReasoner closed 2 years ago

logicReasoner commented 2 years ago

Hello, thanks for the very useful project! :) Right now, after each run on the console, it takes ~30 seconds contacting some third-party websites before the actual inference starts. I am on a slow, laggy Internet connection and it's really annoying to wait each time. If I disconnect from the Internet entirely, then the tool complains about "cannot find the requested files in the cached path" but they must be there (in the cache) already since it no longer downloads anything...

Also, for some prompts like "Superman in the mountains" I get a black image as result. Is that to be expected?

io4 commented 2 years ago

Try using the TRANSFORMERS_OFFLINE=1 env variable as documented here, it worked for me.

trash-cant commented 2 years ago

Try using the TRANSFORMERS_OFFLINE=1 env variable as documented here, it worked for me.

Any chance someone could explain how to do this? I'm not understanding the docs

ClashSAN commented 2 years ago

In ~/miniconda3/lib/python3.9/site-packages/transformers/file_utils.py line 328 _is_offline_mode = True if os.environ.get("TRANSFORMERS_OFFLINE", "1").upper() in ENV_VARS_TRUE_VALUES else False I think this should be enabled by default, useful if you have spotty connection