$ show SkyworkAI/SkyReels-V3
SkyReels-V3 is a multimodal video generation inference framework that supports three core tasks: reference-to-video (generating video from 1-4 reference images), video extension (single-shot and shot-switching), and talking avatar generation (from a portrait and audio). The codebase implements a diffusion transformer architecture (Wan-based) with custom components including a causal 3D VAE, T5 text encoder, CLIP image encoder, wav2vec2 audio encoder, and a flow-matching scheduler. It provides multi-GPU support via xDiT USP and low VRAM options with FP8 quantization and block offloading. The system is designed as a CLI tool with a single entry point (`generate_video.py`) that dispatches to task-specific pipelines. While primarily an application for running inference, it contains several reusable modules such as a custom scheduler, attention wrappers, and color transfer utilities.
The LLM identified 3 files worth highlighting for reuse:
A custom multistep scheduler for flow-matching diffusion models, implementing the UniPC algorithm adapted for flow prediction. It supports configurable solver order, thresholding, and Karras-style sigma schedules. The class is self-contained, inherits from diffusers' SchedulerMixin and ConfigMixin, and can be extracted and reused in other flow-matching pipelines with minimal modification.
A wrapper for flash attention that gracefully handles multiple versions (FlashAttention-2 and FlashAttention-3) with automatic fallback to PyTorch's scaled_dot_product_attention. It provides a unified interface for variable-length sequences, sliding window attention, and deterministic mode. This utility is reusable across any transformer-based project requiring efficient attention.
The `match_and_blend_colors` function performs color transfer between a video tensor and a reference image in CIELAB color space using kornia, with a strength parameter for blending. It handles batched video frames efficiently by merging the time dimension into the batch. This is a clean, self-contained image processing utility that can be reused in any video or image generation pipeline requiring color consistency.