mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
ComfyUI Plugin workflow run failed #608
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @austincityuwen on GitHub (Sep 1, 2025).
Self Checks
Dify version
1.8.0
Plugin version
0.2.5
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
When I use ComfyUI Workflow nodes in Dify, an error occured as it showed below
"An error occurred in the plugin, please contact the author of langgenius/comfyui/comfyui for help, error type: KeyError, error details: 'nodes'"
And my workflow json is:
✔️ Error log
No response
@dosubot[bot] commented on GitHub (Sep 1, 2025):
The ComfyUI plugin expects your workflow JSON to have a top-level
nodeskey (and usually alinkskey) for proper parsing and execution. If either is missing or malformed, you'll get aKeyError: 'nodes'like you saw. This requirement is enforced in the plugin code, and most operations depend on the correct structure of these fields reference.Recent plugin updates (including 0.2.5) removed problematic JSON preprocessing that could corrupt your workflow file, but the structure requirement remains reference. Double-check that your workflow JSON is valid and includes a top-level
nodesarray and alinksarray. If you exported your workflow from ComfyUI, make sure it wasn't altered or corrupted before uploading to Dify.If your JSON looks correct and you still see this error, try testing the workflow directly in ComfyUI to confirm it's valid. Also, ensure your ComfyUI server is up-to-date and compatible with the plugin version.
If you need an example, a minimal valid workflow JSON should look like:
If your workflow JSON matches this pattern and you still get the error, there may be a deeper compatibility or network issue reference.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@austincityuwen commented on GitHub (Sep 1, 2025):
But my workflow json is exported directly from comfyUI @dosu
@dosubot[bot] commented on GitHub (Sep 1, 2025):
If your workflow JSON is exported directly from ComfyUI but you still see a KeyError: 'nodes', there are a few likely causes:
The plugin requires the workflow to be exported using the "Save(API Format)" option in ComfyUI with Dev Mode enabled. If you use the regular export, the JSON may not have the required top-level
nodesandlinksarrays, even if it looks correct in the UI. Double-check that you used the API export method as described in the plugin docs reference.Network issues between Dify and your ComfyUI server can cause the plugin to receive an incomplete or empty workflow JSON, resulting in the missing
nodeskey error. This has been confirmed in similar cases—fixing network settings resolved the problem reference.JSON corruption can happen during upload or transfer, especially if the file is edited or processed by other tools. Make sure the file is unmodified after export and that it uses standard double quotes for keys and string values. Recent plugin versions (0.2.5+) removed problematic preprocessing that could corrupt JSON, but it's still important to check reference.
Ensure your ComfyUI server and plugin versions are compatible. The recommended ComfyUI server version is 0.3.33+ and plugin version is 0.2.5+ reference.
If all of the above check out and you still see the error, try running the workflow directly in ComfyUI to confirm it's valid, and consider sharing the raw JSON for further troubleshooting.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@austincityuwen commented on GitHub (Sep 1, 2025):
RAW json is {
"1": {
"inputs": {
"input_image": [
"2",
0
]
},
"class_type": "BackgroundEraseNetwork",
"_meta": {
"title": "Background Erase Network Image"
}
},
"2": {
"inputs": {
"image": "Snipaste_2024-07-25_13-41-38.png"
},
"class_type": "LoadImage",
"_meta": {
"title": "加载图像"
}
},
"3": {
"inputs": {
"images": [
"1",
0
]
},
"class_type": "PreviewImage",
"_meta": {
"title": "预览图像"
}
}
} it's valid to run in comfyui directly @dosu
@austincityuwen commented on GitHub (Sep 1, 2025):
Any one who have this problem with comfyui workflow?
@ss958 commented on GitHub (Sep 5, 2025):
The new version of Comfyui export API JSON does not have "nodes" or "links"
@yt-koike commented on GitHub (Sep 7, 2025):
Hello, @austincityuwen !
Thank you very much for reporting a bug. I'll be working on it.
@yt-koike commented on GitHub (Sep 7, 2025):
OK, I fixed it and verified it works with this workflow.
Please wait for the merge!