bes-dev / stable_diffusion.openvino

Apache License 2.0
1.53k stars 207 forks source link

Does it require Internet connection? #73

Closed enzyme69 closed 1 year ago

enzyme69 commented 1 year ago

I was testing this openvino setup using my MacBookPro 2017, non M1. So far so good until my Internet connection off and getting this error:

Traceback (most recent call last):
  File "/Users/jimmygunawan/Documents/SDExperiment/stable_diffusion.openvino-master/demo.py", line 74, in <module>
    main(args)
  File "/Users/jimmygunawan/Documents/SDExperiment/stable_diffusion.openvino-master/demo.py", line 31, in main
    engine = StableDiffusionEngine(
  File "/Users/jimmygunawan/Documents/SDExperiment/stable_diffusion.openvino-master/stable_diffusion_engine.py", line 26, in __init__
    self.tokenizer = CLIPTokenizer.from_pretrained(tokenizer)
  File "/opt/miniconda3/lib/python3.9/site-packages/transformers/tokenization_utils_base.py", line 1707, in from_pretrained
    resolved_vocab_files[file_id] = cached_path(
  File "/opt/miniconda3/lib/python3.9/site-packages/transformers/file_utils.py", line 1846, in cached_path
    output_path = get_from_cache(
  File "/opt/miniconda3/lib/python3.9/site-packages/transformers/file_utils.py", line 2102, in get_from_cache
    raise ValueError(
ValueError: Connection error, and we cannot find the requested files in the cached path. Please try again or make sure your Internet connection is on.

So I wonder what's going on and whether Internet connection is needed during processing?

ClashSAN commented 1 year 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

let me know if this worked without internet connection. See #12

enzyme69 commented 1 year ago

Ok maybe that's it, I did not modify anything, but as long wifi connected -- eventhough my modem is not connected to Internet it works okey.