ai-dock / comfyui

ComfyUI docker images for use in GPU cloud and local environments. Includes AI-Dock base for authentication and improved user experience.
Other
650 stars 224 forks source link

postprocess_worker in comfyui_api_wrapper: 'str' object has no attribute 'get' #108

Open Nero5023 opened 1 month ago

Nero5023 commented 1 month ago

When the workflow generate the text output (save text to file). It will show this error. The error comes from this line.

https://github.com/ai-dock/comfyui/blob/a808c1e32d067265cb25f5754966f73331e152e4/build/COPY_ROOT_1/opt/ai-dock/api-wrapper/workers/postprocess_worker.py#L62

When the output is text not image, the item here will be string, so it will raise the expection. I think we should just continue for such cases.


example comfyui output that will case the issue:

"outputs": {
        "79": {
            "images": [
                {
                    "filename": "ComfyUI_00053_.png",
                    "subfolder": "",
                    "type": "output"
                }
            ]
        },
        "21": {
            "text": [
                "foo bar baz"
            ]
        },
        "22": {
            "text": [
                "another text"
            ]
        }
    },
Nero5023 commented 1 month ago

Similar issue #99