English | 简体中文
Run ComfyUI workflow APIs published on AutoDL.Art from a local or remote ComfyUI installation.
- Select workflows from the AutoDL workflow catalog and synchronize their input/output schema.
- Dynamically create typed ports for text, numbers, enums, images, audio, and video.
- Submit and poll remote tasks, show their stage and elapsed time, and download temporary results into ComfyUI output storage.
- Store the AutoDL token in ComfyUI settings instead of node or workflow JSON.
- Automatically switch the node UI between English and Chinese using ComfyUI's
Comfy.Localesetting.
The plugin registers two nodes under AutoDL/API:
AutoDL Workflowsynchronizes inputs, submits a task, polls it, and saves returned files.AutoDL Preview Video (no save)previews a video already saved by the workflow node without transcoding or creating another copy.
Clone the repository into custom_nodes:
cd ComfyUI\custom_nodes
git clone https://github.com/HappyAny/ComfyUI-AutoDL-API.git
cd ComfyUI-AutoDL-API
python -m pip install -r requirements.txtAlternatively, download the repository ZIP and copy the complete folder to:
ComfyUI/custom_nodes/ComfyUI-AutoDL-API
Install dependencies with the Python environment used by ComfyUI, then fully restart ComfyUI.
The AutoDL ComfyUI API requires a token created in the ComfyUI group.
After installing and restarting ComfyUI:
- Press
Ctrl + ,to open ComfyUI Settings. - Open
AutoDL API→Authentication. - Paste the token into
AutoDL ComfyUI Token. - Close the settings panel. ComfyUI saves the value automatically.
The field is rendered as a password input. The token is not included in node or workflow JSON, but it is stored as plain text in the current ComfyUI user's settings file, usually:
ComfyUI/user/default/comfy.settings.json
Do not share this settings file, and restrict access to the ComfyUI user directory.
The environment variable remains available as a fallback:
$env:AUTODL_COMFY_TOKEN = "your ComfyUI token"
python .\main.pySet it in the same process environment that starts ComfyUI. A token saved in ComfyUI Settings takes precedence over the environment variable.
- Save the token in ComfyUI Settings.
- Add an
AutoDL Workflownode. - Select a workflow from the
AutoDL workflowdropdown. The list comes from the AutoDL ComfyUI workflow catalog. - Selection synchronizes the workflow automatically. Click
Sync workflowto refresh it manually. UseEnter ID / URL manually…only for workflows not present in the public catalog. - Click
Insert workflow demoto create and connect unconnected parameter nodes and currently visible media loaders. Enum parameters receive dropdowns, and numeric parameters use the declared minimum, maximum, and step. Result ports connect to suitable preview nodes. This button does not submit a task. - The left and right ports follow the synchronized
input_rulesandoutput_example. Port labels stay compact; clickParameter help and optionsfor required status, purpose, defaults, ranges, lengths, and enum values. - Large media schemas start with at most
2 images + 1 audio + 0 videosvisible. Use the compact−/+controls on the right side to reveal or hide available media ports. Unsupported media types are not shown. - Connect ComfyUI
STRING,INT,FLOAT,BOOLEAN,IMAGE,AUDIO, or compatible media outputs to the corresponding inputs. - Unconnected media inputs are omitted from the AutoDL request and do not enable platform defaults.
- Queue the workflow. The node submits the remote task, polls it to completion, and saves every result to
ComfyUI/output/autodl_api/. ClickOpen resultto open the first file.
The plugin remembers the most recently synchronized workflow. Its schema, visible media counts, workflow ID, and connections are stored with the ComfyUI workflow.
If an old workflow or cached frontend is missing the internal schema_json, the frontend automatically synchronizes it again. The backend can also rebuild the schema from workflow_id before submitting.
An IMAGE input uses the first image in the batch and encodes it as a PNG Data URI. An AUDIO input is encoded as a WAV Data URI. Inline media is limited to 50 MB according to the current AutoDL rules. Video and generic media inputs accept compatible ComfyUI objects, HTTP(S) URLs, data: URIs, or server-local file paths.
Internal schema, timeout, and legacy advanced JSON controls are kept out of the node UI. They are injected into the prompt only when the workflow is queued.
Result ports follow the remote workflow:
- Image results use
IMAGE. - Audio results use
AUDIO. - Video results use
VIDEO. - Multiple entries in
output_examplecreate multiple result ports in order.
AutoDL result URLs are temporary, so AutoDL Workflow downloads the original result once into output/autodl_api/ before emitting a native media object. Connect a video to AutoDL Preview Video (no save) to preview that existing file. Use another Save Video node only when you need a different name, directory, container, or codec.
During execution, the status row shows submission, queueing, generation, download, and completion stages plus local elapsed time. If the API response includes duration, the node also shows the reported inference time. The plugin does not invent a percentage or ETA when the API does not provide one.
The frontend reads Comfy.Locale from ComfyUI Settings:
zh,zh-CN, andzh-TWuse Chinese.- All other locales fall back to English.
Changing the ComfyUI language reloads the current workflow, which updates controls, status messages, parameter help, result labels, and demo node titles.
- Every Queue action submits a new remote task and may incur charges.
- Result URLs are usually short-lived, so the node downloads all files when the task completes.
- The current implementation sends a JSON request body and does not implement multipart uploads.
- Polling occurs during node execution; the ComfyUI queue item remains active until the remote task completes or times out.
- The default API root is
https://www.autodl.art/api/v1/comfyui. AUTODL_COMFY_API_BASE_URLcan override the workflow-detail API for debugging, whileAUTODL_COMFY_BASE_URLcan override the task API.
The test suite does not submit real AutoDL tasks:
python -B -m unittest discover -s tests -v
node tests/test_frontend.mjsPython tests cover the API client, schema mapping, media conversion, dynamic outputs, token fallback, and result previews. The Node test covers localization, hidden internal controls, and prompt injection.
MIT