From 824ce8d0e18b43ad641d5d9100beda659288b23c Mon Sep 17 00:00:00 2001 From: lin-bot23 Date: Mon, 15 Jun 2026 22:38:53 +0800 Subject: [PATCH] Add SCAIL-2 Character Replacement tutorial (EN/ZH/JA/KO) New tutorial for the SCAIL-2 end-to-end character animation model built on Wan2.1, covering both Animation and Replacement modes. - tutorials/video/wan/scail2.mdx - zh/tutorials/video/wan/scail2.mdx - ja/tutorials/video/wan/scail2.mdx - ko/tutorials/video/wan/scail2.mdx Registered in Wan2.1 sidebar group for all 4 languages. --- docs.json | 14 ++-- ja/tutorials/video/wan/scail2.mdx | 134 ++++++++++++++++++++++++++++++ ko/tutorials/video/wan/scail2.mdx | 134 ++++++++++++++++++++++++++++++ tutorials/video/wan/scail2.mdx | 134 ++++++++++++++++++++++++++++++ zh/tutorials/video/wan/scail2.mdx | 134 ++++++++++++++++++++++++++++++ 5 files changed, 545 insertions(+), 5 deletions(-) create mode 100644 ja/tutorials/video/wan/scail2.mdx create mode 100644 ko/tutorials/video/wan/scail2.mdx create mode 100644 tutorials/video/wan/scail2.mdx create mode 100644 zh/tutorials/video/wan/scail2.mdx diff --git a/docs.json b/docs.json index 8b5c470fb..f37459412 100644 --- a/docs.json +++ b/docs.json @@ -306,7 +306,8 @@ "tutorials/video/wan/fun-control", "tutorials/video/wan/fun-camera", "tutorials/video/wan/fun-inp", - "tutorials/video/wan/wan-flf" + "tutorials/video/wan/wan-flf", + "tutorials/video/wan/scail2" ] } ] @@ -2831,7 +2832,8 @@ "zh/tutorials/video/wan/fun-control", "zh/tutorials/video/wan/fun-camera", "zh/tutorials/video/wan/fun-inp", - "zh/tutorials/video/wan/wan-flf" + "zh/tutorials/video/wan/wan-flf", + "zh/tutorials/video/wan/scail2" ] } ] @@ -5356,7 +5358,8 @@ "ja/tutorials/video/wan/fun-control", "ja/tutorials/video/wan/fun-camera", "ja/tutorials/video/wan/fun-inp", - "ja/tutorials/video/wan/wan-flf" + "ja/tutorials/video/wan/wan-flf", + "ja/tutorials/video/wan/scail2" ] } ] @@ -7959,7 +7962,8 @@ "ko/tutorials/video/wan/fun-control", "ko/tutorials/video/wan/fun-camera", "ko/tutorials/video/wan/fun-inp", - "ko/tutorials/video/wan/wan-flf" + "ko/tutorials/video/wan/wan-flf", + "ko/tutorials/video/wan/scail2" ] } ] @@ -10390,4 +10394,4 @@ "destination": "/zh/:slug*" } ] -} +} \ No newline at end of file diff --git a/ja/tutorials/video/wan/scail2.mdx b/ja/tutorials/video/wan/scail2.mdx new file mode 100644 index 000000000..bea605789 --- /dev/null +++ b/ja/tutorials/video/wan/scail2.mdx @@ -0,0 +1,134 @@ +--- +title: "ComfyUI SCAIL-2 キャラクター置換ワークフローチュートリアル" +description: "SCAIL-2 を使用して、参照キャラクター画像を駆動ビデオの動きで駆動し、キャラクターアニメーションやビデオ内キャラクター置換を実現します。" +sidebarTitle: "SCAIL-2" +--- + +import UpdateReminder from '/snippets/ja/tutorials/update-reminder.mdx' + +**SCAIL-2** は、Wan2.1 上に構築されたエンドツーエンドのキャラクターアニメーションモデルです。駆動ビデオの動きを参照キャラクター画像に転送することで、キャラクターアニメーション(キャラクターに動きを実行させる)とビデオ内キャラクター置換(追跡された人物を参照キャラクターに置き換える)を可能にします。 + +**主な機能**: +- **エンドツーエンドのキャラクターアニメーション**:駆動ビデオの動きで静止キャラクター画像を駆動 +- **2つのモード**:アニメーションモード(キャラクターが動きを実行)と置換モード(追跡人物を参照キャラクターに置き換え) +- **長尺ビデオ対応**:チャンクベースの重複フレーム拡張生成 +- **組み込み ComfyUI ノード**:ネイティブの `WanSCAILToVideo`、`SCAIL2ColoredMask`、`SAM3` トラッキングを使用。標準モデルダウンロード以外にカスタムノードは不要 + +**関連リンク**: +- [Hugging Face: SCAIL-2](https://huggingface.co/zai-org/SCAIL-2) +- [SCAIL-2 拡散モデル](https://huggingface.co/Comfy-Org/SCAIL-2) + +## SCAIL-2 キャラクター置換ワークフロー + + + + Comfy Cloud で開く + + + JSON をダウンロードするか、テンプレートライブラリで "SCAIL-2" を検索 + + + + + +## ワークフローの仕組み + +このワークフローは、2つのサブグラフノード——**Base** サブグラフ(最初のセグメント)と **Extend** サブグラフ(以降のセグメント)——を使用して、ショートビデオとロングビデオの両方のキャラクターアニメーションをサポートします。 + +1. 駆動ビデオ(`pose_video`)と参照キャラクター画像を**読み込み** +2. **Base サブグラフ** が最初のセグメント(デフォルト 81 フレーム)を処理 +3. **Extend サブグラフ** が 2 番目以降のセグメントを処理し、前のセグメントの `previous_frames` を連鎖 +4. 結果をプレビューして保存 + + + このワークフローはモジュール処理に Subgraph ノードを使用します。ワークフローのカスタマイズと拡張については、サブグラフのドキュメントをご覧ください。 + + +### 長尺ビデオ + +長いビデオの場合は、セグメント数を計算します:`ceil(total_frames / 76)`。最初のセグメント以外はすべて Extend サブグラフを使用します。さらにセグメントを追加するには Extend ノードを複製し、`previous_frames` 出力を連鎖させ、`segment_index` を増やします。 + +> **注意:** `WanSCAILToVideo` はすべてのセグメントを自動でキューできません——各セグメントは手動で実行してください。 + +## 2つのモード + +| モード | `replace_mode` | 駆動ビデオマスク背景 | 説明 | +|--------|:--------------:|:-------------------:|------| +| **置換モード** | `true`(デフォルト) | 白 | 駆動ビデオで追跡された人物を参照キャラクターに置き換え | +| **アニメーションモード** | `false` | 黒 | 参照キャラクターが駆動ビデオの動きを実行 | + +両方のサブグラフノードで `replace_mode` パラメータを設定します。 + +## 入力とパラメータ + +### 共通パラメータ(Base と Extend) + +| パラメータ | 説明 | +|-----------|-------------| +| `pose_video` | 動きを転送する駆動ビデオ | +| `reference_image` | アニメーション化または挿入するキャラクター画像 | +| `prompt` | 出力ビデオの説明 | +| `replace_mode` | `true` = 置換モード、`false` = アニメーションモード | +| `segment_index` | `1` = 最初のチャンク、`2+` = 継続。ポーズオフセット = `76 × (インデックス − 1)` | +| `width` / `height` | 出力解像度(例: `896×512`)。16 で割り切れる必要あり | +| `frame_count` | セグメントあたりのフレーム数(デフォルト: 81) | +| `previous_frame_count` | セグメント間の重複フレーム数(デフォルト: 5) | +| `pose_strength` / `pose_start` / `pose_end` | ポーズ条件付けの強度とタイミング | + +### SAM3 トラッキング(2つの入力) + +`sam3_video_object` と `sam3_image_object` 入力は、SAM3 マスクトラッキングを制御します——**SCAIL-2 の出力プロンプトではありません**。これらはカラーマスクでどのオブジェクトを追跡するかを決定します: + +| 入力 | ターゲット | 出力 | +|-------|--------|--------| +| `sam3_video_object` | 駆動ビデオ | `pose_video_mask` | +| `sam3_image_object` | 参照画像 | `reference_image_mask` | + +- オープンボキャブラリテキストを使用(デフォルト: `human`) +- ビデオと参照で対象が同じ場合は同じ用語を使用 +- ビデオと参照で異なるフォーカスが必要な場合(例:混雑したシーン)は異なる用語を使用 + +## モデルのインストール + +まず ComfyUI を最新バージョンに更新して、組み込みの WanSCAILToVideo および SCAIL2ColoredMask ノードを入手してください。 + +### 必要なモデル + +**diffusion_models** +- [wan2.1_14B_SCAIL_2_fp16.safetensors](https://huggingface.co/Comfy-Org/SCAIL-2/resolve/main/diffusion_models/wan2.1_14B_SCAIL_2_fp16.safetensors) + +**text_encoders**(いずれか) +- [umt5_xxl_fp8_e4m3fn_scaled.safetensors](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors) + +**clip_vision** +- [clip_vision_h.safetensors](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/clip_vision/clip_vision_h.safetensors) + +**vae** +- [Wan2_1_VAE_bf16.safetensors](https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Wan2_1_VAE_bf16.safetensors) + +**loras** +- [lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors](https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors) +- [wan2.1_SCAIL_2_DPO_lora_bf16.safetensors](https://huggingface.co/Comfy-Org/SCAIL-2/resolve/main/loras/wan2.1_SCAIL_2_DPO_lora_bf16.safetensors) + +**checkpoints** +- [sam3.1_multiplex_fp16.safetensors](https://huggingface.co/Comfy-Org/sam3.1/resolve/main/checkpoints/sam3.1_multiplex_fp16.safetensors) + +### ファイル保存場所 + +``` +ComfyUI/ +├── models/ +│ ├── diffusion_models/ +│ │ └── wan2.1_14B_SCAIL_2_fp16.safetensors +│ ├── text_encoders/ +│ │ └── umt5_xxl_fp8_e4m3fn_scaled.safetensors +│ ├── clip_vision/ +│ │ └── clip_vision_h.safetensors +│ ├── vae/ +│ │ └── Wan2_1_VAE_bf16.safetensors +│ ├── loras/ +│ │ ├── lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors +│ │ └── wan2.1_SCAIL_2_DPO_lora_bf16.safetensors +│ └── checkpoints/ +│ └── sam3.1_multiplex_fp16.safetensors +``` diff --git a/ko/tutorials/video/wan/scail2.mdx b/ko/tutorials/video/wan/scail2.mdx new file mode 100644 index 000000000..68e39f49d --- /dev/null +++ b/ko/tutorials/video/wan/scail2.mdx @@ -0,0 +1,134 @@ +--- +title: "ComfyUI SCAIL-2 캐릭터 교체 워크플로우 튜토리얼" +description: "SCAIL-2 모델을 사용하여 참조 캐릭터 이미지를 구동 비디오의 움직임으로 구동하여 캐릭터 애니메이션 또는 비디오 내 캐릭터 교체를 구현합니다." +sidebarTitle: "SCAIL-2" +--- + +import UpdateReminder from '/snippets/ko/tutorials/update-reminder.mdx' + +**SCAIL-2**는 Wan2.1 기반의 엔드투엔드 캐릭터 애니메이션 모델입니다. 구동 비디오의 움직임을 참조 캐릭터 이미지에 전송하여 캐릭터 애니메이션(캐릭터가 동작을 수행하도록 함)과 비디오 내 캐릭터 교체(추적된 인물을 참조 캐릭터로 대체)를 가능하게 합니다. + +**주요 기능**: +- **엔드투엔드 캐릭터 애니메이션**: 구동 비디오의 움직임으로 정적 캐릭터 이미지 구동 +- **두 가지 모드**: 애니메이션 모드(캐릭터가 동작 수행)와 교체 모드(추적된 인물을 참조 캐릭터로 대체) +- **긴 비디오 지원**: 청크 기반 중첩 프레임 확장 생성 +- **내장 ComfyUI 노드**: 네이티브 `WanSCAILToVideo`, `SCAIL2ColoredMask`, `SAM3` 트래킹 사용. 표준 모델 다운로드 외에 사용자 정의 노드 불필요 + +**관련 링크**: +- [Hugging Face: SCAIL-2](https://huggingface.co/zai-org/SCAIL-2) +- [SCAIL-2 확산 모델](https://huggingface.co/Comfy-Org/SCAIL-2) + +## SCAIL-2 캐릭터 교체 워크플로우 + + + + Comfy Cloud에서 열기 + + + JSON 다운로드 또는 템플릿 라이브러리에서 "SCAIL-2" 검색 + + + + + +## 워크플로우 작동 방식 + +이 워크플로우는 두 개의 서브그래프 노드——**Base** 서브그래프(첫 번째 세그먼트)와 **Extend** 서브그래프(이후 세그먼트)——를 사용하여 짧은 비디오와 긴 비디오 모두에서 캐릭터 애니메이션을 지원합니다. + +1. 구동 비디오(`pose_video`)와 참조 캐릭터 이미지 **로드** +2. **Base 서브그래프**가 첫 번째 세그먼트(기본 81프레임) 처리 +3. **Extend 서브그래프**가 두 번째 이상의 세그먼트를 처리하며, 이전 세그먼트의 `previous_frames` 연결 +4. 결과 미리보기 및 저장 + + + 이 워크플로우는 모듈식 처리를 위해 Subgraph 노드를 사용합니다. 서브그래프 문서에서 워크플로우를 사용자 정의하고 확장하는 방법을 알아보세요. + + +### 긴 비디오 + +긴 비디오의 경우 세그먼트 수를 계산합니다: `ceil(total_frames / 76)`. 첫 번째 세그먼트를 제외한 모든 세그먼트는 Extend 서브그래프를 사용합니다. 더 많은 세그먼트를 추가하려면 Extend 노드를 복제하고 `previous_frames` 출력을 연결한 다음 `segment_index`를 증가시킵니다. + +> **참고:** `WanSCAILToVideo`는 모든 세그먼트를 자동으로 대기열에 넣을 수 없습니다——각 세그먼트를 수동으로 실행하세요. + +## 두 가지 모드 + +| 모드 | `replace_mode` | 구동 비디오 마스크 배경 | 설명 | +|------|:--------------:|:---------------------:|------| +| **교체 모드** | `true`(기본값) | 흰색 | 구동 비디오에서 추적된 인물을 참조 캐릭터로 교체 | +| **애니메이션 모드** | `false` | 검은색 | 참조 캐릭터가 구동 비디오의 동작 수행 | + +두 서브그래프 노드 모두에서 `replace_mode` 매개변수를 설정합니다. + +## 입력 및 매개변수 + +### 공통 매개변수(Base 및 Extend) + +| 매개변수 | 설명 | +|-----------|-------------| +| `pose_video` | 움직임을 전송할 구동 비디오 | +| `reference_image` | 애니메이션화하거나 삽입할 캐릭터 이미지 | +| `prompt` | 출력 비디오 설명 | +| `replace_mode` | `true` = 교체 모드, `false` = 애니메이션 모드 | +| `segment_index` | `1` = 첫 번째 청크, `2+` = 연속. 포즈 오프셋 = `76 × (인덱스 − 1)` | +| `width` / `height` | 출력 해상도(예: `896×512`). 16으로 나누어 떨어져야 함 | +| `frame_count` | 세그먼트당 프레임 수(기본값: 81) | +| `previous_frame_count` | 세그먼트 간 중첩 프레임 수(기본값: 5) | +| `pose_strength` / `pose_start` / `pose_end` | 포즈 조건화 강도 및 타이밍 | + +### SAM3 트래킹(두 개의 입력) + +`sam3_video_object` 및 `sam3_image_object` 입력은 SAM3 마스크 트래킹을 제어합니다——**SCAIL-2의 출력 프롬프트가 아닙니다**. 이들은 컬러 마스크로 추적할 객체를 결정합니다: + +| 입력 | 대상 | 출력 | +|-------|--------|--------| +| `sam3_video_object` | 구동 비디오 | `pose_video_mask` | +| `sam3_image_object` | 참조 이미지 | `reference_image_mask` | + +- 개방형 어휘 텍스트 사용(기본값: `human`) +- 비디오와 참조에서 대상이 같으면 동일한 용어 사용 +- 비디오와 참조에서 다른 초점이 필요한 경우(예: 혼잡한 장면) 다른 용어 사용 + +## 모델 설치 + +먼저 ComfyUI를 최신 버전으로 업데이트하여 내장된 WanSCAILToVideo 및 SCAIL2ColoredMask 노드를 확보하세요. + +### 필요한 모델 + +**diffusion_models** +- [wan2.1_14B_SCAIL_2_fp16.safetensors](https://huggingface.co/Comfy-Org/SCAIL-2/resolve/main/diffusion_models/wan2.1_14B_SCAIL_2_fp16.safetensors) + +**text_encoders**(하나 선택) +- [umt5_xxl_fp8_e4m3fn_scaled.safetensors](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors) + +**clip_vision** +- [clip_vision_h.safetensors](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/clip_vision/clip_vision_h.safetensors) + +**vae** +- [Wan2_1_VAE_bf16.safetensors](https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Wan2_1_VAE_bf16.safetensors) + +**loras** +- [lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors](https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors) +- [wan2.1_SCAIL_2_DPO_lora_bf16.safetensors](https://huggingface.co/Comfy-Org/SCAIL-2/resolve/main/loras/wan2.1_SCAIL_2_DPO_lora_bf16.safetensors) + +**checkpoints** +- [sam3.1_multiplex_fp16.safetensors](https://huggingface.co/Comfy-Org/sam3.1/resolve/main/checkpoints/sam3.1_multiplex_fp16.safetensors) + +### 파일 저장 위치 + +``` +ComfyUI/ +├── models/ +│ ├── diffusion_models/ +│ │ └── wan2.1_14B_SCAIL_2_fp16.safetensors +│ ├── text_encoders/ +│ │ └── umt5_xxl_fp8_e4m3fn_scaled.safetensors +│ ├── clip_vision/ +│ │ └── clip_vision_h.safetensors +│ ├── vae/ +│ │ └── Wan2_1_VAE_bf16.safetensors +│ ├── loras/ +│ │ ├── lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors +│ │ └── wan2.1_SCAIL_2_DPO_lora_bf16.safetensors +│ └── checkpoints/ +│ └── sam3.1_multiplex_fp16.safetensors +``` diff --git a/tutorials/video/wan/scail2.mdx b/tutorials/video/wan/scail2.mdx new file mode 100644 index 000000000..b72de7e83 --- /dev/null +++ b/tutorials/video/wan/scail2.mdx @@ -0,0 +1,134 @@ +--- +title: "ComfyUI SCAIL-2 Character Replacement Workflow Tutorial" +description: "Drive a reference character image with a driving video for character animation or in-video character replacement using SCAIL-2." +sidebarTitle: "SCAIL-2" +--- + +import UpdateReminder from '/snippets/tutorials/update-reminder.mdx' + +**SCAIL-2** is an end-to-end character animation model built on Wan2.1. It drives a reference character image with a driving video, enabling both character animation (making a character perform the motion) and in-video character replacement (swapping a tracked person in a video with the reference character). + +**Key Features**: +- **End-to-End Character Animation**: Drive a still character image with motion from a driving video +- **Two Modes**: Animation Mode (character performs the motion) and Replacement Mode (swap tracked person with reference character) +- **Long Video Support**: Chunk-based extended generation with frame overlap between segments +- **Built-in ComfyUI Nodes**: Uses native `WanSCAILToVideo`, `SCAIL2ColoredMask`, and `SAM3` tracking — no custom nodes required beyond standard model downloads + +**Related Links**: +- [Hugging Face: SCAIL-2](https://huggingface.co/zai-org/SCAIL-2) +- [SCAIL-2 Diffusion Model](https://huggingface.co/Comfy-Org/SCAIL-2) + +## SCAIL-2 Character Replacement Workflow + + + + Open in Comfy Cloud + + + Download JSON or search "SCAIL-2" in Template Library + + + + + +## How the Workflow Works + +This workflow uses two subgraph nodes — a **Base** subgraph (first segment) and an **Extend** subgraph (subsequent segments) — to support character animation for both short and long videos. + +1. **Load** a driving video (`pose_video`) and a reference character image +2. **Base subgraph** processes the first segment (81 frames by default) +3. **Extend subgraph** processes additional segments 2+, chaining `previous_frames` from the prior segment +4. Preview the result and save + + + This workflow uses Subgraph nodes for modular processing. Check out the Subgraph documentation to learn how to customize and extend the workflow. + + +### Long Videos + +For longer videos, calculate the number of segments: `ceil(total_frames / 76)`. Each segment except the first uses the Extend subgraph. Duplicate the Extend node for more segments, chain the `previous_frames` output, and increment `segment_index`. + +> **Note:** `WanSCAILToVideo` cannot queue all segments automatically — run each segment manually. + +## Two Modes + +| Mode | `replace_mode` | Driving Mask BG | Summary | +|------|:--------------:|:---------------:|---------| +| **Replacement** | `true` (default) | White | Swap the tracked person in the driving video with the reference character | +| **Animation** | `false` | Black | Reference character performs the driving motion | + +Set the `replace_mode` parameter on both subgraph nodes. + +## Inputs and Parameters + +### Shared Parameters (Base & Extend) + +| Parameter | Description | +|-----------|-------------| +| `pose_video` | The driving video containing motion to transfer | +| `reference_image` | The character image to animate or insert | +| `prompt` | Output video description | +| `replace_mode` | `true` = Replacement, `false` = Animation | +| `segment_index` | `1` for first chunk, `2+` for continuation. Pose offset = `76 × (index − 1)` | +| `width` / `height` | Output resolution, e.g. `896×512`. Must be divisible by 16 | +| `frame_count` | Frames per segment (default: 81) | +| `previous_frame_count` | Overlap frames between segments (default: 5) | +| `pose_strength` / `pose_start` / `pose_end` | Pose conditioning strength and timing | + +### SAM3 Tracking (two inputs) + +The `sam3_video_object` and `sam3_image_object` inputs control the SAM3 mask tracking — **not** the SCAIL-2 output prompt. These determine which objects are tracked for the colored masks: + +| Input | Target | Output | +|-------|--------|--------| +| `sam3_video_object` | Driving video | `pose_video_mask` | +| `sam3_image_object` | Reference image | `reference_image_mask` | + +- Use open-vocabulary text (default: `human`) +- Use the same term when the subject is the same across video and reference +- Use different terms if the video and reference need different focus (e.g., crowded scenes) + +## Model Installation + +Update ComfyUI to the latest version first for the built-in WanSCAILToVideo and SCAIL2ColoredMask nodes. + +### Required Models + +**diffusion_models** +- [wan2.1_14B_SCAIL_2_fp16.safetensors](https://huggingface.co/Comfy-Org/SCAIL-2/resolve/main/diffusion_models/wan2.1_14B_SCAIL_2_fp16.safetensors) + +**text_encoders** (choose one) +- [umt5_xxl_fp8_e4m3fn_scaled.safetensors](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors) + +**clip_vision** +- [clip_vision_h.safetensors](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/clip_vision/clip_vision_h.safetensors) + +**vae** +- [Wan2_1_VAE_bf16.safetensors](https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Wan2_1_VAE_bf16.safetensors) + +**loras** +- [lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors](https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors) +- [wan2.1_SCAIL_2_DPO_lora_bf16.safetensors](https://huggingface.co/Comfy-Org/SCAIL-2/resolve/main/loras/wan2.1_SCAIL_2_DPO_lora_bf16.safetensors) + +**checkpoints** +- [sam3.1_multiplex_fp16.safetensors](https://huggingface.co/Comfy-Org/sam3.1/resolve/main/checkpoints/sam3.1_multiplex_fp16.safetensors) + +### File Storage Locations + +``` +ComfyUI/ +├── models/ +│ ├── diffusion_models/ +│ │ └── wan2.1_14B_SCAIL_2_fp16.safetensors +│ ├── text_encoders/ +│ │ └── umt5_xxl_fp8_e4m3fn_scaled.safetensors +│ ├── clip_vision/ +│ │ └── clip_vision_h.safetensors +│ ├── vae/ +│ │ └── Wan2_1_VAE_bf16.safetensors +│ ├── loras/ +│ │ ├── lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors +│ │ └── wan2.1_SCAIL_2_DPO_lora_bf16.safetensors +│ └── checkpoints/ +│ └── sam3.1_multiplex_fp16.safetensors +``` diff --git a/zh/tutorials/video/wan/scail2.mdx b/zh/tutorials/video/wan/scail2.mdx new file mode 100644 index 000000000..77ed3977b --- /dev/null +++ b/zh/tutorials/video/wan/scail2.mdx @@ -0,0 +1,134 @@ +--- +title: "ComfyUI SCAIL-2 角色替换工作流教程" +description: "使用 SCAIL-2 模型,让参考角色图像跟随驱动视频运动,实现角色动画或视频内角色替换。" +sidebarTitle: "SCAIL-2" +--- + +import UpdateReminder from '/snippets/zh/tutorials/update-reminder.mdx' + +**SCAIL-2** 是构建在 Wan2.1 之上的端到端角色动画模型。它通过驱动视频驱动参考角色图像,支持角色动画(让角色执行动作)和视频内角色替换(将视频中跟踪的人物替换为参考角色)。 + +**主要特性**: +- **端到端角色动画**:用驱动视频的运动驱动静态角色图像 +- **两种模式**:动画模式(角色执行动作)和替换模式(将跟踪人物替换为参考角色) +- **长视频支持**:基于分段的重叠帧扩展生成 +- **内置 ComfyUI 节点**:使用原生 `WanSCAILToVideo`、`SCAIL2ColoredMask` 和 `SAM3` 跟踪,无需额外自定义节点 + +**相关链接**: +- [Hugging Face: SCAIL-2](https://huggingface.co/zai-org/SCAIL-2) +- [SCAIL-2 扩散模型](https://huggingface.co/Comfy-Org/SCAIL-2) + +## SCAIL-2 角色替换工作流 + + + + 在 Comfy Cloud 中打开 + + + 下载 JSON 或在模板库中搜索 "SCAIL-2" + + + + + +## 工作流原理 + +本工作流使用两个子图节点——**Base** 子图(第一段)和 **Extend** 子图(后续段落)——来支持短视频和长视频的角色动画。 + +1. **加载**驱动视频(`pose_video`)和参考角色图像 +2. **Base 子图**处理第一段(默认 81 帧) +3. **Extend 子图**处理第 2 段及后续,将上一段的 `previous_frames` 链接起来 +4. 预览结果并保存 + + + 本工作流使用 Subgraph 节点进行模块化处理。查看子图文档了解如何自定义和扩展工作流。 + + +### 长视频 + +对于较长的视频,计算段落数量:`ceil(total_frames / 76)`。除第一段外均使用 Extend 子图。复制 Extend 节点以增加更多段落,链接 `previous_frames` 输出,并递增 `segment_index`。 + +> **注意:** `WanSCAILToVideo` 无法自动排队所有段落——需要手动运行每个段落。 + +## 两种模式 + +| 模式 | `replace_mode` | 驱动视频蒙版背景 | 说明 | +|------|:--------------:|:---------------:|------| +| **替换模式** | `true`(默认) | 白色 | 将驱动视频中跟踪的人物替换为参考角色 | +| **动画模式** | `false` | 黑色 | 参考角色执行驱动视频的动作 | + +在两个子图节点上均设置 `replace_mode` 参数。 + +## 输入和参数 + +### 共用参数(Base 和 Extend) + +| 参数 | 说明 | +|-----------|-------------| +| `pose_video` | 要传递动作的驱动视频 | +| `reference_image` | 要动画化或插入的角色图像 | +| `prompt` | 输出视频描述 | +| `replace_mode` | `true` = 替换模式,`false` = 动画模式 | +| `segment_index` | `1` 为第一段,`2+` 为延续。姿态偏移 = `76 × (索引 − 1)` | +| `width` / `height` | 输出分辨率,例如 `896×512`。必须能被 16 整除 | +| `frame_count` | 每段帧数(默认:81) | +| `previous_frame_count` | 段落间的重叠帧数(默认:5) | +| `pose_strength` / `pose_start` / `pose_end` | 姿态条件的强度和时间范围 | + +### SAM3 跟踪(两个输入) + +`sam3_video_object` 和 `sam3_image_object` 输入控制 SAM3 蒙版跟踪——**不是** SCAIL-2 的输出提示词。它们确定彩色蒙版跟踪哪些对象: + +| 输入 | 目标 | 输出 | +|-------|--------|--------| +| `sam3_video_object` | 驱动视频 | `pose_video_mask` | +| `sam3_image_object` | 参考图像 | `reference_image_mask` | + +- 使用开放式文本描述(默认:`human`) +- 当视频和参考中的目标相同时使用相同的描述 +- 如果视频和参考需要不同的关注点(例如拥挤场景),使用不同的描述 + +## 模型安装 + +首先将 ComfyUI 更新到最新版本,以获取内置的 WanSCAILToVideo 和 SCAIL2ColoredMask 节点。 + +### 所需模型 + +**diffusion_models** +- [wan2.1_14B_SCAIL_2_fp16.safetensors](https://huggingface.co/Comfy-Org/SCAIL-2/resolve/main/diffusion_models/wan2.1_14B_SCAIL_2_fp16.safetensors) + +**text_encoders**(选择其一) +- [umt5_xxl_fp8_e4m3fn_scaled.safetensors](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors) + +**clip_vision** +- [clip_vision_h.safetensors](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/clip_vision/clip_vision_h.safetensors) + +**vae** +- [Wan2_1_VAE_bf16.safetensors](https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Wan2_1_VAE_bf16.safetensors) + +**loras** +- [lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors](https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors) +- [wan2.1_SCAIL_2_DPO_lora_bf16.safetensors](https://huggingface.co/Comfy-Org/SCAIL-2/resolve/main/loras/wan2.1_SCAIL_2_DPO_lora_bf16.safetensors) + +**checkpoints** +- [sam3.1_multiplex_fp16.safetensors](https://huggingface.co/Comfy-Org/sam3.1/resolve/main/checkpoints/sam3.1_multiplex_fp16.safetensors) + +### 文件存放位置 + +``` +ComfyUI/ +├── models/ +│ ├── diffusion_models/ +│ │ └── wan2.1_14B_SCAIL_2_fp16.safetensors +│ ├── text_encoders/ +│ │ └── umt5_xxl_fp8_e4m3fn_scaled.safetensors +│ ├── clip_vision/ +│ │ └── clip_vision_h.safetensors +│ ├── vae/ +│ │ └── Wan2_1_VAE_bf16.safetensors +│ ├── loras/ +│ │ ├── lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors +│ │ └── wan2.1_SCAIL_2_DPO_lora_bf16.safetensors +│ └── checkpoints/ +│ └── sam3.1_multiplex_fp16.safetensors +```