MAGREF is a video generation application that creates videos from text prompts and reference images using a diffusion model with subject disentanglement. The system implements a modular architecture separating model logic, configurations, distributed computing support, and utility functions. Key entry points include generate.py (main script) and shell scripts for single/multi-GPU inference. The primary data flow involves encoding text prompts with T5, processing reference images through CLIP and custom resizing/padding, running diffusion steps with a WanModel transformer, and decoding latents to video via VAE. External dependencies include PyTorch, Hugging Face Transformers and Diffusers, xfuser for context parallelism, and flash-attention for efficient computation.
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.