ai-toolkit-trainer
Train custom LoRAs with ostris AI-Toolkit. Covers WAN 2.2/2.1 (people, styles, video motion) and Z-Image (Turbo & Base, low-VRAM…
Build WAN 2.2 First-Last-Frame video workflows. Native dual hi-lo (required), and WanVideoWrapper VACE approaches
Claude Code
$ npx -y skills add artokun/comfyui-mcp --skill wan-flf-video --agent claude-code
Codex
$ npx skills add artokun/comfyui-mcp --skill wan-flf-video -a codex -y
Cursor
$ npx skills add artokun/comfyui-mcp --skill wan-flf-video -a cursor -y
Gemini CLI
$ npx skills add artokun/comfyui-mcp --skill wan-flf-video -a gemini-cli -y
GitHub Copilot
$ npx skills add artokun/comfyui-mcp --skill wan-flf-video -a github-copilot -y
OpenCode
$ npx skills add artokun/comfyui-mcp --skill wan-flf-video -a opencode -y
Windsurf
$ npx skills add artokun/comfyui-mcp --skill wan-flf-video -a windsurf -y
name: wan-flf-video description: Build WAN 2.2 First-Last-Frame video workflows. Native dual hi-lo (required), and WanVideoWrapper VACE approaches globs: - "**/*.json"
First-Last-Frame (FLF) video generation takes a start image and an end image and generates a smooth video transition between them. The WAN 2.2 I2V (Image-to-Video) 14B model is good at this.
**WAN 2.2 I2V uses a split-noise architecture.** Unlike WAN 2.1, the 2.2 model was trained with separate HighNoise and LowNoise components that handle different denoising ranges. **You MUST use both models in a two-pass KSamplerAdvanced setup.** Using a single model produces low-quality, broken output.
**NEVER use a single KSampler with only one model for WAN 2.2 I2V.**
Two native approaches are available: 1. Native Dual Hi-Lo (Default): `WanFirstLastFrameToVideo` + dual `KSamplerAdvanced` two-pass 2. WanVideoWrapper: `WanVideoVACEStartToEndFrame` + `WanVideoVACEEncode` + `WanVideoSampler` (VACE, caching, context windows)
Remix NSFW (Recommended, built-in lightning, fp16): | Model | Loader | Notes | |-------|--------|-------| | `Wan2.2_Remix_NSFW_i2v_14b_high_lighting_fp16_v2.1.safetensors` | `UNETLoader` | HighNoise, built-in lightning acceleration | | `Wan2.2_Remix_NSFW_i2v_14b_low_lighting_fp16_v2.1.safetensors` | `UNETLoader` | LowNoise, built-in lightning acceleration |
GGUF Q8 (Alternative, needs external lightning LoRAs): | Model | Loader | Notes | |-------|--------|-------| | `Wan2.2-I2V-A14B-HighNoise-Q8_0.gguf` | `UnetLoaderGGUF` | HighNoise, quantized | | `Wan2.2-I2V-A14B-LowNoise-Q8_0.gguf` | `UnetLoaderGGUF` | LowNoise, quantized |
Official fp8: | Model | Loader | Notes | |-------|--------|-------| | `wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors` | `UNETLoader` | HighNoise, needs lightning LoRA | | `wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors` | `UNETLoader` | LowNoise, needs lightning LoRA |
| Model | Node | Notes | |-------|------|-------| | `nsfw_wan_umt5-xxl_bf16_fixed.safetensors` | `CLIPLoaderGGUF` (type=`wan`) | NSFW-tuned, pair with Remix models | | `umt5_xxl_fp8_e4m3fn_scaled.safetensors` | `CLIPLoader` (type=`wan`) | Standard UMT5-XXL fp8 |
| Component | Node | Model | |-----------|------|-------| | **CLIP Vision** | `CLIPVisionLoader` | `clip_vision_h.safetensors` | | **VAE** | `VAELoader` | `wan_2.1_vae.safetensors` |
WAN 2.2 uses flow matching and requires `ModelSamplingSD3` applied to each UNET:
{"class_type": "ModelSamplingSD3", "inputs": {"model": ["<unet>", 0], "shift": 5}}shift=5 for lightning/Remix models. shift=8 for standard (non-lightning) models.
Remix NSFW models have lightning baked in. No external LoRA needed.
For GGUF/fp8 models, use paired hi/lo lightning LoRAs:
Each model path has two stacked loaders (Common + Specific), each supporting 4 LoRA slots:
Hi path: UNETLoader(HN) → ModelSamplingSD3(shift=5) → Hi Common Stack → Hi Lora Stack → MODEL_HI Lo path: UNETLoader(LN) → ModelSamplingSD3(shift=5) → Lo Common Stack → Lo Lora Stack → MODEL_LO
Common stacks hold shared LoRAs (quality/style). Specific stacks hold model-variant LoRAs. Set slots to `"None"` when unused. Even with no LoRAs, include the stacks. They pass CLIP through for text encoding.
Input frames MUST be resized to the target video resolution before FLF and CLIPVisionEncode. The end frame inherits width/height from the start frame's resize so the dimensions match.
{"class_type": "ImageResizeKJv2", "inputs": {
"image": ["<load_image>", 0], "width": 480, "height": 720,
"upscale_method": "nearest-exact", "keep_proportion": "crop",
"pad_color": "0, 0, 0", "crop_position": "center", "divisible_by": 2
}}| Parameter | Pass 1 (Hi) | Pass 2 (Lo) | |-----------|-------------|-------------| | model | Hi LoRA stack output | Lo LoRA stack output | | add_noise | **enable** | **disable** | | steps | 4 | 4 | | cfg | 1 | 1 | | sampler_name | **uni_pc** | **uni_pc** | | scheduler | **beta** | **beta** | | start_at_step | 0 | 2 | | end_at_step | 2 | 4 | | return_with_leftover_noise | **enable** | **disable** | | latent_image | WanFLF output[2] | **Pass 1 output[0]** |
Both passes share the same positive/negative conditioning from `WanFirstLastFrameToVideo` outputs [0] and [1].
For standard (non-lightning) models: steps=20, split at step 10, cfg=4, sampler=euler, scheduler=simple, shift=8.
Always include a quality negative prompt:
The tones are vibrant, overexposed, static, details are unclear, subtitles, style, work, painting, image, still, overall grayish, worst quality, low quality, JPEG compression artifacts, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, distorted limbs, merged fingers, motionless image, cluttered background, three legs, many people in the background, walking backwards
Required Inputs: - positive: CONDITIONING (from CLIPTextEncode) - negative: CONDITIONING (from CLIPTextEncode with negative prompt) - vae: VAE - width: INT (from ImageResizeKJv2 end frame output[1]) - height: INT (from ImageResizeKJv2 en
<img src="docs/images/demo-poster.jpg" width="760" alt="The Agent panel driving ComfyUI end to end. Click to watch the demo"> The Agent panel driving ComfyUI end to end. It reads what is installed locally, wires the graph, frees VRAM, and runs the render.
Train custom LoRAs with ostris AI-Toolkit. Covers WAN 2.2/2.1 (people, styles, video motion) and Z-Image (Turbo & Base, low-VRAM…
Anime/illustration text-to-image (ANIMA 1.0, ~2B Cosmos DiT). Use for anime, manga, illustrated characters; accepts Danbooru tags…
Train a custom anime LoRA on the ANIMA base model with Citron's local Gradio trainer (kohya sd-scripts), <6GB VRAM,…
Discover Civitai models with the BUILT-IN download_model action:"search_civitai" and install/generate them locally. Find a…
Diagnose and fix video/image color OBJECTIVELY with the get_image (action:"analyze_color") tool (scopes/stats such as black/white…
Core ComfyUI knowledge covering workflow format, node types, pipeline patterns, and MCP tool usage
Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…