SCAIL-2 Prompt Generator ๐
LLM-built prompts for motion transfer and character swap
- llm_service_connector
- driving_video
- reference_images
- scail2_prompt
SCAIL-2 is Z.ai's motion-transfer model - a Wan 2.1 fine-tune that dropped the stick-figure pose skeleton every earlier motion-transfer model relied on, which is what unlocked animal driving, multi-character scenes, and swapping a subject's identity mid-video while keeping the motion. It landed straight into ComfyUI core in mid-2026, no custom node pack required to run the model itself - but getting a good instruction into it is still a prompting problem, and that's what this node handles. It's not the model. It's an LLM call that turns your rough idea into the kind of structured instruction SCAIL-2 responds to.
What it does. You give it a task_type, a plain-language user_prompt, and optionally the actual visual material - a driving video and/or reference images - and it routes all of that through whatever LLM connector you've wired in to produce scail2_prompt, a single STRING output ready to feed into your SCAIL-2 workflow's text conditioning. Two separate token budgets on the node (max_tokens_caption and max_tokens_enhance) are the tell that this runs as a two-stage process under the hood: caption what's actually in the driving video or reference images first, then use that description to enhance and shape your rough prompt into the final instruction - rather than just passing your typed text straight through.
The task types match the model exactly. The dropdown has two options, both bilingual-labeled: character_replacement (่ง่ฒๆฟๆข) and motion_transfer (ๅจไฝ่ฟ็งป) - the two things SCAIL-2's no-skeleton architecture specifically unlocked. That's not a coincidence; this node exists because those are the two workflows worth writing a dedicated prompt generator for.
Inputs that matter for a first run.
llm_service_connector(required) - any of this pack'sSet*LLMServiceConnectornodes. Nothing runs without one wired in.task_type- pickcharacter_replacementormotion_transferdepending on what you're doing.user_prompt- your instruction in plain language, the way you'd describe the edit to a person.seed- for reproducibility across LLM calls, same as any other seeded node.driving_video(optional, IMAGE) - the video frames you're transferring motion from or replacing a character in.num_frames(default 8, up to 16) controls how many of those frames actually get sent to the LLM - you're not forwarding the whole clip, just a sample of it for the model to look at.reference_images(optional, IMAGE) - the subject or reference material for the task.image_detail-auto(default),low, orhigh, the standard OpenAI-style hint for how much detail the vision model should extract from the images.temperature,max_tokens_caption,max_tokens_enhance,timeout(a fixed choice of 30/60/120/300 seconds) - standard LLM sampling and budget controls, worth raising the token limits if your captions or enhanced prompts are getting cut short.
Installing. ComfyUI Manager: search ComfyUI_MieNodes and install; manual, cd ComfyUI/custom_nodes && git clone https://github.com/MieMieeeee/ComfyUI-MieNodes, restart. You'll also need at least one working LLM connector set up - copy mie_llm_keys.json.example to mie_llm_keys.json in the plugin folder and fill in a key for whichever service you're using (SiliconFlow and ZhiPu both have usable free-tier models if you don't want to commit to a paid key yet), or paste a token directly into the connector node's api_token.
One gap worth naming: this node isn't mentioned anywhere in the pack's README, unlike the closely related Bernini and Kontext prompt generators, which do get workflow diagrams. Everything about the two-stage caption-then-enhance behavior above is inferred from the schema's separate token budgets rather than confirmed against source or documentation.
Troubleshooting.
- Node errors immediately. Check the LLM connector first - this node does nothing without a working
llm_service_connector, and a missing or invalid API key upstream will surface here as a failure even though the actual problem is one node back. - Generated prompt ignores your reference images or driving video. Confirm you actually wired them into the optional sockets - they're optional, so a workflow with them left unconnected will still run, just without the visual grounding, and produce a generic text-only rewrite instead.
- Prompt gets cut off mid-sentence. Raise
max_tokens_enhance- the default (2048) is generous for most cases but can clip if youruser_promptand reference material are unusually detailed. - SCAIL-2 itself runs slow or artifacts on long clips. That's the underlying model's known ceiling, not this node - SCAIL-2 has an 81-frame native context, and identity drift is the typical failure mode once you push past it with chained chunks. No amount of prompt tuning here fixes a compute or context-length limit on the model side.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| llm_service_connector | LLMServiceConnector | โ | |
| task_type | COMBO | character_replacement - ่ง่ฒๆฟๆข | 2 options: character_replacement - ่ง่ฒๆฟๆข, motion_transfer - ๅจไฝ่ฟ็งป |
| user_prompt | STRING | โ | |
| seed | INT | 00โ18446744073709550000 | โ |
| driving_videoopt | IMAGE | For character_replacement: the source video to be edited (the subject being replaced appears in this video). For motion_transfer: the driving video whose motion / pose / action is applied to the character in reference_images. | |
| reference_imagesopt | IMAGE | โ | |
| num_framesopt | INT | 81โ16 | โ |
| image_detailopt | COMBO | auto | 3 options: auto, low, high |
| temperatureopt | FLOAT | 0.400โ2 | โ |
| max_tokens_captionopt | INT | 204864โ32768 | โ |
| max_tokens_enhanceopt | INT | 204864โ32768 | โ |
| timeoutopt | COMBO | 120 | 4 options: 30, 60, 120, 300 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| scail2_prompt | STRING | โ |