Comfy-Org / Comfy-Org/ComfyUI

Upload widget is being serialized to prompt

Open
#2,093 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

The upload widget is being serialized to prompt even though it shouldn’t be, resulting in a bogus `"choose file to upload": "image"` entry. From the look of it, the issue is the `serialize` property being set incorrectly here:

https://github.com/comfyanonymous/ComfyUI/blob/777f6b15225197898a5f49742682a2be859072d7/web/scripts/widgets.js#L364-L368

It should be:

```js
uploadWidget = node.addWidget("button", "choose file to upload", "image", () => {
fileInput.click();
}, {
serialize: false, // Don't include this in prompt.
});
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.