upload_image
Uploads local images, videos, or audio into ComfyUI's input directory, stages existing outputs as inputs for multi-stage workflows, and sends generated files to cloud storage.
Instructions
Put a file where ComfyUI (or cloud storage) can read it. Driven by the action parameter:
action:"image" — Upload a local image file to the connected ComfyUI's input/ directory via the HTTP /upload/image endpoint so it can be referenced in LoadImage nodes. Works for both local and remote ComfyUI. Returns the stored filename.
action:"video" — Upload a local video file (.mp4, .mov, .webm, .avi, .mkv, .m4v) to the connected ComfyUI's input/ directory via the HTTP /upload/image endpoint for use in video-loading nodes such as VHS_LoadVideo (ComfyUI-VideoHelperSuite). Works for both local and remote ComfyUI. Returns the stored filename.
action:"audio" — Upload a local audio file (.wav, .mp3, .flac, .ogg, .m4a, .aac) to the connected ComfyUI's input/ directory via the HTTP /upload/image endpoint for use in audio-conditioned workflows (e.g. LoadAudio). Works for both local and remote ComfyUI. Returns the stored filename.
action:"stage" — Stage an EXISTING ComfyUI output (or temp/preview) as an INPUT so the next stage's loader (LoadImage / VHS_LoadVideo / LoadAudio) can read it. This is the CORRECT way to chain a multi-stage pipeline (e.g. Krea2 image → LTX video → WAN extend): it fetches the output's bytes from the server via /view and re-registers them as an input via /upload/image — the same endpoints get_image and the uploads above use. Because it goes entirely through the server API, it works even when ComfyUI was launched with a CUSTOM input/output directory. Do NOT instead copy the output file or guess a filesystem
input/path — the server's input dir may be custom and it will reject the file ("Invalid image file"), wasting the render. Pass an existing output reference ({ filename, subfolder?, type? }); the media kind (image/video/audio) is inferred from the extension unless you setkind. Returns the registered input { filename, subfolder, type: "input", kind } — drop the returnedfilenamestraight into the loader's image/video/audio widget.action:"output" — Upload a generated ComfyUI output to CLOUD storage (this is the only action that sends bytes off the machine). Source can be asset_id or a local path under COMFYUI_PATH/output. Destination can be S3, Azure Blob, HTTP PUT, or HuggingFace via the hf CLI.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | action:"stage" — force the media kind instead of inferring it from the file extension. | |
| path | No | action:"output" — path to a generated output under COMFYUI_PATH/output. Provide exactly one of asset_id or path. | |
| type | No | action:"stage" — source directory the asset lives in: output (default) or temp (previews). | |
| action | Yes | What to upload and where. "image"/"video"/"audio" send a LOCAL file (`source_path`) to ComfyUI's input/ directory; "stage" re-registers an EXISTING server-side output (`filename`) as an input; "output" ships a generated output to cloud storage (`destination`). | |
| asset_id | No | action:"output" — registered asset id from a completed job. Provide exactly one of asset_id or path. | |
| filename | No | Two meanings, one per action. actions "image"/"video"/"audio" — OPTIONAL override for the filename in ComfyUI's input/ directory (auto-detected from source_path if omitted). A path prefix (e.g. assets/clip.mp4) places the upload in that SUBFOLDER of input/ — ".." is refused — and the returned filename reference includes the subfolder, since loaders need the qualified path. action:"stage" — REQUIRED filename of the EXISTING output/temp asset to re-register (from get_history or get_image action:"list_outputs"), e.g. LTX_video_00001.mp4; its destination name override is `as_filename`, not this field. | |
| subfolder | No | action:"stage" — subfolder the source asset currently lives in, if any. | |
| as_filename | No | action:"stage" — override the filename it is registered under in the input/ directory (defaults to the source filename). | |
| destination | No | action:"output" — REQUIRED. Exactly one upload destination. | |
| source_path | No | Absolute path to the local file to upload. REQUIRED for actions "image", "video" and "audio". |