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

view comfyui log #534

Merged
merged 23 commits into from
Jan 19, 2024
Merged

view comfyui log #534

merged 23 commits into from
Jan 19, 2024

Conversation

doombeaker
Copy link
Contributor

@doombeaker doombeaker commented Jan 18, 2024

comfyui workflow 失败的情况,打印 comfyui 的运行日志。方便根据 CI 日志定位问题。

@doombeaker doombeaker changed the title view comfyui log by comfyui-manager view comfyui log Jan 18, 2024
Comment on lines 199 to 200
docker cp ${{ env.CONTAINER_NAME }}:/app/ComfyUI/onediff_comfyui.log .
cat ./onediff_comfyui.log && rm ./onediff_comfyui.log
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为什么不用 docker exec 直接 cat 呢

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,改了。昨天先用 docker exec -it 不行,就先用上面的土方法了

Comment on lines 187 to 189
docker cp ${{ env.CONTAINER_NAME }}:/app/ComfyUI/onediff_comfyui.log .
cat ./onediff_comfyui.log
rm ./onediff_comfyui.log
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

和下面重复

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

或者是我没想到更好的办法。但这个其实不重复,是我没得办法才写得这么冗余,因为:

  1. python3 test_by_ui.py 执行失败后,需要打印日志并退出
  2. 如果不在这里通过这种方法打印, python3 test_by_ui.py 失败后,CI 就提前结束了,后面的打印是没机会执行的
  3. 所以这里的逻辑是: python3 test_by_ui.py 成功,就不打印日志(等到后面会有专门打印的步骤);但是如果失败了,就需要在这里打印,并出错退出 CI

local workflow_name="$1"
docker exec -w /src/onediff/tests/comfyui ${{ env.CONTAINER_NAME }} python3 test_by_ui.py --comfy_port 8188 --workflow "$workflow_name" || {
docker exec ${{ env.CONTAINER_NAME }} cat /app/ComfyUI/onediff_comfyui.log
false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 false 是为了?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

哦哦,是为了报错

@jackalcooper jackalcooper enabled auto-merge (squash) January 19, 2024 15:00
@jackalcooper jackalcooper merged commit 6ffe342 into main Jan 19, 2024
5 checks passed
@jackalcooper jackalcooper deleted the add_comfyui_ci_log branch January 19, 2024 15:00
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

Successfully merging this pull request may close these issues.

2 participants