dify's comfyui tool cant read file variable, timeout #650

Closed
opened 2026-02-16 10:20:04 -05:00 by yindo · 6 comments
Owner

Originally created by @matrix12315 on GitHub (Sep 16, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues Dify issues & Dify Official Plugins, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.6.0

Plugin version

0.2.5

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Steps to Reproduce

I have used text2img workflow, it works, so the comfyui configuration is right.

1. use img2img "workflow" node of comfyui tool

Image

2. input comfyui's img2img json api

{
  "3": {
    "inputs": {
      "seed": 601685180812477,
      "steps": 20,
      "cfg": 2.5,
      "sampler_name": "euler",
      "scheduler": "simple",
      "denoise": 1,
      "model": [
        "75",
        0
      ],
      "positive": [
        "76",
        0
      ],
      "negative": [
        "77",
        0
      ],
      "latent_image": [
        "88",
        0
      ]
    },
    "class_type": "KSampler",
    "_meta": {
      "title": "KSampler"
    }
  },
  "8": {
    "inputs": {
      "samples": [
        "3",
        0
      ],
      "vae": [
        "39",
        0
      ]
    },
    "class_type": "VAEDecode",
    "_meta": {
      "title": "VAE Decode"
    }
  },
  "37": {
    "inputs": {
      "unet_name": "qwen_image_edit_fp8_e4m3fn.safetensors",
      "weight_dtype": "default"
    },
    "class_type": "UNETLoader",
    "_meta": {
      "title": "Load Diffusion Model"
    }
  },
  "38": {
    "inputs": {
      "clip_name": "qwen_2.5_vl_7b_fp8_scaled.safetensors",
      "type": "qwen_image",
      "device": "default"
    },
    "class_type": "CLIPLoader",
    "_meta": {
      "title": "Load CLIP"
    }
  },
  "39": {
    "inputs": {
      "vae_name": "qwen_image_vae.safetensors"
    },
    "class_type": "VAELoader",
    "_meta": {
      "title": "Load VAE"
    }
  },
  "60": {
    "inputs": {
      "filename_prefix": "ComfyUI",
      "images": [
        "8",
        0
      ]
    },
    "class_type": "SaveImage",
    "_meta": {
      "title": "Save Image"
    }
  },
  "66": {
    "inputs": {
      "shift": 3,
      "model": [
        "37",
        0
      ]
    },
    "class_type": "ModelSamplingAuraFlow",
    "_meta": {
      "title": "ModelSamplingAuraFlow"
    }
  },
  "75": {
    "inputs": {
      "strength": 1,
      "model": [
        "66",
        0
      ]
    },
    "class_type": "CFGNorm",
    "_meta": {
      "title": "CFGNorm"
    }
  },
  "76": {
    "inputs": {
      "prompt": "{{#llm.text#}}",
      "clip": [
        "38",
        0
      ],
      "vae": [
        "39",
        0
      ],
      "image": [
        "93",
        0
      ]
    },
    "class_type": "TextEncodeQwenImageEdit",
    "_meta": {
      "title": "TextEncodeQwenImageEdit"
    }
  },
  "77": {
    "inputs": {
      "prompt": "",
      "clip": [
        "38",
        0
      ],
      "vae": [
        "39",
        0
      ],
      "image": [
        "93",
        0
      ]
    },
    "class_type": "TextEncodeQwenImageEdit",
    "_meta": {
      "title": "TextEncodeQwenImageEdit"
    }
  },
  "78": {
    "inputs": {
      "image": ""
    },
    "class_type": "LoadImage",
    "_meta": {
      "title": "Load Image"
    }
  },
  "88": {
    "inputs": {
      "pixels": [
        "93",
        0
      ],
      "vae": [
        "39",
        0
      ]
    },
    "class_type": "VAEEncode",
    "_meta": {
      "title": "VAE Encode"
    }
  },
  "93": {
    "inputs": {
      "upscale_method": "lanczos",
      "megapixels": 1,
      "image": [
        "78",
        0
      ]
    },
    "class_type": "ImageScaleToTotalPixels",
    "_meta": {
      "title": "Scale Image to Total Pixels"
    }
  }
}

3. select sys.files variable and basic settings

Image

4. run work flow and fail beacuse the sys.files has values

Run failed: Failed to transform tool message: PluginInvokeError: {"args":{},"error_type":"ConnectTimeout","message":"timed out"}

Image

5. run work flow and success after reset sys.files, but it doest meet my requirements of edit image in this situation.

Image

✔️ Error log

Run failed: Failed to transform tool message: PluginInvokeError: {"args":{},"error_type":"ConnectTimeout","message":"timed out"}

Originally created by @matrix12315 on GitHub (Sep 16, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.6.0 ### Plugin version 0.2.5 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ### Steps to Reproduce ### I have used text2img workflow, it works, so the comfyui configuration is right. ### 1. use img2img "workflow" node of comfyui tool <img width="2401" height="1271" alt="Image" src="https://github.com/user-attachments/assets/a677e776-bccf-468f-87b0-43e2d06d2732" /> # 2. input comfyui's img2img json api > { >   "3": { >     "inputs": { >       "seed": 601685180812477, >       "steps": 20, >       "cfg": 2.5, >       "sampler_name": "euler", >       "scheduler": "simple", >       "denoise": 1, >       "model": [ >         "75", >         0 >       ], >       "positive": [ >         "76", >         0 >       ], >       "negative": [ >         "77", >         0 >       ], >       "latent_image": [ >         "88", >         0 >       ] >     }, >     "class_type": "KSampler", >     "_meta": { >       "title": "KSampler" >     } >   }, >   "8": { >     "inputs": { >       "samples": [ >         "3", >         0 >       ], >       "vae": [ >         "39", >         0 >       ] >     }, >     "class_type": "VAEDecode", >     "_meta": { >       "title": "VAE Decode" >     } >   }, >   "37": { >     "inputs": { >       "unet_name": "qwen_image_edit_fp8_e4m3fn.safetensors", >       "weight_dtype": "default" >     }, >     "class_type": "UNETLoader", >     "_meta": { >       "title": "Load Diffusion Model" >     } >   }, >   "38": { >     "inputs": { >       "clip_name": "qwen_2.5_vl_7b_fp8_scaled.safetensors", >       "type": "qwen_image", >       "device": "default" >     }, >     "class_type": "CLIPLoader", >     "_meta": { >       "title": "Load CLIP" >     } >   }, >   "39": { >     "inputs": { >       "vae_name": "qwen_image_vae.safetensors" >     }, >     "class_type": "VAELoader", >     "_meta": { >       "title": "Load VAE" >     } >   }, >   "60": { >     "inputs": { >       "filename_prefix": "ComfyUI", >       "images": [ >         "8", >         0 >       ] >     }, >     "class_type": "SaveImage", >     "_meta": { >       "title": "Save Image" >     } >   }, >   "66": { >     "inputs": { >       "shift": 3, >       "model": [ >         "37", >         0 >       ] >     }, >     "class_type": "ModelSamplingAuraFlow", >     "_meta": { >       "title": "ModelSamplingAuraFlow" >     } >   }, >   "75": { >     "inputs": { >       "strength": 1, >       "model": [ >         "66", >         0 >       ] >     }, >     "class_type": "CFGNorm", >     "_meta": { >       "title": "CFGNorm" >     } >   }, >   "76": { >     "inputs": { >       "prompt": "{{#llm.text#}}", >       "clip": [ >         "38", >         0 >       ], >       "vae": [ >         "39", >         0 >       ], >       "image": [ >         "93", >         0 >       ] >     }, >     "class_type": "TextEncodeQwenImageEdit", >     "_meta": { >       "title": "TextEncodeQwenImageEdit" >     } >   }, >   "77": { >     "inputs": { >       "prompt": "", >       "clip": [ >         "38", >         0 >       ], >       "vae": [ >         "39", >         0 >       ], >       "image": [ >         "93", >         0 >       ] >     }, >     "class_type": "TextEncodeQwenImageEdit", >     "_meta": { >       "title": "TextEncodeQwenImageEdit" >     } >   }, >   "78": { >     "inputs": { >       "image": "" >     }, >     "class_type": "LoadImage", >     "_meta": { >       "title": "Load Image" >     } >   }, >   "88": { >     "inputs": { >       "pixels": [ >         "93", >         0 >       ], >       "vae": [ >         "39", >         0 >       ] >     }, >     "class_type": "VAEEncode", >     "_meta": { >       "title": "VAE Encode" >     } >   }, >   "93": { >     "inputs": { >       "upscale_method": "lanczos", >       "megapixels": 1, >       "image": [ >         "78", >         0 >       ] >     }, >     "class_type": "ImageScaleToTotalPixels", >     "_meta": { >       "title": "Scale Image to Total Pixels" >     } >   } > } ### 3. select sys.files variable and basic settings <img width="838" height="1431" alt="Image" src="https://github.com/user-attachments/assets/77173e4b-2254-40ae-98e9-0922e525b437" /> ### 4. run work flow and fail beacuse the sys.files has values Run failed: Failed to transform tool message: PluginInvokeError: {"args":{},"error_type":"ConnectTimeout","message":"timed out"} <img width="3199" height="1732" alt="Image" src="https://github.com/user-attachments/assets/818f536c-1021-4f3b-a5c7-6d5eef635b91" /> ### 5. run work flow and success after reset sys.files, but it doest meet my requirements of edit image in this situation. <img width="3199" height="1760" alt="Image" src="https://github.com/user-attachments/assets/c5104b2c-a2cf-423c-bbca-b0ca615fcaa4" /> ### ✔️ Error log Run failed: Failed to transform tool message: PluginInvokeError: {"args":{},"error_type":"ConnectTimeout","message":"timed out"}
yindo added the bug label 2026-02-16 10:20:04 -05:00
yindo closed this issue 2026-02-16 10:20:04 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 16, 2025):

The most common reason ComfyUI workflows in Dify can't read the sys.files variable is that sys.files is an Array[File], not a single File. You need to add a "list filter" node in your workflow to process the array before passing it to ComfyUI—otherwise, the workflow can't handle the file input correctly [source].

Timeout errors like PluginInvokeError: ConnectTimeout are usually caused by Docker network or environment misconfiguration. Make sure your FILES_URL is set to an externally accessible address (like http://host.docker.internal) in your .env file, and restart your containers after updating. Also, check that your ComfyUI service address is correct and both services can reach each other [source] [source].

If your workflow still fails, try increasing the timeout settings in your docker-compose.yaml (CODE_EXECUTION_CONNECT_TIMEOUT, CODE_EXECUTION_READ_TIMEOUT, CODE_EXECUTION_WRITE_TIMEOUT, WORKFLOW_MAX_EXECUTION_TIME) to allow more time for image processing [source].

Also, make sure your images are in supported formats (JPG, JPEG, PNG, GIF, WEBP, SVG), and that you are not trying to parse files in a Code node, which is not supported [source].

If possible, upgrade to the latest ComfyUI plugin (0.2.6+)—recent updates improved connection handling and error reporting, which may help with file variable issues [source].

Let me know if you need more details on any of these steps!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Sep 16, 2025): <!-- Answer --> The most common reason ComfyUI workflows in Dify can't read the `sys.files` variable is that `sys.files` is an Array[File], not a single File. You need to add a "list filter" node in your workflow to process the array before passing it to ComfyUI—otherwise, the workflow can't handle the file input correctly [[source]](https://github.com/langgenius/dify/issues/11644). Timeout errors like `PluginInvokeError: ConnectTimeout` are usually caused by Docker network or environment misconfiguration. Make sure your `FILES_URL` is set to an externally accessible address (like `http://host.docker.internal`) in your `.env` file, and restart your containers after updating. Also, check that your ComfyUI service address is correct and both services can reach each other [[source]](https://github.com/langgenius/dify-official-plugins/issues/387) [[source]](https://github.com/langgenius/dify/issues/20274). If your workflow still fails, try increasing the timeout settings in your `docker-compose.yaml` (`CODE_EXECUTION_CONNECT_TIMEOUT`, `CODE_EXECUTION_READ_TIMEOUT`, `CODE_EXECUTION_WRITE_TIMEOUT`, `WORKFLOW_MAX_EXECUTION_TIME`) to allow more time for image processing [[source]](https://github.com/langgenius/dify/issues/20274). Also, make sure your images are in supported formats (JPG, JPEG, PNG, GIF, WEBP, SVG), and that you are not trying to parse files in a Code node, which is not supported [[source]](https://github.com/langgenius/dify/issues/14257). If possible, upgrade to the latest ComfyUI plugin (0.2.6+)—recent updates improved connection handling and error reporting, which may help with file variable issues [[source]](https://github.com/langgenius/dify-official-plugins/pull/1676). Let me know if you need more details on any of these steps! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/9b27b6d0-2d2b-4154-95bb-51f3e209410e?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/9b27b6d0-2d2b-4154-95bb-51f3e209410e?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/9b27b6d0-2d2b-4154-95bb-51f3e209410e?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/9b27b6d0-2d2b-4154-95bb-51f3e209410e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/9b27b6d0-2d2b-4154-95bb-51f3e209410e?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/9b27b6d0-2d2b-4154-95bb-51f3e209410e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/9b27b6d0-2d2b-4154-95bb-51f3e209410e?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/1718)
Author
Owner

@matrix12315 commented on GitHub (Sep 16, 2025):

my yml file

comfyuiBUG.yml

@matrix12315 commented on GitHub (Sep 16, 2025): my yml file [comfyuiBUG.yml](https://github.com/user-attachments/files/22359002/comfyuiBUG.yml)
Author
Owner

@matrix12315 commented on GitHub (Sep 16, 2025):

@dosu I need a human engineer please, all the solution you provided doesnt work

@matrix12315 commented on GitHub (Sep 16, 2025): @dosu I need a human engineer please, all the solution you provided doesnt work
Author
Owner

@dosubot[bot] commented on GitHub (Sep 16, 2025):

I understand this is frustrating. As an AI, I can't provide direct human engineering support, but I can help you troubleshoot further.

Based on recent plugin updates and code analysis, your issue is likely caused by either a malformed workflow JSON (missing required 'nodes' or 'links' arrays), improper file variable mapping, or a network/configuration problem between Dify and ComfyUI. The ComfyUI plugin expects the workflow JSON to have a top-level nodes array and usually a links array—if either is missing or malformed, you'll get errors or timeouts. Make sure you export your workflow from ComfyUI using the "Save(API Format)" option with Dev Mode enabled, and do not edit the JSON before uploading it to Dify. Regular exports may not include the required structure, which can break the plugin [source].

Timeout errors like PluginInvokeError: ConnectTimeout are often caused by Docker network misconfiguration or an inaccessible FILES_URL. Double-check that your .env file sets FILES_URL to an externally accessible address (like http://host.docker.internal) and that both Dify and ComfyUI containers can reach each other. Restart your containers after making changes [source].

If you are still on plugin version 0.2.5, upgrade to 0.2.6—recent fixes directly address connection handling, workflow parsing, and file variable mapping issues that could cause exactly this kind of failure [source].

If none of these steps resolve the problem, please share the raw content of your comfyuiBUG.yml (copy-paste the YAML/JSON here) so I can inspect it for missing structure or mapping errors. If you have any additional error logs or details about your Docker/network setup, that would also help pinpoint the issue.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Sep 16, 2025): <!-- Answer --> I understand this is frustrating. As an AI, I can't provide direct human engineering support, but I can help you troubleshoot further. Based on recent plugin updates and code analysis, your issue is likely caused by either a malformed workflow JSON (missing required 'nodes' or 'links' arrays), improper file variable mapping, or a network/configuration problem between Dify and ComfyUI. The ComfyUI plugin expects the workflow JSON to have a top-level `nodes` array and usually a `links` array—if either is missing or malformed, you'll get errors or timeouts. Make sure you export your workflow from ComfyUI using the "Save(API Format)" option with Dev Mode enabled, and do not edit the JSON before uploading it to Dify. Regular exports may not include the required structure, which can break the plugin [[source]](https://github.com/langgenius/dify-official-plugins/issues/1627#issuecomment-3243601681). Timeout errors like `PluginInvokeError: ConnectTimeout` are often caused by Docker network misconfiguration or an inaccessible FILES_URL. Double-check that your `.env` file sets `FILES_URL` to an externally accessible address (like `http://host.docker.internal`) and that both Dify and ComfyUI containers can reach each other. Restart your containers after making changes [[source]](https://github.com/langgenius/dify-official-plugins/issues/387). If you are still on plugin version 0.2.5, upgrade to 0.2.6—recent fixes directly address connection handling, workflow parsing, and file variable mapping issues that could cause exactly this kind of failure [[source]](https://github.com/langgenius/dify-official-plugins/pull/1676). If none of these steps resolve the problem, please share the raw content of your comfyuiBUG.yml (copy-paste the YAML/JSON here) so I can inspect it for missing structure or mapping errors. If you have any additional error logs or details about your Docker/network setup, that would also help pinpoint the issue. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/b376b884-f1b9-4bf9-a9fa-697ff15e7bec?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/b376b884-f1b9-4bf9-a9fa-697ff15e7bec?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/b376b884-f1b9-4bf9-a9fa-697ff15e7bec?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/b376b884-f1b9-4bf9-a9fa-697ff15e7bec?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b376b884-f1b9-4bf9-a9fa-697ff15e7bec?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/b376b884-f1b9-4bf9-a9fa-697ff15e7bec?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b376b884-f1b9-4bf9-a9fa-697ff15e7bec?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/1718)
Author
Owner

@matrix12315 commented on GitHub (Sep 16, 2025):

@dosu
app:
description: ''
icon: 🤖
icon_background: '#FFEAD5'
mode: advanced-chat
name: comfyuiBUG
use_icon_as_answer_icon: false
dependencies:

  • current_identifier: null
    type: marketplace
    value:
    marketplace_plugin_unique_identifier: langgenius/comfyui:0.2.5@f0964db9c1927196b74a487ce119b8d7dba85ca040ffc46e3e848e81283618a2
    kind: app
    version: 0.3.0
    workflow:
    conversation_variables: []
    environment_variables: []
    features:
    file_upload:
    allowed_file_extensions:
    - .JPG
    - .JPEG
    - .PNG
    - .GIF
    - .WEBP
    - .SVG
    allowed_file_types:
    - image
    allowed_file_upload_methods:
    - remote_url
    - local_file
    enabled: true
    number_limits: 3
    opening_statement: ''
    retriever_resource:
    enabled: true
    sensitive_word_avoidance:
    enabled: false
    speech_to_text:
    enabled: false
    suggested_questions: []
    suggested_questions_after_answer:
    enabled: false
    text_to_speech:
    enabled: false
    language: ''
    voice: ''
    graph:
    edges:
    • data:
      isInIteration: false
      isInLoop: false
      sourceType: start
      targetType: tool
      id: 1757993451564-source-1757993493409-target
      source: '1757993451564'
      sourceHandle: source
      target: '1757993493409'
      targetHandle: target
      type: custom
      zIndex: 0
    • data:
      isInLoop: false
      sourceType: tool
      targetType: answer
      id: 1757993493409-source-answer-target
      source: '1757993493409'
      sourceHandle: source
      target: answer
      targetHandle: target
      type: custom
      zIndex: 0
      nodes:
    • data:
      desc: ''
      selected: false
      title: Start
      type: start
      variables:
      • allowed_file_extensions: []
        allowed_file_types:
        • image
          allowed_file_upload_methods:
        • local_file
        • remote_url
          label: edit
          max_length: 5
          options: []
          required: false
          type: file
          variable: edit
          height: 90
          id: '1757993451564'
          position:
          x: 12.680492111556532
          y: 296
          positionAbsolute:
          x: 12.680492111556532
          y: 296
          selected: false
          sourcePosition: right
          targetPosition: left
          type: custom
          width: 244
    • data:
      answer: '{{#1757993493409.files#}}'
      desc: ''
      selected: false
      title: Answer
      type: answer
      variables: []
      height: 104
      id: answer
      position:
      x: 680
      y: 282
      positionAbsolute:
      x: 680
      y: 282
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    • data:
      desc: ''
      is_team_authorization: true
      output_schema: null
      paramSchemas:
      • auto_generate: null
        default: null
        form: llm
        human_description:
        en_US: exported from ComfyUI workflow
        ja_JP: ComfyUI よりエクスポートされたワークフロー
        pt_BR: exported from ComfyUI workflow
        zh_Hans: 从ComfyUI的工作流中导出
        label:
        en_US: Workflow JSON
        ja_JP: ワークフロー JSON
        pt_BR: Workflow JSON
        zh_Hans: Workflow JSON
        llm_description: ''
        max: null
        min: null
        name: workflow_json
        options: []
        placeholder: null
        precision: null
        required: true
        scope: null
        template: null
        type: string
      • auto_generate: null
        default: null
        form: llm
        human_description:
        en_US: The input images
        ja_JP: 入力画像
        pt_BR: The input images
        zh_Hans: 输入的图片
        label:
        en_US: Input Images
        ja_JP: Input Images
        pt_BR: Input Images
        zh_Hans: 输入的图片
        llm_description: The input images, used to transfer to the comfyui workflow
        to generate another image.
        max: null
        min: null
        name: images
        options: []
        placeholder: null
        precision: null
        required: false
        scope: null
        template: null
        type: files
      • auto_generate: null
        default: null
        form: llm
        human_description:
        en_US: When the workflow has multiple image nodes, enter the ID list of
        these nodes, and the images will be passed to ComfyUI in the order of
        the list.
        ja_JP: When the workflow has multiple image nodes, enter the ID list of
        these nodes, and the images will be passed to ComfyUI in the order of
        the list.
        pt_BR: When the workflow has multiple image nodes, enter the ID list of
        these nodes, and the images will be passed to ComfyUI in the order of
        the list.
        zh_Hans: 当工作流有多个图片节点时,输入这些节点的ID列表,图片将按列表顺序传给ComfyUI
        label:
        en_US: Image Node ID List
        ja_JP: Image Node ID List
        pt_BR: Image Node ID List
        zh_Hans: 图片节点ID列表
        llm_description: ''
        max: null
        min: null
        name: image_ids
        options: []
        placeholder: null
        precision: null
        required: false
        scope: null
        template: null
        type: string
      • auto_generate: null
        default: 1
        form: form
        human_description:
        en_US: If enabled, all the seeds in the workflow will be randomized.
        ja_JP: If enabled, all the seeds in the workflow will be randomized.
        pt_BR: If enabled, all the seeds in the workflow will be randomized.
        zh_Hans: If enabled, all the seeds in the workflow will be randomized.
        label:
        en_US: Randomize seeds
        ja_JP: Randomize seeds
        pt_BR: Randomize seeds
        zh_Hans: Randomize seeds
        llm_description: ''
        max: null
        min: null
        name: randomize_seed
        options: []
        placeholder: null
        precision: null
        required: false
        scope: null
        template: null
        type: boolean
      • auto_generate: null
        default: 1
        form: form
        human_description:
        en_US: If enabled, all the models in the workflow will be downloaded.
        ja_JP: If enabled, all the models in the workflow will be downloaded.
        pt_BR: If enabled, all the models in the workflow will be downloaded.
        zh_Hans: If enabled, all the models in the workflow will be downloaded.
        label:
        en_US: Download models
        ja_JP: Download models
        pt_BR: Download models
        zh_Hans: Download models
        llm_description: ''
        max: null
        min: null
        name: enable_download
        options: []
        placeholder: null
        precision: null
        required: false
        scope: null
        template: null
        type: boolean
        params:
        enable_download: ''
        image_ids: ''
        images: ''
        randomize_seed: ''
        workflow_json: ''
        provider_id: langgenius/comfyui/comfyui
        provider_name: langgenius/comfyui/comfyui
        provider_type: builtin
        selected: false
        title: Workflow
        tool_configurations:
        enable_download:
        type: constant
        value: false
        randomize_seed:
        type: constant
        value: false
        tool_description: Run ComfyUI workflow.
        tool_label: Workflow
        tool_name: workflow
        tool_parameters:
        image_ids:
        type: mixed
        value: null
        images:
        type: variable
        value:
        • '1757993451564'

        • edit
          workflow_json:
          type: mixed
          value: '{

            "3": {

              "inputs": {

                "seed": 601685180812477,

                "steps": 20,

                "cfg": 2.5,

                "sampler_name": "euler",

                "scheduler": "simple",

                "denoise": 1,

                "model": [

                  "75",

                  0

                ],

                "positive": [

                  "76",

                  0

                ],

                "negative": [

                  "77",

                  0

                ],

                "latent_image": [

                  "88",

                  0

                ]

              },

              "class_type": "KSampler",

              "_meta": {

                "title": "KSampler"

              }

            },

            "8": {

              "inputs": {

                "samples": [

                  "3",

                  0

                ],

                "vae": [

                  "39",

                  0

                ]

              },

              "class_type": "VAEDecode",

              "_meta": {

                "title": "VAE Decode"

              }

            },

            "37": {

              "inputs": {

                "unet_name": "qwen_image_edit_fp8_e4m3fn.safetensors",

                "weight_dtype": "default"

              },

              "class_type": "UNETLoader",

              "_meta": {

                "title": "Load Diffusion Model"

              }

            },

            "38": {

              "inputs": {

                "clip_name": "qwen_2.5_vl_7b_fp8_scaled.safetensors",

                "type": "qwen_image",

                "device": "default"

              },

              "class_type": "CLIPLoader",

              "_meta": {

                "title": "Load CLIP"

              }

            },

            "39": {

              "inputs": {

                "vae_name": "qwen_image_vae.safetensors"

              },

              "class_type": "VAELoader",

              "_meta": {

                "title": "Load VAE"

              }

            },

            "60": {

              "inputs": {

                "filename_prefix": "ComfyUI",

                "images": [

                  "8",

                  0

                ]

              },

              "class_type": "SaveImage",

              "_meta": {

                "title": "Save Image"

              }

            },

            "66": {

              "inputs": {

                "shift": 3,

                "model": [

                  "37",

                  0

                ]

              },

              "class_type": "ModelSamplingAuraFlow",

              "_meta": {

                "title": "ModelSamplingAuraFlow"

              }

            },

            "75": {

              "inputs": {

                "strength": 1,

                "model": [

                  "66",

                  0

                ]

              },

              "class_type": "CFGNorm",

              "_meta": {

                "title": "CFGNorm"

              }

            },

            "76": {

              "inputs": {

                "prompt": "对输入图像中的遮瑕盘产品进行精准颜色替换:识别遮瑕盘内所有4个(2*2排列)独立遮瑕膏单元,并将这些单元的颜色严格按从左到右顺序依次替换为以下十六进制颜色代码:#3070bc(单元1)、#4fafec(单元2)、#ffff54(单元3)、#f6c443(单元4)。仅修改遮瑕膏膏体区域(排除外壳、文字、阴影等),确保颜色替换后边界自然、无色差,且保持原始图像分辨率与光照效果。",

                "clip": [

                  "38",

                  0

                ],

                "vae": [

                  "39",

                  0

                ],

                "image": [

                  "93",

                  0

                ]

              },

              "class_type": "TextEncodeQwenImageEdit",

              "_meta": {

                "title": "TextEncodeQwenImageEdit"

              }

            },

            "77": {

              "inputs": {

                "prompt": "",

                "clip": [

                  "38",

                  0

                ],

                "vae": [

                  "39",

                  0

                ],

                "image": [

                  "93",

                  0

                ]

              },

              "class_type": "TextEncodeQwenImageEdit",

              "_meta": {

                "title": "TextEncodeQwenImageEdit"

              }

            },

            "78": {

              "inputs": {

                "image": "sample.jpg"

              },

              "class_type": "LoadImage",

              "_meta": {

                "title": "Load Image"

              }

            },

            "88": {

              "inputs": {

                "pixels": [

                  "93",

                  0

                ],

                "vae": [

                  "39",

                  0

                ]

              },

              "class_type": "VAEEncode",

              "_meta": {

                "title": "VAE Encode"

              }

            },

            "93": {

              "inputs": {

                "upscale_method": "lanczos",

                "megapixels": 1,

                "image": [

                  "78",

                  0

                ]

              },

              "class_type": "ImageScaleToTotalPixels",

              "_meta": {

                "title": "Scale Image to Total Pixels"

              }

            }

          }'
          type: tool
          version: '2'
          height: 148
          id: '1757993493409'
          position:
          x: 376.01543462829227
          y: 271.5830333611526
          positionAbsolute:
          x: 376.01543462829227
          y: 271.5830333611526
          selected: true
          sourcePosition: right
          targetPosition: left
          type: custom
          width: 244
          viewport:
          x: 172.33833978368705
          y: 16.554326232165607
          zoom: 0.57434919693741

@matrix12315 commented on GitHub (Sep 16, 2025): @dosu app: description: '' icon: 🤖 icon_background: '#FFEAD5' mode: advanced-chat name: comfyuiBUG use_icon_as_answer_icon: false dependencies: - current_identifier: null type: marketplace value: marketplace_plugin_unique_identifier: langgenius/comfyui:0.2.5@f0964db9c1927196b74a487ce119b8d7dba85ca040ffc46e3e848e81283618a2 kind: app version: 0.3.0 workflow: conversation_variables: [] environment_variables: [] features: file_upload: allowed_file_extensions: - .JPG - .JPEG - .PNG - .GIF - .WEBP - .SVG allowed_file_types: - image allowed_file_upload_methods: - remote_url - local_file enabled: true number_limits: 3 opening_statement: '' retriever_resource: enabled: true sensitive_word_avoidance: enabled: false speech_to_text: enabled: false suggested_questions: [] suggested_questions_after_answer: enabled: false text_to_speech: enabled: false language: '' voice: '' graph: edges: - data: isInIteration: false isInLoop: false sourceType: start targetType: tool id: 1757993451564-source-1757993493409-target source: '1757993451564' sourceHandle: source target: '1757993493409' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: tool targetType: answer id: 1757993493409-source-answer-target source: '1757993493409' sourceHandle: source target: answer targetHandle: target type: custom zIndex: 0 nodes: - data: desc: '' selected: false title: Start type: start variables: - allowed_file_extensions: [] allowed_file_types: - image allowed_file_upload_methods: - local_file - remote_url label: edit max_length: 5 options: [] required: false type: file variable: edit height: 90 id: '1757993451564' position: x: 12.680492111556532 y: 296 positionAbsolute: x: 12.680492111556532 y: 296 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: answer: '{{#1757993493409.files#}}' desc: '' selected: false title: Answer type: answer variables: [] height: 104 id: answer position: x: 680 y: 282 positionAbsolute: x: 680 y: 282 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: desc: '' is_team_authorization: true output_schema: null paramSchemas: - auto_generate: null default: null form: llm human_description: en_US: exported from ComfyUI workflow ja_JP: ComfyUI よりエクスポートされたワークフロー pt_BR: exported from ComfyUI workflow zh_Hans: 从ComfyUI的工作流中导出 label: en_US: Workflow JSON ja_JP: ワークフロー JSON pt_BR: Workflow JSON zh_Hans: Workflow JSON llm_description: '' max: null min: null name: workflow_json options: [] placeholder: null precision: null required: true scope: null template: null type: string - auto_generate: null default: null form: llm human_description: en_US: The input images ja_JP: 入力画像 pt_BR: The input images zh_Hans: 输入的图片 label: en_US: Input Images ja_JP: Input Images pt_BR: Input Images zh_Hans: 输入的图片 llm_description: The input images, used to transfer to the comfyui workflow to generate another image. max: null min: null name: images options: [] placeholder: null precision: null required: false scope: null template: null type: files - auto_generate: null default: null form: llm human_description: en_US: When the workflow has multiple image nodes, enter the ID list of these nodes, and the images will be passed to ComfyUI in the order of the list. ja_JP: When the workflow has multiple image nodes, enter the ID list of these nodes, and the images will be passed to ComfyUI in the order of the list. pt_BR: When the workflow has multiple image nodes, enter the ID list of these nodes, and the images will be passed to ComfyUI in the order of the list. zh_Hans: 当工作流有多个图片节点时,输入这些节点的ID列表,图片将按列表顺序传给ComfyUI label: en_US: Image Node ID List ja_JP: Image Node ID List pt_BR: Image Node ID List zh_Hans: 图片节点ID列表 llm_description: '' max: null min: null name: image_ids options: [] placeholder: null precision: null required: false scope: null template: null type: string - auto_generate: null default: 1 form: form human_description: en_US: If enabled, all the seeds in the workflow will be randomized. ja_JP: If enabled, all the seeds in the workflow will be randomized. pt_BR: If enabled, all the seeds in the workflow will be randomized. zh_Hans: If enabled, all the seeds in the workflow will be randomized. label: en_US: Randomize seeds ja_JP: Randomize seeds pt_BR: Randomize seeds zh_Hans: Randomize seeds llm_description: '' max: null min: null name: randomize_seed options: [] placeholder: null precision: null required: false scope: null template: null type: boolean - auto_generate: null default: 1 form: form human_description: en_US: If enabled, all the models in the workflow will be downloaded. ja_JP: If enabled, all the models in the workflow will be downloaded. pt_BR: If enabled, all the models in the workflow will be downloaded. zh_Hans: If enabled, all the models in the workflow will be downloaded. label: en_US: Download models ja_JP: Download models pt_BR: Download models zh_Hans: Download models llm_description: '' max: null min: null name: enable_download options: [] placeholder: null precision: null required: false scope: null template: null type: boolean params: enable_download: '' image_ids: '' images: '' randomize_seed: '' workflow_json: '' provider_id: langgenius/comfyui/comfyui provider_name: langgenius/comfyui/comfyui provider_type: builtin selected: false title: Workflow tool_configurations: enable_download: type: constant value: false randomize_seed: type: constant value: false tool_description: Run ComfyUI workflow. tool_label: Workflow tool_name: workflow tool_parameters: image_ids: type: mixed value: null images: type: variable value: - '1757993451564' - edit workflow_json: type: mixed value: '{   "3": {     "inputs": {       "seed": 601685180812477,       "steps": 20,       "cfg": 2.5,       "sampler_name": "euler",       "scheduler": "simple",       "denoise": 1,       "model": [         "75",         0       ],       "positive": [         "76",         0       ],       "negative": [         "77",         0       ],       "latent_image": [         "88",         0       ]     },     "class_type": "KSampler",     "_meta": {       "title": "KSampler"     }   },   "8": {     "inputs": {       "samples": [         "3",         0       ],       "vae": [         "39",         0       ]     },     "class_type": "VAEDecode",     "_meta": {       "title": "VAE Decode"     }   },   "37": {     "inputs": {       "unet_name": "qwen_image_edit_fp8_e4m3fn.safetensors",       "weight_dtype": "default"     },     "class_type": "UNETLoader",     "_meta": {       "title": "Load Diffusion Model"     }   },   "38": {     "inputs": {       "clip_name": "qwen_2.5_vl_7b_fp8_scaled.safetensors",       "type": "qwen_image",       "device": "default"     },     "class_type": "CLIPLoader",     "_meta": {       "title": "Load CLIP"     }   },   "39": {     "inputs": {       "vae_name": "qwen_image_vae.safetensors"     },     "class_type": "VAELoader",     "_meta": {       "title": "Load VAE"     }   },   "60": {     "inputs": {       "filename_prefix": "ComfyUI",       "images": [         "8",         0       ]     },     "class_type": "SaveImage",     "_meta": {       "title": "Save Image"     }   },   "66": {     "inputs": {       "shift": 3,       "model": [         "37",         0       ]     },     "class_type": "ModelSamplingAuraFlow",     "_meta": {       "title": "ModelSamplingAuraFlow"     }   },   "75": {     "inputs": {       "strength": 1,       "model": [         "66",         0       ]     },     "class_type": "CFGNorm",     "_meta": {       "title": "CFGNorm"     }   },   "76": {     "inputs": {       "prompt": "对输入图像中的遮瑕盘产品进行精准颜色替换:识别遮瑕盘内所有4个(2*2排列)独立遮瑕膏单元,并将这些单元的颜色严格按从左到右顺序依次替换为以下十六进制颜色代码:#3070bc(单元1)、#4fafec(单元2)、#ffff54(单元3)、#f6c443(单元4)。仅修改遮瑕膏膏体区域(排除外壳、文字、阴影等),确保颜色替换后边界自然、无色差,且保持原始图像分辨率与光照效果。",       "clip": [         "38",         0       ],       "vae": [         "39",         0       ],       "image": [         "93",         0       ]     },     "class_type": "TextEncodeQwenImageEdit",     "_meta": {       "title": "TextEncodeQwenImageEdit"     }   },   "77": {     "inputs": {       "prompt": "",       "clip": [         "38",         0       ],       "vae": [         "39",         0       ],       "image": [         "93",         0       ]     },     "class_type": "TextEncodeQwenImageEdit",     "_meta": {       "title": "TextEncodeQwenImageEdit"     }   },   "78": {     "inputs": {       "image": "sample.jpg"     },     "class_type": "LoadImage",     "_meta": {       "title": "Load Image"     }   },   "88": {     "inputs": {       "pixels": [         "93",         0       ],       "vae": [         "39",         0       ]     },     "class_type": "VAEEncode",     "_meta": {       "title": "VAE Encode"     }   },   "93": {     "inputs": {       "upscale_method": "lanczos",       "megapixels": 1,       "image": [         "78",         0       ]     },     "class_type": "ImageScaleToTotalPixels",     "_meta": {       "title": "Scale Image to Total Pixels"     }   } }' type: tool version: '2' height: 148 id: '1757993493409' position: x: 376.01543462829227 y: 271.5830333611526 positionAbsolute: x: 376.01543462829227 y: 271.5830333611526 selected: true sourcePosition: right targetPosition: left type: custom width: 244 viewport: x: 172.33833978368705 y: 16.554326232165607 zoom: 0.57434919693741
Author
Owner

@dosubot[bot] commented on GitHub (Sep 16, 2025):

Your workflow fails because the JSON format you’re using (numbered keys, e.g. "78": {...}) is not fully compatible with ComfyUI plugin v0.2.5 in Dify. This plugin version expects the workflow JSON to use nodes and links arrays (the "API format" export from ComfyUI with Dev Mode enabled). When the format doesn’t match, file variables like your uploaded image aren’t mapped to the LoadImage node, so the plugin times out or fails to process the file input [details].

Also, if the LoadImage node’s image input is hardcoded (e.g. "image": "sample.jpg"), the plugin may not overwrite it with your uploaded file, causing a mismatch [details].

How to fix:

  1. Export your workflow from ComfyUI using "Save(API Format)" with Dev Mode enabled. This will give you a JSON with nodes and links arrays, which the plugin can parse and map files to correctly [instructions].
  2. Remove any hardcoded image names in LoadImage nodes. The plugin will automatically map your uploaded file(s) to these nodes in order.
  3. If possible, upgrade to ComfyUI plugin v0.2.6 or later. This version adds support for both numbered-key and nodes/links array formats, fixes JSON parsing, and improves file mapping and connection handling [changelog].
  4. Double-check your Docker .env for FILES_URL and ensure both Dify and ComfyUI containers can reach each other. Restart containers after changes [network tips].

If you can’t upgrade, you’ll need to manually restructure your workflow JSON to use the nodes/links format, or try a minimal workflow with only one LoadImage node and no hardcoded image name.

Let me know if you want an example of the correct JSON format or more details on any step.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Sep 16, 2025): <!-- Answer --> Your workflow fails because the JSON format you’re using (numbered keys, e.g. `"78": {...}`) is not fully compatible with ComfyUI plugin v0.2.5 in Dify. This plugin version expects the workflow JSON to use `nodes` and `links` arrays (the "API format" export from ComfyUI with Dev Mode enabled). When the format doesn’t match, file variables like your uploaded image aren’t mapped to the `LoadImage` node, so the plugin times out or fails to process the file input [[details](https://github.com/langgenius/dify-official-plugins/issues/1627)]. Also, if the `LoadImage` node’s `image` input is hardcoded (e.g. `"image": "sample.jpg"`), the plugin may not overwrite it with your uploaded file, causing a mismatch [[details](https://github.com/langgenius/dify-official-plugins/pull/1618)]. **How to fix:** 1. Export your workflow from ComfyUI using "Save(API Format)" with Dev Mode enabled. This will give you a JSON with `nodes` and `links` arrays, which the plugin can parse and map files to correctly [[instructions](https://github.com/langgenius/dify-official-plugins/blob/a0357b280e8647c1d5d20e695f62185721ba19e2/tools/comfyui/README.md)]. 2. Remove any hardcoded image names in `LoadImage` nodes. The plugin will automatically map your uploaded file(s) to these nodes in order. 3. If possible, upgrade to ComfyUI plugin v0.2.6 or later. This version adds support for both numbered-key and nodes/links array formats, fixes JSON parsing, and improves file mapping and connection handling [[changelog](https://github.com/langgenius/dify-official-plugins/pull/1676)]. 4. Double-check your Docker `.env` for `FILES_URL` and ensure both Dify and ComfyUI containers can reach each other. Restart containers after changes [[network tips](https://github.com/langgenius/dify/issues/25762)]. If you can’t upgrade, you’ll need to manually restructure your workflow JSON to use the `nodes`/`links` format, or try a minimal workflow with only one `LoadImage` node and no hardcoded image name. Let me know if you want an example of the correct JSON format or more details on any step. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/270a7a25-e028-4a19-8e1f-364031b99fde?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/270a7a25-e028-4a19-8e1f-364031b99fde?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/270a7a25-e028-4a19-8e1f-364031b99fde?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/270a7a25-e028-4a19-8e1f-364031b99fde?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/270a7a25-e028-4a19-8e1f-364031b99fde?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/270a7a25-e028-4a19-8e1f-364031b99fde?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/270a7a25-e028-4a19-8e1f-364031b99fde?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/1718)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#650