BYOKey Wan Text to Video
Wan t2v from a prompt — Alibaba's open model, hosted, on your key
- output
Wan is the open-weights video model the community actually loves - the one people run on their own cards and hold up against the closed giants. This node doesn't wrap a secret model; it runs Wan on Alibaba's own DashScope service with your key, so you get the current generation (wan2.6-t2v) without downloading multi-gigabyte weights or budgeting the VRAM. If you can run it locally, local is still free and unfiltered - this is the convenience door for everyone else, and the one that lets you hit the latest version day one.
How it works. The standard submit-then-poll dance. POST to dashscope.aliyuncs.com (default base_url; the international endpoint is dashscope-intl.aliyuncs.com, and relays slot in here too) with your DashScope/Model Studio key, poll every poll_interval seconds until the clip is ready, download the mp4, wrap in ComfyUI's native VIDEO type.
The inputs that matter:
prompt- the whole creative input. Wan reads English and Chinese natively, so write in whichever you think in.size- this is the distinctive control: 13 presets that bundle resolution and aspect ratio into one pick, e.g.480p: 1:1 (624x624),720p: 16:9 (1280x720),1080p: 9:16 (1080x1920). Pick your target platform's format and it's handled in one field.model-wan2.6-t2v(default) orwan2.5-t2v-preview. 2.6 is the current quality bar.duration- 5, 10, or 15 seconds; 15 is only on 2.6, so don't ask for it on the 2.5 preview.negative_prompt- supported, unusually for a video API. Describe what to avoid.prompt_extend- on by default: DashScope rewrites your prompt with AI assistance.shot_type-singleormulti, and only meaningful whileprompt_extendis on.multigives you multiple shots with cuts instead of one continuous take - a cheap way to get an "edited" feel from a single call.generate_audio- off by default; on auto-generates an audio track.watermark- off by default; on tags output with an AI-generated watermark.seed- set one for reproducible rolls.
poll_interval and max_wait are the babysitters; the 10-minute cap is generous.
Output: one output (VIDEO) socket.
Install. Shared pack, one clone:
cd ComfyUI/custom_nodes
git clone https://github.com/MeteorAndy/comfyui-byokey.git
# restart ComfyUI; it's under api/byokey/video
No model downloads (Alibaba hosts the model), no extra deps beyond ComfyUI's bundled torch, aiohttp, PIL, numpy and av.
Gotchas. The 15-second-only-on-2.6 rule and the model/resolution interactions are the fiddly bits - read the tooltips when you switch models. And the usual fresh-pack hygiene: it's new, no community consensus behind it, so skim the source before handing it a DashScope key.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | DashScope (Alibaba Model Studio) API key. | |
| model | COMBO | wan2.6-t2v | Model to use. |
| prompt | STRING | Prompt describing the elements and visual features. Supports English and Chinese. | |
| base_urlopt | STRING | https://dashscope.aliyuncs.com | DashScope API host. Use https://dashscope-intl.aliyuncs.com for the international endpoint, or a relay base URL. |
| negative_promptopt | STRING | Negative prompt describing what to avoid. | |
| sizeopt | COMBO | 720p: 1:1 (960x960) | Video resolution and aspect ratio. |
| durationopt | INT | 55–15 | Video duration in seconds. A 15-second duration is available only for the Wan 2.6 model. |
| seedopt | INT | 00–2147483647 | — |
| generate_audioopt | BOOLEAN | false | If no audio input is provided, generate audio automatically. |
| prompt_extendopt | BOOLEAN | true | Whether to enhance the prompt with AI assistance. |
| watermarkopt | BOOLEAN | false | Whether to add an AI-generated watermark to the result. |
| shot_typeopt | COMBO | single | Single continuous shot or multiple shots with cuts. Takes effect only when prompt_extend is True. |
| poll_intervalopt | INT | 62–60 | — |
| max_waitopt | INT | 60060–3600 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | VIDEO | — |