函数计算FC这个问题怎么解决?页面生成图片很不稳定, 经常报 Error。本地客户端 如何解决呢?
connect to huggingface.co (//huggingface.co:443), reject it.
* Error running process: /stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py
Traceback (most recent call last):
File "/usr/local/lib/python3.10/urllib/request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/local/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.10/http/client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.10/http/client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.10/http/client.py", line 1037, in _send_output
self.send(msg)
File "/usr/local/lib/python3.10/http/client.py", line 975, in send
self.connect()
File "/usr/local/lib/python3.10/http/client.py", line 1447, in connect
super().connect()
File "/usr/local/lib/python3.10/http/client.py", line 951, in connect
self._tunnel()
File "/usr/local/lib/python3.10/http/client.py", line 924, in _tunnel
raise OSError(f"Tunnel connection failed: {code} {message.strip()}")
OSError: Tunnel connection failed: 408 Request Timeout
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/stable-diffusion-webui/modules/scripts.py", line 619, in process
script.process(p, *script_args)
File "/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 977, in process
self.controlnet_hack(p)
File "/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 966, in controlnet_hack
self.controlnet_main_entry(p)
File "/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 808, in controlnet_main_entry
detected_map, is_image = preprocessor(
File "/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/utils.py", line 75, in decorated_func
return cached_func(*args, **kwargs)
File "/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/utils.py", line 63, in cached_func
return func(*args, **kwargs)
File "/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/global_state.py", line
35, in unified_preprocessor
return preprocessor_modules[preprocessor_name](*args, **kwargs)
File "/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/processor.py", line 160, in mlsd
result = model_mlsd(img, thr_v, thr_d)
File "/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/mlsd/__init__.py", line 32, in apply_mlsd
load_file_from_url(remote_model_path, model_dir=modeldir)
File "/usr/local/lib/python3.10/site-packages/basicsr/utils/download_util.py", line 98, in load_file_from_url
download_url_to_file(url, cached_file, hash_prefix=None, progress=progress)
File "/usr/local/lib/python3.10/site-packages/torch/hub.py", line 611, in download_url_to_file
u = urlopen(req)
File "/usr/local/lib/python3.10/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.10/urllib/request.py", line 519, in open
response = self._open(req, data)
File "/usr/local/lib/python3.10/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/local/lib/python3.10/urllib/request.py", line 496, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.10/urllib/request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/usr/local/lib/python3.10/urllib/request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error Tunnel connection failed: 408 Request Timeout>
连接 hugging face 失败,国内访问不了 hugging face。可以考虑在海外部署。本地客户端可以在函数里面配置这个环境变量试试,HF_ENDPOINT=https://hf-mirror.com 此回答整理自钉群“【交流群】函数计算 AIGC 场景技术交流”
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。