Skip to content

Display progress and result URL directly on API nodes #8102

Merged
comfyanonymous merged 3 commits intoComfy-Org:masterfrom
christian-byrne:print-result-on-api-nodes
May 14, 2025
Merged

Display progress and result URL directly on API nodes #8102
comfyanonymous merged 3 commits intoComfy-Org:masterfrom
christian-byrne:print-result-on-api-nodes

Conversation

@christian-byrne
Copy link
Contributor

For all API nodes that return a download URL, display the URL directly on the node as soon as it is available. This can benefit users who use an API node to generate something successfuly, but an error occurs before they can see the result in the queue sidebar or downstream save node. If the user does not have access to the logs for whatever reason, this may be their only recourse when encountering an error.

Examples:

Selection_1388

Selection_1373

See how it looks for all API nodes by opening this zip which contains test results from running with all relevant API nodes.

@christian-byrne
Copy link
Contributor Author

Wait a moment, the cherry picking was incorrect

…Comfy-Org#177)

[Veo] Print download URL of successful task result directly on nodes (Comfy-Org#184)

[Recraft] Print download URL of successful task result directly on nodes (Comfy-Org#183)

[Pixverse] Print download URL of successful task result directly on nodes (Comfy-Org#182)

[Kling] Print download URL of successful task result directly on nodes (Comfy-Org#181)

[MiniMax] Print progress text and download URL of successful task result directly on nodes (Comfy-Org#179)

[Docs] Link to docs in `API_NODE` class property type annotation comment (Comfy-Org#178)

[Ideogram] Print download URL of successful task result directly on nodes (Comfy-Org#176)

[Kling] Print download URL of successful task result directly on nodes (Comfy-Org#181)

[Veo] Print download URL of successful task result directly on nodes (Comfy-Org#184)

[Recraft] Print download URL of successful task result directly on nodes (Comfy-Org#183)

[Pixverse] Print download URL of successful task result directly on nodes (Comfy-Org#182)

[MiniMax] Print progress text and download URL of successful task result directly on nodes (Comfy-Org#179)

[Docs] Link to docs in `API_NODE` class property type annotation comment (Comfy-Org#178)

[Luma] Print download URL of successful task result directly on nodes (Comfy-Org#177)

[Ideogram] Print download URL of successful task result directly on nodes (Comfy-Org#176)

Show output URL and progress text on Pika nodes (Comfy-Org#168)

[BFL] Print download URL of successful task result directly on nodes (Comfy-Org#175)

[OpenAI ] Print download URL of successful task result directly on nodes (Comfy-Org#174)
@christian-byrne christian-byrne force-pushed the print-result-on-api-nodes branch from cc50a44 to c8ea025 Compare May 14, 2025 01:24
@christian-byrne
Copy link
Contributor Author

christian-byrne commented May 14, 2025

Fixed test failure that doesn't occur in 3.12:

Checkpoint files will always be loaded safely.
Total VRAM 15990 MB, total RAM 15990 MB
pytorch version: 2.7.0+cpu
Set vram state to: DISABLED
Device: cpu
Using sub quadratic optimization for attention, if you have memory or speed issues try using: --use-split-cross-attention
Python version: 3.10.17 (main, Apr  8 2025, 21:28:33) [GCC 13.3.0]
ComfyUI version: 0.3.34
****** User settings have been changed to be stored on the server instead of browser storage. ******
****** For multi-user setups add the --multi-user CLI argument to enable multiple user profiles. ******
ComfyUI frontend version: 1.19.9
[Prompt Server] web root: /opt/hostedtoolcache/Python/3.10.17/x64/lib/python3.10/site-packages/comfyui_frontend_package/static
Traceback (most recent call last):
  File "/home/runner/work/ComfyUI/ComfyUI/ComfyUI/nodes.py", line 2131, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 879, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1017, in get_code
  File "<frozen importlib._bootstrap_external>", line 947, in source_to_code
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/runner/work/ComfyUI/ComfyUI/ComfyUI/comfy_api_nodes/nodes_recraft.py", line 450
    f"Result URL: {'\n'.join(urls)}", unique_id
                                    ^
SyntaxError: f-string expression part cannot include a backslash

Cannot import /home/runner/work/ComfyUI/ComfyUI/ComfyUI/comfy_api_nodes/nodes_recraft.py module for custom nodes: f-string expression part cannot include a backslash (nodes_recraft.py, line 450)

Import times for custom nodes:
   0.0 seconds: /home/runner/work/ComfyUI/ComfyUI/ComfyUI/custom_nodes/websocket_image_save.py

WARNING: some comfy_api_nodes/ nodes did not import correctly. This may be because they are missing some dependencies.

IMPORT FAILED: nodes_recraft.py

This issue might be caused by new missing dependencies added the last time you updated ComfyUI.
Please do a: pip install -r requirements.txt

Starting server

To see the GUI go to: http://127.0.0.1:8188

@comfyanonymous comfyanonymous merged commit 98ff01e into Comfy-Org:master May 14, 2025
5 checks passed
@christian-byrne christian-byrne deleted the print-result-on-api-nodes branch May 14, 2025 04:36
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