Comfy-Org/ComfyUI_frontend

[Feature Request]: Support file upload input defined in custom node

开放

#3,461 创建于 2025年4月15日

 (2 条评论) (4 个反应) (0 位负责人)TypeScript (610 个派生)github user discovery
enhancementhelp wanted

仓库指标

星标
 (1,838 个星标)
PR 合并指标
 (平均合并 4天 21小时) (30 天内合并 881 个 PR)

描述

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

Currently, a custom node author can use image_upload in the input spec and an upload button will be added to the node. This feature would allow for something like:

{"file_upload": True, "accept_filetypes" : ["video/webm", "video/mp4", "video/mkv"]}

Which would behave the same as the image_upload widget, but instead change the accept when invoking the system fil picker to match with the accept_filetypes field. The custom node can determine how to handle the uploaded file and what the output type is. The frontend and server would just be responsible for uploading the file to the server and then providing the filename (same as image_upload).

Proposed workflow

  1. Custom node author sets the file_upload option in the INPUT_TYPES of a custom node for some input
  2. Custom node author uses second option accept_filetypes (or similar) to specify the filetypes
  3. An upload button is added to the node, which opens file picker and accepts the given filetypes.
  4. The widget value of the input is just the filename of the uploaded file

Additional information

This feature was proposed here: https://github.com/comfyanonymous/ComfyUI/discussions/7603

┆Issue is synchronized with this Notion page by Unito

贡献者指南