Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

中文报错 #44

Open
12441409 opened this issue Jan 8, 2024 · 3 comments
Open

中文报错 #44

12441409 opened this issue Jan 8, 2024 · 3 comments

Comments

@12441409
Copy link

12441409 commented Jan 8, 2024

Global seed set to 43304008
Traceback (most recent call last):
File "/root/anaconda3/envs/anytext/lib/python3.10/site-packages/gradio/queueing.py", line 407, in call_prediction
output = await route_utils.call_process_api(
File "/root/anaconda3/envs/anytext/lib/python3.10/site-packages/gradio/route_utils.py", line 226, in call_process_api
output = await app.get_blocks().process_api(
File "/root/anaconda3/envs/anytext/lib/python3.10/site-packages/gradio/blocks.py", line 1550, in process_api
result = await self.call_function(
File "/root/anaconda3/envs/anytext/lib/python3.10/site-packages/gradio/blocks.py", line 1185, in call_function
prediction = await anyio.to_thread.run_sync(
File "/root/anaconda3/envs/anytext/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/root/anaconda3/envs/anytext/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/root/anaconda3/envs/anytext/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/root/anaconda3/envs/anytext/lib/python3.10/site-packages/gradio/utils.py", line 661, in wrapper
response = f(*args, **kwargs)
File "/root/AnyText/demo.py", line 205, in process
raise gr.Error(rtn_warning)
gradio.exceptions.Error: 'You have input Chinese prompt but the translator is not loaded!'

@tyxsspa
Copy link
Owner

tyxsspa commented Jan 8, 2024

Hi, 你输入了中文prompt,但启动demo的命令并没有加载中译英的翻译模型。

@12441409
Copy link
Author

12441409 commented Jan 8, 2024

如何在启动命令加载模型呢? 请告诉我参数

@tyxsspa
Copy link
Owner

tyxsspa commented Jan 8, 2024

直接启动,默认是加载中译英模型的

export CUDA_VISIBLE_DEVICES=0 && python demo.py

检查下你是否使用了不加载翻译模型的指令:

export CUDA_VISIBLE_DEVICES=0 && python demo.py --no_translator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants