Nodes/ComfyUI_MieNodes/SCAIL-2 Prompt Generator ๐Ÿ‘
ComfyUI Node

SCAIL-2 Prompt Generator ๐Ÿ‘

LLM-built prompts for motion transfer and character swap

By MieMieeeeeยทCreated 2 years agoยทUpdated 28 days agoยท 225
SCAIL-2 Prompt Generator ๐Ÿ‘
  • llm_service_connector
  • driving_video
  • reference_images
  • scail2_prompt
โ—„task_typecharacter_replacement - ่ง’่‰ฒๆ›ฟๆขโ–บ
โ—„user_promptโ–บ
โ—„seed0โ–บ
โ—„num_frames8โ–บ
โ—„image_detailautoโ–บ
โ—„temperature0.40โ–บ
โ—„max_tokens_caption2048โ–บ
โ—„max_tokens_enhance2048โ–บ
โ—„timeout120โ–บ

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's Set*LLMServiceConnector nodes. Nothing runs without one wired in.
  • task_type - pick character_replacement or motion_transfer depending 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, or high, 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 your user_prompt and 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.
Category๐Ÿ‘ MieNodes/๐Ÿ‘ Prompt Generator

Inputs (12)

NameTypeDefaultDescription
llm_service_connectorLLMServiceConnectorโ€”
task_typeCOMBOcharacter_replacement - ่ง’่‰ฒๆ›ฟๆข2 options: character_replacement - ่ง’่‰ฒๆ›ฟๆข, motion_transfer - ๅŠจไฝœ่ฟ็งป
user_promptSTRINGโ€”
seedINT00โ€“18446744073709550000โ€”
driving_videooptIMAGEFor 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_imagesoptIMAGEโ€”
num_framesoptINT81โ€“16โ€”
image_detailoptCOMBOauto3 options: auto, low, high
temperatureoptFLOAT0.400โ€“2โ€”
max_tokens_captionoptINT204864โ€“32768โ€”
max_tokens_enhanceoptINT204864โ€“32768โ€”
timeoutoptCOMBO1204 options: 30, 60, 120, 300

Outputs (1)

NameTypeDescription
scail2_promptSTRINGโ€”