Tencent / HunyuanDiT

Hunyuan-DiT : A Powerful Multi-Resolution Diffusion Transformer with Fine-Grained Chinese Understanding
https://dit.hunyuan.tencent.com/
Other
2.63k stars 190 forks source link

启动 multiTurnT2I_app.py,在UI中输入提示词,点击提交后,出现错误 #54

Closed yhqqxq closed 1 month ago

yhqqxq commented 1 month ago

请问一下,如何解决? input history:[] Traceback (most recent call last): File "G:\AI\ZHB\HunyuanDiT\env\lib\site-packages\gradio\routes.py", line 534, in predict output = await route_utils.call_process_api( File "G:\AI\ZHB\HunyuanDiT\env\lib\site-packages\gradio\route_utils.py", line 226, in call_process_api output = await app.get_blocks().process_api( File "G:\AI\ZHB\HunyuanDiT\env\lib\site-packages\gradio\blocks.py", line 1550, in process_api result = await self.call_function( File "G:\AI\ZHB\HunyuanDiT\env\lib\site-packages\gradio\blocks.py", line 1185, in call_function prediction = await anyio.to_thread.run_sync( File "G:\AI\ZHB\HunyuanDiT\env\lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( File "G:\AI\ZHB\HunyuanDiT\env\lib\site-packages\anyio_backends_asyncio.py", line 2144, in run_sync_in_worker_thread return await future File "G:\AI\ZHB\HunyuanDiT\env\lib\site-packages\anyio_backends_asyncio.py", line 851, in run result = context.run(func, args) File "G:\AI\ZHB\HunyuanDiT\env\lib\site-packages\gradio\utils.py", line 661, in wrapper response = f(args, **kwargs) File "G:\AI\ZHB\HunyuanDiT\app\multiTurnT2I_app.py", line 115, in pipeline response, history_messages = enhancer(input_text, return_history=True, history=history_messages, skip_special=False)

yestinl commented 1 month ago

@yhqqxq 能否粘贴完整的报错内容,以及运行以下命令看一下你的运行环境 Can you paste the complete error message and run the following command to see your operating environment?

python utils/collect_env.py

yhqqxq commented 1 month ago

@yestinl 上面的就是完整的报错内容,就只有这些。 运行环境如下: sys.platform: win32 Python: 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:40:08) [MSC v.1938 64 bit (AMD64)] CUDA available: True MUSA available: False numpy_random_seed: 2147483648 GPU 0: NVIDIA GeForce RTX 3060 CUDA_HOME: D:\SystemTool\CUDA NVCC: Cuda compilation tools, release 12.2, V12.2.140 MSVC: 用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.39.33523 版 GCC: n/a PyTorch: 2.1.0+cu121 PyTorch compiling details: PyTorch built with:

TorchVision: 0.16.0+cu121

yestinl commented 1 month ago

@yhqqxq 你的环境是通过我们提供的脚本安装的吗?以及你的gradio版本是多少。这边建议用gradio==3.50.2

yhqqxq commented 1 month ago

@yestinl 是用你们的脚本安装的,gradio也没问题,hydit_app.py这个是可以正常使用的,multiTurnT2I_app.py就不行

yestinl commented 1 month ago

@yhqqxq 能提供你完整的运行脚本吗?包括hydit_app.py和multiTurnT2I_app.py的。 以及你的3060显卡显存多大?如果想使用multiTurnT2I_app至少要22G显存(指定4bit 量化的模式),如果没有指定的话需要32g显存。顺便能否pip list 打印一下你安装包的版本。

yhqqxq commented 1 month ago

multiTurnT2I_app,使用这个必须要22G显存吗?我这边只有12G,如果是因为这个原因,那确实就没办法继续尝试了

yestinl commented 1 month ago

@yhqqxq 是的,现阶段至少22G显存。如果你想体验多轮绘图能力,也可以进入混元助手中体验

weiguang3100 commented 1 month ago

我的3090 24G也是报这个错误,To create a public link, set share=True in launch(). input history:[] Traceback (most recent call last): File "E:\wwg\work\allinone\HunyuanDiT\env\lib\site-packages\gradio\queueing.py", line 527, in process_events response = await route_utils.call_process_api( File "E:\wwg\work\allinone\HunyuanDiT\env\lib\site-packages\gradio\route_utils.py", line 270, in call_process_api output = await app.get_blocks().process_api( File "E:\wwg\work\allinone\HunyuanDiT\env\lib\site-packages\gradio\blocks.py", line 1887, in process_api result = await self.call_function( File "E:\wwg\work\allinone\HunyuanDiT\env\lib\site-packages\gradio\blocks.py", line 1472, in call_function prediction = await anyio.to_thread.run_sync( File "E:\wwg\work\allinone\HunyuanDiT\env\lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( File "E:\wwg\work\allinone\HunyuanDiT\env\lib\site-packages\anyio_backends_asyncio.py", line 2144, in run_sync_in_worker_thread return await future File "E:\wwg\work\allinone\HunyuanDiT\env\lib\site-packages\anyio_backends_asyncio.py", line 851, in run result = context.run(func, args) File "E:\wwg\work\allinone\HunyuanDiT\env\lib\site-packages\gradio\utils.py", line 808, in wrapper response = f(args, **kwargs) File "E:\wwg\work\allinone\HunyuanDiT\app\multiTurnT2I_app.py", line 115, in pipeline response, history_messages = enhancer(input_text, return_history=True, history=history_messages, skip_special=False) TypeError: DialogGen.call() got an unexpected keyword argument 'return_history' 启动脚本是 app/multiTurnT2I_app.py --load-4bit

yestinl commented 1 month ago

@weiguang3100 请问已经更新最新的代码了吗

weiguang3100 commented 1 month ago

是的,之前fork的,git pull不行,我手动下载的

yestinl commented 1 month ago

@weiguang3100 我们最新代码已经增加了‘return_history’的参数,应该不会报TypeError: DialogGen.call() got an unexpected keyword argument 'return_history'错误。检查一下代码是否一致

https://github.com/ggtony/HunyuanDiT/blob/main/dialoggen/dialoggen_demo.py#L156

weiguang3100 commented 1 month ago

@yestinl 可以了,我全部覆盖一下,可能是上次没覆盖完,我windows上跑的,可以运行了

yestinl commented 1 month ago

@weiguang3100 好的~希望我们的工作对你有帮助!

weiguang3100 commented 1 month ago

多谢,很棒

yhqqxq commented 1 month ago

@yestinl 好的,明白了,感谢