tyxsspa / AnyText

Official implementation code of the paper <AnyText: Multilingual Visual Text Generation And Editing>
Apache License 2.0
4.31k stars 282 forks source link

中文报错 #44

Open 12441409 opened 10 months ago

12441409 commented 10 months ago

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 commented 10 months ago

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

12441409 commented 10 months ago

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

tyxsspa commented 10 months ago

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

export CUDA_VISIBLE_DEVICES=0 && python demo.py

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

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