FastGPT
FastGPT copied to clipboard
kokoro报错huggingface_hub.errors.LocalEntryNotFoundError
例行检查
- [ ] 我已确认目前没有类似 issue
- [x] 我已完整查看过项目 README,以及项目文档
- [x] 我使用了自己的 key,并确认我的 key 是可正常使用的
- [x] 我理解并愿意跟进此 issue,协助测试和提供反馈
- [x] 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭
你的版本 V4.8.17
- [ ] 公有云版本
- [x] 私有部署版本, 具体版本号:
问题描述, 日志截图,配置文件等
使用fastgpt+oneapi+xinference部署TTS模型Kokoro
xinference
oneapi
fastgpt config
复现步骤 fastgpt调用TTS模型kokoro报错
fastgpt报错日志 [Info] 2025-02-12 02:04:00 [QA Queue] Done [Info] 2025-02-12 02:04:00 [Vector Queue] Done [Info] 2025-02-12 02:04:21 finish completions {"source":"fastgpt","teamId":"678de9d75f51feb1e6a25707","totalPoints":0} [Error] 2025-02-12 02:04:34 Api response error: undefined, bad response status code 500 (request id: 2025021202043455918785017681811) { message: '500 bad response status code 500 (request id: 2025021202043455918785017681811)', stack: 'Error: 500 bad response status code 500 (request id: 2025021202043455918785017681811)\n' + ' at aG.generate (/app/projects/app/.next/server/chunks/86337.js:20:87502)\n' + ' at pl.makeStatusError (/app/projects/app/.next/server/chunks/86337.js:20:79000)\n' + ' at pl.makeRequest (/app/projects/app/.next/server/chunks/86337.js:20:79923)\n' + ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' + ' at async i (/app/projects/app/.next/server/pages/api/core/chat/item/getSpeech.js:1:4538)\n' + ' at async m (/app/projects/app/.next/server/pages/api/core/chat/item/getSpeech.js:1:6609)\n' + ' at async K (/app/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js:20:16853)\n' + ' at async U.render (/app/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js:20:17492)\n' + ' at async NextNodeServer.runApi (/app/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/next/dist/server/next-server.js:600:9)\n' + ' at async NextNodeServer.handleCatchallRenderRequest (/app/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/next/dist/server/next-server.js:269:37)' } [Info] 2025-02-12 02:05:00 [QA Queue] Done [Info] 2025-02-12 02:05:00 [Vector Queue] Done 预期结果 可以正常调用TTS模型 相关截图 贴一个xinference报错日志 2025-02-11 18:06:16,864 xinference.core.supervisor 110 DEBUG [request f1803944-e8e5-11ef-bc25-0242ac110002] Enter get_model, args: <xinference.core.supervisor.SupervisorActor object at 0x72587e69d120>,Kokoro, kwargs: 2025-02-11 18:06:16,864 xinference.core.worker 110 DEBUG Enter get_model, args: <xinference.core.worker.WorkerActor object at 0x72587e69f5b0>, kwargs: model_uid=Kokoro-0 2025-02-11 18:06:16,864 xinference.core.worker 110 DEBUG Leave get_model, elapsed time: 0 s 2025-02-11 18:06:16,865 xinference.core.supervisor 110 DEBUG [request f1803944-e8e5-11ef-bc25-0242ac110002] Leave get_model, elapsed time: 0 s 2025-02-11 18:06:16,865 xinference.core.model 690 DEBUG Request speech, current serve request count: 0, request limit: inf for the model Kokoro-0 2025-02-11 18:06:16,866 xinference.core.model 690 DEBUG [request f18089b2-e8e5-11ef-944c-0242ac110002] Enter speech, args: ModelActor(Kokoro-0), kwargs: input=你好👋!我是人工智能助手,很高兴见到你,有什么可以帮助你的吗?,voice=af_alloy,response_format=mp3,speed=1.0,stream=False 2025-02-11 18:06:16,866 xinference.model.audio.kokoro 690 INFO Using custom voice pt: af_alloy 2025-02-11 18:06:16,866 xinference.model.audio.kokoro 690 INFO Speech kwargs: {} 2025-02-11 18:06:26,905 xinference.core.model 690 ERROR [request f18089b2-e8e5-11ef-944c-0242ac110002] Leave speech, error: An error happened while trying to locate the file on the Hub and we cannot find the requested files in the local cache. Please check your connection and try again or make sure your Internet connection is on., elapsed time: 10 s Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 203, in _new_conn sock = connection.create_connection( File "/usr/local/lib/python3.10/dist-packages/urllib3/util/connection.py", line 85, in create_connection raise err File "/usr/local/lib/python3.10/dist-packages/urllib3/util/connection.py", line 73, in create_connection sock.connect(sa) OSError: [Errno 101] Network is unreachable
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 791, in urlopen response = self._make_request( File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 492, in _make_request raise new_e File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 468, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 1097, in _validate_conn conn.connect() File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 611, in connect self.sock = sock = self._new_conn() File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 218, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x78171d58ebf0>: Failed to establish a new connection: [Errno 101] Network is unreachable
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 667, in send resp = conn.urlopen( File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 845, in urlopen retries = retries.increment( File "/usr/local/lib/python3.10/dist-packages/urllib3/util/retry.py", line 515, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /hexgrad/Kokoro-82M/resolve/main/voices/af_alloy.pt (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x78171d58ebf0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 1374, in _get_metadata_or_catch_error metadata = get_hf_file_metadata( File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn return fn(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 1294, in get_hf_file_metadata r = _request_wrapper( File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 278, in _request_wrapper response = _request_wrapper( File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 301, in _request_wrapper response = get_session().request(method=method, url=url, **params) File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_http.py", line 93, in send return super().send(request, *args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 700, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /hexgrad/Kokoro-82M/resolve/main/voices/af_alloy.pt (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x78171d58ebf0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))"), '(Request ID: 49bdbcd7-d20d-4dca-94ce-1ac559a081d7)')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/xinference/core/utils.py", line 94, in wrapped
ret = await func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/xinference/core/model.py", line 976, in speech
return await self._call_wrapper_binary(
File "/usr/local/lib/python3.10/dist-packages/xinference/core/model.py", line 623, in _call_wrapper_binary
return await self._call_wrapper("binary", fn, *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/xinference/core/model.py", line 141, in _async_wrapper
return await fn(self, *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/xinference/core/model.py", line 645, in _call_wrapper
ret = await asyncio.to_thread(fn, *args, **kwargs)
File "/usr/lib/python3.10/asyncio/threads.py", line 25, in to_thread
return await loop.run_in_executor(None, func_call)
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/dist-packages/xinference/model/audio/kokoro.py", line 127, in speech
results = list(generator)
File "/usr/local/lib/python3.10/dist-packages/kokoro/pipeline.py", line 351, in call
pack = self.load_voice(voice).to(model.device) if model else None
File "/usr/local/lib/python3.10/dist-packages/kokoro/pipeline.py", line 153, in load_voice
packs = [self.load_single_voice(v) for v in voice.split(delimiter)]
File "/usr/local/lib/python3.10/dist-packages/kokoro/pipeline.py", line 153, in