diff --git a/docs/assets/cookbook-recipes.json b/docs/assets/cookbook-recipes.json index eadeee53..69e87c9e 100644 --- a/docs/assets/cookbook-recipes.json +++ b/docs/assets/cookbook-recipes.json @@ -1,52 +1,652 @@ { + "version": 4, "recipes": [ { "id": "fastwan21-t2v", + "family": "wan", + "stage": "inference", "task": "Text to video", "label": "FastWan2.1 1.3B (distilled + VSA)", + "summary": "Generate a video in three denoising steps with the distilled FastWan2.1 1.3B checkpoint and video sparse attention.", "model": "FastVideo/FastWan2.1-T2V-1.3B-Diffusers", "source": "scripts/inference/inference_wan_VSA_DMD_1_3B.yaml", - "command": "FASTVIDEO_ATTENTION_BACKEND=VIDEO_SPARSE_ATTN fastvideo generate --config scripts/inference/inference_wan_VSA_DMD_1_3B.yaml" + "command": "FASTVIDEO_ATTENTION_BACKEND=VIDEO_SPARSE_ATTN fastvideo generate --config scripts/inference/inference_wan_VSA_DMD_1_3B.yaml", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "MP4 videos under outputs_video_dmd_1.3B/" }, { "id": "wan22-t2v", + "family": "wan", + "stage": "inference", "task": "Text to video", "label": "Wan2.2 A14B", + "summary": "The maintained high-capacity Wan2.2 text-to-video example with CPU offload settings encoded in its checked-in Python source.", "model": "Wan-AI/Wan2.2-T2V-A14B-Diffusers", "source": "examples/inference/basic/basic_wan2_2.py", - "command": "python examples/inference/basic/basic_wan2_2.py" + "command": "python examples/inference/basic/basic_wan2_2.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 2, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "MP4 videos under video_samples_wan2_2_14B_t2v/" }, { "id": "wan21-i2v", + "family": "wan", + "stage": "inference", "task": "Image to video", "label": "Wan2.1 14B 480P", + "summary": "Animate an input image at 480P using the maintained Wan2.1 YAML configuration and its recorded offload settings.", "model": "Wan-AI/Wan2.1-I2V-14B-480P-Diffusers", "source": "scripts/inference/inference_wan_i2v.yaml", - "command": "fastvideo generate --config scripts/inference/inference_wan_i2v.yaml" - }, - { - "id": "turbowan22-i2v", - "task": "Image to video", - "label": "TurboWan2.2 A14B", - "model": "loayrashid/TurboWan2.2-I2V-A14B-Diffusers", - "source": "examples/inference/basic/basic_turbodiffusion_i2v.py", - "command": "python examples/inference/basic/basic_turbodiffusion_i2v.py" + "command": "fastvideo generate --config scripts/inference/inference_wan_i2v.yaml", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 2, "evidence": "source-configured"}, + "evidence": "Source-backed" }, { "id": "wan22-ti2v", + "family": "wan", + "stage": "inference", "task": "Text or image to video", "label": "Wan2.2 TI2V 5B", + "summary": "Use one maintained 5B checkpoint for text-to-video or add an image input to switch the same recipe to image-to-video.", "model": "Wan-AI/Wan2.2-TI2V-5B-Diffusers", "source": "examples/inference/basic/basic_wan2_2_ti2v.py", - "command": "python examples/inference/basic/basic_wan2_2_ti2v.py" + "command": "python examples/inference/basic/basic_wan2_2_ti2v.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "MP4 videos under video_samples_wan2_2_5B_ti2v/" + }, + { + "id": "fastmetal-1-3b-mlx", + "family": "wan", + "stage": "inference", + "task": "Text to video", + "label": "FastMetal 1.3B", + "summary": "Run the released FastMetal 1.3B QAD checkpoint through FastVideo's native Apple Silicon MLX path.", + "model": "FastVideo/FastMetal-1.3B-QAD", + "source": "examples/inference/basic/mlx_wan_prompt_to_video.py", + "command": "hf download FastVideo/FastMetal-1.3B-QAD --local-dir ./FastMetal-1.3B-QAD\npython examples/inference/basic/mlx_wan_prompt_to_video.py --model-root ./FastMetal-1.3B-QAD --mlx-checkpoint ./FastMetal-1.3B-QAD --height 480 --width 832 --num-frames 81 --prompt \"A bird's-eye view of a misty forest valley at dawn.\" --output-path ./outputs/fastmetal_1_3b.mp4", + "gpu_types": ["Apple Silicon"], + "hardware": { + "platform": "mlx", + "accelerator": "Apple M4 Max", + "system_memory": "36 GB unified memory", + "minimum_memory": "16 GB+ unified memory", + "peak_memory": "3.87 GiB peak MLX memory", + "evidence": "validated", + "evidence_url": "https://github.com/hao-ai-lab/FastVideo/pull/1638" + }, + "evidence": "Verified", + "expected_artifact": "MP4 video at outputs/fastmetal_1_3b.mp4", + "limitations": ["This is the native MLX FastMetal path. basic_mps.py is the older PyTorch MPS demo."] + }, + { + "id": "fastmetal-5b-mlx", + "family": "wan", + "stage": "inference", + "task": "Text or image to video", + "label": "FastMetal 5B", + "summary": "Run the released Wan2.2 5B FastMetal checkpoint with MLX DiT denoising and MLX TAEHV decode.", + "model": "FastVideo/FastMetal-5B-QAD", + "source": "examples/inference/basic/mlx_wan22_generate.py", + "command": "hf download FastVideo/FastMetal-5B-QAD --local-dir ./FastMetal-5B-QAD\npython examples/inference/basic/mlx_wan22_generate.py --mlx-checkpoint ./FastMetal-5B-QAD --text-encoder-root ./FastMetal-5B-QAD --vae-root ./FastMetal-5B-QAD/vae --height 704 --width 1280 --num-frames 81 --prompt \"A cinematic portrait with soft neon lighting and smooth camera motion.\" --output-path ./outputs/fastmetal_5b.mp4", + "gpu_types": ["Apple Silicon"], + "hardware": { + "platform": "mlx", + "accelerator": "Apple M4 Max", + "system_memory": "36 GB unified memory", + "minimum_memory": "16 GB+ unified memory", + "peak_memory": "9.34 GiB peak MLX memory", + "evidence": "validated", + "evidence_url": "https://github.com/hao-ai-lab/FastVideo/pull/1638" + }, + "evidence": "Verified", + "expected_artifact": "MP4 video at outputs/fastmetal_5b.mp4" + }, + { + "id": "fastmetal-14b-mlx", + "family": "wan", + "stage": "inference", + "task": "Text to video", + "label": "FastMetal 14B", + "summary": "Run the released 14B FastMetal QAD checkpoint through the same Apple Silicon MLX entrypoint as the 1.3B release.", + "model": "FastVideo/FastMetal-14B-QAD", + "source": "examples/inference/basic/mlx_wan_prompt_to_video.py", + "command": "hf download FastVideo/FastMetal-14B-QAD --local-dir ./FastMetal-14B-QAD\npython examples/inference/basic/mlx_wan_prompt_to_video.py --model-root ./FastMetal-14B-QAD --mlx-checkpoint ./FastMetal-14B-QAD --height 480 --width 832 --num-frames 81 --prompt \"A wide cinematic landscape at sunrise.\" --output-path ./outputs/fastmetal_14b.mp4", + "gpu_types": ["Apple Silicon"], + "hardware": { + "platform": "mlx", + "accelerator": "Apple M4 Max", + "system_memory": "36 GB unified memory", + "minimum_memory": "36 GB+ unified memory", + "peak_memory": "21.68 GiB peak MLX memory", + "evidence": "validated", + "evidence_url": "https://github.com/hao-ai-lab/FastVideo/pull/1638" + }, + "evidence": "Verified", + "expected_artifact": "MP4 video at outputs/fastmetal_14b.mp4" + }, + { + "id": "turbodiffusion-wan21-1-3b-t2v", + "family": "turbodiffusion", + "stage": "inference", + "task": "Text to video", + "label": "TurboWan2.1 1.3B", + "summary": "A TurboDiffusion-accelerated Wan2.1 1.3B text-to-video run from its maintained single-GPU example.", + "model": "loayrashid/TurboWan2.1-T2V-1.3B-Diffusers", + "source": "examples/inference/basic/basic_turbodiffusion.py", + "command": "python examples/inference/basic/basic_turbodiffusion.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "MP4 videos under video_samples_turbodiffusion/", + "related": ["turbodiffusion-wan21-14b-t2v", "turbowan22-i2v"] + }, + { + "id": "turbodiffusion-wan21-14b-t2v", + "family": "turbodiffusion", + "stage": "inference", + "task": "Text to video", + "label": "TurboWan2.1 14B", + "summary": "TurboDiffusion acceleration applied to the 14B Wan2.1 text-to-video checkpoint; the checked-in source is configured for two GPUs.", + "model": "loayrashid/TurboWan2.1-T2V-14B-Diffusers", + "source": "examples/inference/basic/basic_turbodiffusion_14b.py", + "command": "python examples/inference/basic/basic_turbodiffusion_14b.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 2, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "MP4 videos under video_samples_turbodiffusion_14B/", + "related": ["turbodiffusion-wan21-1-3b-t2v", "turbowan22-i2v"] + }, + { + "id": "turbowan22-i2v", + "family": "turbodiffusion", + "stage": "inference", + "task": "Image to video", + "label": "TurboWan2.2 A14B", + "summary": "A one-to-four-step image-to-video path using TurboDiffusion and the SLA attention backend from its maintained example.", + "model": "loayrashid/TurboWan2.2-I2V-A14B-Diffusers", + "source": "examples/inference/basic/basic_turbodiffusion_i2v.py", + "command": "python examples/inference/basic/basic_turbodiffusion_i2v.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 2, "evidence": "source-configured"}, + "evidence": "Source-backed", + "related": ["turbodiffusion-wan21-14b-t2v"] + }, + { + "id": "ltx2-distilled-t2v", + "family": "ltx2", + "stage": "inference", + "task": "Text to video", + "label": "LTX-2 distilled", + "summary": "The distilled LTX-2 text-to-video checkpoint with audio, from its maintained example. The source is configured for four GPUs.", + "model": "FastVideo/LTX2-Distilled-Diffusers", + "source": "examples/inference/basic/basic_ltx2_distilled.py", + "command": "python examples/inference/basic/basic_ltx2_distilled.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 4, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "MP4 (video with audio) at outputs_video/ltx2_basic/output_ltx2_distilled_t2v.mp4", + "related": ["ltx23-base-t2v"] + }, + { + "id": "ltx23-base-t2v", + "family": "ltx2", + "stage": "inference", + "task": "Text to video", + "label": "LTX-2 base (1088p)", + "summary": "Base LTX-2 text-to-video at 1088x1920 using FastVideo default sampling for LTX2 base. The example loads a community Diffusers mirror of the base checkpoint; registered aliases include Lightricks/LTX-2 and FastVideo/LTX2-Diffusers.", + "model": "Davids048/LTX2-Base-Diffusers", + "source": "examples/inference/basic/basic_ltx2.py", + "command": "python examples/inference/basic/basic_ltx2.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "MP4 (video with audio) at outputs_video/ltx2_basic/output_ltx2_base_t2v_1088_1920_1.1.mp4", + "limitations": ["The maintained example loads the Davids048/LTX2-Base-Diffusers community mirror rather than a Lightricks upstream ID."], + "related": ["ltx2-distilled-t2v"] + }, + { + "id": "hy15-t2v-480p", + "family": "hunyuan", + "stage": "inference", + "task": "Text to video", + "label": "HunyuanVideo 1.5 480P", + "summary": "HunyuanVideo 1.5 text-to-video at 480P with CPU offload enabled in the checked-in source for smaller GPUs.", + "model": "hunyuanvideo-community/HunyuanVideo-1.5-Diffusers-480p_t2v", + "source": "examples/inference/basic/basic_hy15.py", + "command": "python examples/inference/basic/basic_hy15.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "MP4 videos under video_samples_hy15/", + "related": ["hy15-1080p-upscale"] + }, + { + "id": "hy15-1080p-upscale", + "family": "hunyuan", + "stage": "inference", + "task": "Text to video (upscaled)", + "label": "HunyuanVideo 1.5 1080P upscale", + "summary": "Run HunyuanVideo 1.5 through the 480p to 720p to 1080p upscale chain in one maintained script.", + "model": "weizhou03/HunyuanVideo-1.5-Diffusers-1080p-2SR", + "source": "examples/inference/basic/basic_hy15_1080p.py", + "command": "python examples/inference/basic/basic_hy15_1080p.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "MP4 videos under video_samples_hy15_1080p/", + "related": ["hy15-t2v-480p"] + }, + { + "id": "cosmos25-t2w", + "family": "cosmos", + "stage": "inference", + "task": "Text to world", + "label": "Cosmos Predict 2.5 2B", + "summary": "Generate a navigable world video from a text prompt with Cosmos Predict 2.5 2B on a single GPU.", + "model": "KyleShao/Cosmos-Predict2.5-2B-Diffusers", + "source": "examples/inference/basic/basic_cosmos2_5_t2w.py", + "command": "python examples/inference/basic/basic_cosmos2_5_t2w.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed" + }, + { + "id": "kandinsky5-t2v-lite-sft", + "family": "kandinsky5", + "stage": "inference", + "task": "Text to video", + "label": "Kandinsky 5.0 T2V Lite SFT", + "summary": "Kandinsky 5.0 text-to-video (Lite SFT variant) from the maintained example; alternative Lite/Pro checkpoints are listed in the source.", + "model": "kandinskylab/Kandinsky-5.0-T2V-Lite-sft-5s-Diffusers", + "source": "examples/inference/basic/basic_kandinsky5_t2v.py", + "command": "python examples/inference/basic/basic_kandinsky5_t2v.py", + "gpu_types": ["NVIDIA"], + "hardware": { + "platform": "cuda", + "gpu_count": 1, + "accelerator": "NVIDIA B200", + "evidence": "validated", + "evidence_url": "https://github.com/hao-ai-lab/FastVideo/pull/1471" + }, + "evidence": "Verified", + "expected_artifact": "MP4 videos under video_samples_kandinsky5_t2v/", + "related": ["kandinsky5-i2v-pro-distilled"] + }, + { + "id": "kandinsky5-i2v-pro-distilled", + "family": "kandinsky5", + "stage": "inference", + "task": "Image to video", + "label": "Kandinsky 5.0 I2V Pro distilled", + "summary": "Animate an input image with Kandinsky 5.0 I2V Pro (distilled) on a single GPU.", + "model": "kandinskylab/Kandinsky-5.0-I2V-Pro-distilled-5s-Diffusers", + "source": "examples/inference/basic/basic_kandinsky5_i2v.py", + "command": "python examples/inference/basic/basic_kandinsky5_i2v.py", + "gpu_types": ["NVIDIA"], + "hardware": { + "platform": "cuda", + "gpu_count": 1, + "accelerator": "NVIDIA B200", + "peak_memory": "10,365.89 MB peak GPU memory", + "evidence": "validated", + "evidence_url": "https://github.com/hao-ai-lab/FastVideo/pull/1471" + }, + "evidence": "Verified", + "expected_artifact": "MP4 videos under video_samples_kandinsky5_i2v/", + "related": ["kandinsky5-t2v-lite-sft"] + }, + { + "id": "flux2-klein-t2i", + "family": "flux", + "stage": "inference", + "task": "Text to image", + "label": "FLUX.2 Klein 4B", + "summary": "Generate an image in four denoising steps with the distilled FLUX.2 Klein checkpoint.", + "model": "black-forest-labs/FLUX.2-klein-4B", + "source": "examples/inference/basic/basic_flux2_klein.py", + "command": "python examples/inference/basic/basic_flux2_klein.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "PNG image at outputs/flux2/flux2_klein.png", + "related": ["flux2-dev-t2i"] + }, + { + "id": "flux2-dev-t2i", + "family": "flux", + "stage": "inference", + "task": "Text to image", + "label": "FLUX.2 dev", + "summary": "Full FLUX.2 dev text-to-image with embedded guidance and the Mistral3 text encoder, from its maintained example.", + "model": "black-forest-labs/FLUX.2-dev", + "source": "examples/inference/basic/basic_flux2.py", + "command": "python examples/inference/basic/basic_flux2.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "PNG image at outputs/flux2/flux2.png", + "related": ["flux2-klein-t2i"] + }, + { + "id": "flux1-dev-t2i", + "family": "flux", + "stage": "inference", + "task": "Text to image", + "label": "FLUX.1 dev", + "summary": "FLUX.1 dev text-to-image through the Diffusers-backed pipeline. The example defaults to a local weights directory, so this recipe passes the Hugging Face ID explicitly.", + "model": "black-forest-labs/FLUX.1-dev", + "source": "examples/inference/basic/basic_flux_dev.py", + "command": "python examples/inference/basic/basic_flux_dev.py --model-path black-forest-labs/FLUX.1-dev", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "PNG images under outputs/flux_dev/samples/", + "limitations": ["FLUX.1 is loadable by ID but registers no model_family in fastvideo/registry.py; it is grouped under FLUX for documentation only."] + }, + { + "id": "glm-image-t2i", + "family": "glm_image", + "stage": "inference", + "task": "Text to image", + "label": "GLM-Image", + "summary": "GLM-Image text-to-image generation from its maintained example.", + "model": "zai-org/GLM-Image", + "source": "examples/inference/basic/basic_glm_image.py", + "command": "python examples/inference/basic/basic_glm_image.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "PNG image at image_output/landscape.png", + "related": ["glm-image-edit"] + }, + { + "id": "glm-image-edit", + "family": "glm_image", + "stage": "inference", + "task": "Image editing", + "label": "GLM-Image editing", + "summary": "Edit an input image with an instruction prompt using GLM-Image, from its maintained editing example.", + "model": "zai-org/GLM-Image", + "source": "examples/inference/basic/edit_glm_image.py", + "command": "python examples/inference/basic/edit_glm_image.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "PNG image at image_output/edited.png (input: assets/images/couple.jpg)", + "related": ["glm-image-t2i"] + }, + { + "id": "zimage-turbo-t2i", + "family": "zimage", + "stage": "inference", + "task": "Text to image", + "label": "Z-Image Turbo", + "summary": "Z-Image Turbo text-to-image on a single GPU from its maintained example.", + "model": "Tongyi-MAI/Z-Image-Turbo", + "source": "examples/inference/basic/basic_zimage.py", + "command": "python examples/inference/basic/basic_zimage.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "PNG image at outputs/zimage/zimage_turbo.png" + }, + { + "id": "sd35-medium-t2i", + "family": "sd35", + "stage": "inference", + "task": "Text to image", + "label": "Stable Diffusion 3.5 Medium", + "summary": "Stable Diffusion 3.5 Medium text-to-image over a small built-in prompt set, from its maintained example.", + "model": "stabilityai/stable-diffusion-3.5-medium", + "source": "examples/inference/basic/basic_sd35_t2i.py", + "command": "python examples/inference/basic/basic_sd35_t2i.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "PNG images under outputs/sd35/samples/" + }, + { + "id": "minimax-h3-t2v", + "family": "minimax_h3", + "stage": "inference", + "task": "Text to video (with audio)", + "label": "MiniMax H3 T2VA", + "summary": "Generate synchronized video and stereo audio from a structured text prompt with the full MiniMax H3 checkpoint.", + "model": "MiniMaxAI/MiniMax-H3", + "source": "examples/inference/basic/basic_minimax_h3_t2v.py", + "command": "python examples/inference/basic/basic_minimax_h3_t2v.py --prompt \"(S1) A presenter says [English] FastVideo runs MiniMax H3.\"", + "gpu_types": ["NVIDIA"], + "hardware": {"platform": "cuda", "gpu_count": 4, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "MP4 with synchronized audio at outputs/minimax_h3_t2v/minimax_h3_t2v.mp4", + "limitations": ["The checked-in example defaults to four-way sequence parallelism. It does not record a GPU model or memory requirement."] + }, + { + "id": "fasth3-preview-cuda", + "group": "fasth3-preview", + "group_label": "FastH3 Preview", + "group_task": "4-step text to video + audio", + "family": "minimax_h3", + "stage": "inference", + "task": "Few-step text to video (with audio)", + "label": "FastH3 Preview on CUDA", + "summary": "Run the DMD2-distilled FastH3 Preview with four DiT forwards, trained H3 sparse attention, compiled decode, and synchronized audio.", + "model": "FastVideo/FastVideo-Minimax-FastH3-Preview-v0.2", + "source": "examples/inference/basic/basic_fasth3.py", + "command": "UV_TORCH_BACKEND=cu130 uv pip install -e \".[fasth3]\"\npython examples/inference/basic/basic_fasth3.py --prompt \"(S1) A presenter says [English] FastVideo runs FastH3.\" --profile all", + "gpu_types": ["NVIDIA"], + "hardware": { + "platform": "cuda", + "gpu_count": 4, + "accelerator": "NVIDIA GB200", + "evidence": "validated", + "evidence_url": "https://github.com/hao-ai-lab/FastVideo/pull/1731" + }, + "evidence": "Verified", + "expected_artifact": "Warmup and measured MP4 files under outputs/fasth3/", + "limitations": ["The default all profile is the measured GB200 performance route and can change floating-point operation order. Use --profile strict --no-inference-torch-compile for the eager strict route."] + }, + { + "id": "fasth3-preview-mlx", + "group": "fasth3-preview", + "group_label": "FastH3 Preview", + "group_task": "4-step text to video + audio", + "family": "minimax_h3", + "stage": "inference", + "task": "Few-step text to video (with audio)", + "label": "FastH3 Preview on MLX", + "summary": "Run FastH3 Preview on Apple Silicon with a locally converted INT6 DiT, streamed Qwen3-VL conditioning, and native MLX video and audio VAEs.", + "model": "FastVideo/FastVideo-Minimax-FastH3-Preview-v0.2", + "source": "examples/inference/basic/mlx_fasth3.py", + "command": "hf download FastVideo/FastVideo-Minimax-FastH3-Preview-v0.2 --local-dir ./FastH3-Preview-v0.2\npython scripts/checkpoint_conversion/convert_minimax_h3_mlx.py --model-root ./FastH3-Preview-v0.2/transformer --out ./FastH3-MLX --formats \"int6\"\npython examples/inference/basic/mlx_fasth3.py --model-root ./FastH3-Preview-v0.2 --mlx-checkpoint ./FastH3-MLX/int6 --prompt \"(S1) A presenter says [English] FastVideo runs FastH3.\" --height 480 --width 832 --num-frames 124 --seed 2026 --output-path ./outputs/fasth3_int6.mp4", + "gpu_types": ["Apple Silicon"], + "hardware": { + "platform": "mlx", + "accelerator": "Apple M4 Max", + "system_memory": "36 GB unified memory", + "peak_memory": "19.63 GiB peak MLX memory during denoising", + "evidence": "validated", + "evidence_url": "https://github.com/hao-ai-lab/FastVideo/pull/1770" + }, + "evidence": "Verified", + "expected_artifact": "MP4 with H.264 video and stereo AAC audio at outputs/fasth3_int6.mp4", + "limitations": ["The MLX path supports T2VA and optional temporal --fast mode. FL2VA, Ref2VA, spatial fast mode, two-pass refinement, and VSA are not wired."] + }, + { + "id": "minimax-h3-fl2va", + "family": "minimax_h3", + "stage": "inference", + "task": "First/last frame to video (with audio)", + "label": "MiniMax H3 FL2VA", + "summary": "Animate a first frame, optionally guide the final frame, and generate synchronized audio with the full MiniMax H3 checkpoint.", + "model": "MiniMaxAI/MiniMax-H3", + "source": "examples/inference/basic/basic_minimax_h3_fl2va.py", + "command": "python examples/inference/basic/basic_minimax_h3_fl2va.py --image path/to/first-frame.png --prompt \"(S1) The subject turns toward the camera and says [English] Hello.\"", + "gpu_types": ["NVIDIA"], + "hardware": {"platform": "cuda", "gpu_count": 4, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "MP4 with synchronized audio at outputs/minimax_h3_fl2va/minimax_h3_fl2va.mp4", + "limitations": ["Pass --last-image to constrain the final frame. The checked-in source defaults to four GPUs."] + }, + { + "id": "minimax-h3-ref2va", + "family": "minimax_h3", + "stage": "inference", + "task": "Reference media to video (with audio)", + "label": "MiniMax H3 Ref2VA", + "summary": "Condition H3 on an ordered reference video and optional audio reference, then generate a new synchronized video and audio result.", + "model": "MiniMaxAI/MiniMax-H3", + "source": "examples/inference/basic/basic_minimax_h3_ref2va.py", + "command": "python examples/inference/basic/basic_minimax_h3_ref2va.py --reference-video path/to/reference.mp4 --prompt \"Create a new scene that preserves the reference identity and motion language.\"", + "gpu_types": ["NVIDIA"], + "hardware": {"platform": "cuda", "gpu_count": 4, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "MP4 with synchronized audio at outputs/minimax_h3_ref2va/minimax_h3_ref2va.mp4", + "limitations": ["Pass --reference-audio for an additional audio reference. The checked-in source defaults to four GPUs."] + }, + { + "id": "fasth3-lora-preview", + "family": "minimax_h3", + "stage": "inference", + "task": "LoRA-adapted few-step video (with audio)", + "label": "FastH3 LoRA Preview", + "summary": "Apply a FastH3 preview adapter at load time while keeping the shared four-forward performance profile and synchronized audio output.", + "model": "MiniMaxAI/MiniMax-H3", + "source": "examples/inference/basic/basic_fasth3_lora_preview.py", + "command": "python examples/inference/basic/basic_fasth3_lora_preview.py --lora-path path/to/adapter.safetensors --prompt \"(S1) A presenter says [English] This is an adapted Fast H3 run.\"", + "gpu_types": ["NVIDIA"], + "hardware": { + "platform": "cuda", + "gpu_count": 4, + "accelerator": "NVIDIA B200", + "evidence": "validated", + "evidence_url": "https://github.com/hao-ai-lab/FastVideo/pull/1771" + }, + "evidence": "Verified", + "expected_artifact": "Warmup and measured MP4 files under outputs/fasth3_lora_preview/", + "limitations": ["Supply a compatible FastH3 adapter. The script infers dense or VSA attention from the adapter payload unless you override it."] + }, + { + "id": "longcat-t2v", + "family": "longcat", + "stage": "inference", + "task": "Text to video", + "label": "LongCat Video T2V", + "summary": "LongCat Video text-to-video at 480p (50 steps), with distilled and 720p refinement passes included in the same maintained script.", + "model": "FastVideo/LongCat-Video-T2V-Diffusers", + "source": "examples/inference/basic/basic_longcat_t2v.py", + "command": "python examples/inference/basic/basic_longcat_t2v.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "MP4 videos under outputs_video/longcat_t2v_basic/, longcat_t2v_distill/, and longcat_t2v_refine_720p/", + "related": ["longcat-i2v"] + }, + { + "id": "longcat-i2v", + "family": "longcat", + "stage": "inference", + "task": "Image to video", + "label": "LongCat Video I2V", + "summary": "LongCat Video image-to-video with optional distilled and refinement passes, from its maintained example.", + "model": "FastVideo/LongCat-Video-I2V-Diffusers", + "source": "examples/inference/basic/basic_longcat_i2v.py", + "command": "python examples/inference/basic/basic_longcat_i2v.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "MP4 videos under outputs_video/longcat_i2v_basic/ and longcat_i2v_distill/", + "related": ["longcat-t2v"] + }, + { + "id": "stable-audio-open-t2a", + "family": "stable_audio", + "stage": "inference", + "task": "Text to audio", + "label": "Stable Audio Open 1.0", + "summary": "Six-second text-to-audio generation with Stable Audio Open 1.0 from its maintained example; duration and steps are documented knobs in the source.", + "model": "FastVideo/stable-audio-open-1.0-Diffusers", + "source": "examples/inference/basic/basic_stable_audio.py", + "command": "python examples/inference/basic/basic_stable_audio.py", + "gpu_types": ["NVIDIA"], + "hardware": { + "platform": "cuda", + "gpu_count": 1, + "accelerator": "NVIDIA B200", + "evidence": "validated", + "evidence_url": "https://github.com/hao-ai-lab/FastVideo/pull/1260" + }, + "evidence": "Verified", + "expected_artifact": "WAV audio at outputs_audio/stable_audio_basic/output_stable_audio.wav", + "limitations": ["Must load the FastVideo converted Diffusers repo; upstream stabilityai monolithic checkpoints are not loader-compatible (see scripts/checkpoint_conversion/stable_audio_to_diffusers.py)."], + "related": ["stable-audio-small-t2a"] + }, + { + "id": "stable-audio-small-t2a", + "family": "stable_audio", + "stage": "inference", + "task": "Text to audio", + "label": "Stable Audio Open Small", + "summary": "The smaller Stable Audio Open variant with its own shorter training window, from its maintained example.", + "model": "FastVideo/stable-audio-open-small-Diffusers", + "source": "examples/inference/basic/basic_stable_audio_small.py", + "command": "python examples/inference/basic/basic_stable_audio_small.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "related": ["stable-audio-open-t2a"] + }, + { + "id": "mmaudio-v2a", + "family": "mmaudio", + "stage": "inference", + "task": "Video/Text to audio", + "label": "MMAudio large 44k v2", + "summary": "Add synchronized audio to a video (or from a prompt) with MMAudio large 44k v2. The example reads the model path from MMAUDIO_MODEL_PATH; this recipe passes the converted Hugging Face repo explicitly.", + "model": "FastVideo/MMAudio-large-44k-v2-Diffusers", + "source": "examples/inference/basic/basic_mmaudio.py", + "command": "MMAUDIO_MODEL_PATH=FastVideo/MMAudio-large-44k-v2-Diffusers python examples/inference/basic/basic_mmaudio.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "limitations": ["The upstream checkpoint must be converted to Diffusers layout via scripts/checkpoint_conversion/convert_mmaudio_to_diffusers.py unless loaded from the FastVideo converted repo as done here."] }, { "id": "matrix-game-2", + "family": "matrixgame", + "stage": "inference", "task": "Interactive world", "label": "Matrix Game 2.0", + "summary": "Generate an interactive-world sequence from the maintained Matrix Game 2.0 example.", "model": "FastVideo/Matrix-Game-2.0-Base-Distilled-Diffusers", "source": "examples/inference/basic/basic_matrixgame2.py", - "command": "python examples/inference/basic/basic_matrixgame2.py" + "command": "python examples/inference/basic/basic_matrixgame2.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "related": ["matrix-game-3-i2w"] + }, + { + "id": "matrix-game-3-i2w", + "family": "matrixgame", + "stage": "inference", + "task": "Interactive world", + "label": "Matrix Game 3.0", + "summary": "Drive Matrix Game 3.0 from an input image plus prompt at 720p, three steps, from its maintained example.", + "model": "FastVideo/Matrix-Game-3.0-Base-Distilled-Diffusers", + "source": "examples/inference/basic/basic_matrixgame3.py", + "command": "python examples/inference/basic/basic_matrixgame3.py", + "gpu_types": ["NVIDIA"], + "hardware": {"gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "MP4 videos under video_samples_matrixgame3/", + "related": ["matrix-game-2"] } ] } diff --git a/docs/assets/cookbook.js b/docs/assets/cookbook.js index 1b985bc4..75d6df05 100644 --- a/docs/assets/cookbook.js +++ b/docs/assets/cookbook.js @@ -1,57 +1,357 @@ (() => { - let recipesPromise; + const patternCharacters = "0123456789ABCDEF"; - const loadRecipes = (url) => { - recipesPromise ||= fetch(url).then((response) => { + const loadRecipes = (url) => + fetch(url).then((response) => { if (!response.ok) throw new Error(`HTTP ${response.status}`); return response.json(); }); - return recipesPromise; + + const initPatterns = (root) => { + root.querySelectorAll("[data-cookbook-pattern]").forEach((pattern, patternIndex) => { + if (pattern.dataset.patternReady) return; + pattern.dataset.patternReady = "true"; + let value = ""; + for (let index = 0; index < 1800; index += 1) { + const characterIndex = (index * 7 + patternIndex * 11) % patternCharacters.length; + value += patternCharacters.charAt(characterIndex); + if (index % 4 === 3 && index % 32 !== 31) value += " "; + if (index % 32 === 31) value += "\n"; + } + pattern.textContent = value; + }); + }; + + const groupIdFor = (recipe) => recipe.group || recipe.id; + + const gpuCountLabel = (hardware) => { + const count = hardware?.gpu_count; + return `${count} GPU${count === 1 ? "" : "s"}`; + }; + + const runtimeFor = (recipe) => { + const platform = recipe.hardware?.platform || "cuda"; + if (platform === "mlx") { + return { + id: "mlx", + label: "Apple Silicon · MLX", + hint: + recipe.hardware?.minimum_memory || + [recipe.hardware?.accelerator, recipe.hardware?.system_memory].filter(Boolean).join(" · ") || + "Memory not recorded", + }; + } + if (platform === "mps") { + return { + id: "mps", + label: "Apple Silicon · MPS", + hint: recipe.hardware?.minimum_memory || recipe.hardware?.system_memory || "Memory not recorded", + }; + } + const hardware = recipe.hardware || {}; + return { + id: "cuda", + label: "NVIDIA CUDA", + hint: hardware.accelerator + ? `${hardware.accelerator} · ${gpuCountLabel(hardware)}` + : `${gpuCountLabel(hardware)} configured · GPU model not recorded`, + }; + }; + + const runtimeSummary = (recipe) => { + const runtime = runtimeFor(recipe); + const hardware = recipe.hardware || {}; + if (runtime.id === "mlx") { + return [hardware.accelerator || "Apple Silicon", hardware.system_memory || hardware.minimum_memory, "MLX"] + .filter(Boolean) + .join(" · "); + } + if (runtime.id === "mps") { + return [hardware.accelerator || "Apple Silicon", hardware.system_memory || hardware.minimum_memory, "PyTorch MPS"] + .filter(Boolean) + .join(" · "); + } + if (hardware.accelerator) return [hardware.accelerator, gpuCountLabel(hardware)].join(" · "); + return `NVIDIA CUDA · ${gpuCountLabel(hardware)} configured · GPU model and VRAM not recorded`; + }; + + const renderHardwareEvidence = (container, badge, recipe) => { + const hardware = recipe.hardware || {}; + const runtime = runtimeFor(recipe); + const isValidated = hardware.evidence === "validated"; + container.classList.toggle("cookbook-hardware-state--verified", isValidated); + container.classList.toggle("cookbook-hardware-state--source", !isValidated); + badge.classList.toggle("cookbook-badge--verified", isValidated); + badge.classList.toggle("cookbook-badge--configured", !isValidated); + badge.textContent = isValidated ? "Recorded run" : "Source config"; + + const heading = document.createElement("strong"); + heading.textContent = isValidated ? "Recorded hardware" : "Source configuration"; + const details = document.createElement("span"); + + if (isValidated) { + const recorded = [ + hardware.accelerator, + runtime.id === "cuda" ? gpuCountLabel(hardware) : hardware.system_memory, + ].filter(Boolean); + const statements = [`${recorded.join(" · ")}.`]; + if (hardware.minimum_memory) statements.push(`Documented minimum: ${hardware.minimum_memory}.`); + if (hardware.peak_memory) statements.push(`Measured: ${hardware.peak_memory}.`); + if (!hardware.minimum_memory) statements.push("This recorded device is not a minimum requirement."); + details.textContent = ` ${statements.join(" ")}`; + } else if (runtime.id === "cuda") { + details.textContent = ` NVIDIA CUDA · ${gpuCountLabel(hardware)}. The source does not record the GPU model or VRAM.`; + } else { + details.textContent = ` ${runtime.label}. The source does not record a device or memory requirement.`; + } + + container.replaceChildren(heading, details); + if (hardware.evidence_url) { + const evidenceLink = document.createElement("a"); + evidenceLink.href = hardware.evidence_url; + evidenceLink.textContent = "View run evidence"; + evidenceLink.setAttribute("aria-label", `View recorded hardware evidence for ${recipe.label}`); + container.append(" ", evidenceLink); + } + }; + + const compactLifecycle = (root) => { + const lifecycle = root.querySelector(".cookbook-lifecycle"); + if (!lifecycle || lifecycle.dataset.compact) return; + lifecycle.dataset.compact = "true"; + const stages = [...lifecycle.querySelectorAll(".cookbook-lifecycle__stage")]; + const active = stages.find((stage) => stage.classList.contains("cookbook-lifecycle__stage--active")); + const planned = stages + .filter((stage) => stage !== active) + .map((stage) => stage.childNodes[0]?.textContent?.trim()) + .filter(Boolean); + const summary = document.createElement("span"); + summary.className = "cookbook-lifecycle__summary"; + summary.textContent = `Next: ${planned.join(", ")}`; + lifecycle.replaceChildren(...(active ? [active] : []), summary); + }; + + const initFamilyBuilder = async (root) => { + const family = root.dataset.family; + if (!family) return; + + compactLifecycle(root); + + const builderHeading = root.querySelector(".cookbook-builder__intro h2"); + const builderIntro = root.querySelector(".cookbook-builder__intro > p"); + if (builderHeading) builderHeading.textContent = "Pick a recipe and runtime"; + if (builderIntro) { + builderIntro.textContent = + "Start with the result you want, then choose one of the runtimes FastVideo actually maintains for it."; + } + + const selectionLabels = root.querySelectorAll(".cookbook-selection-row__label"); + if (selectionLabels[0]) { + selectionLabels[0].querySelector("strong").textContent = "Recipe"; + selectionLabels[0].querySelector("span").textContent = "Task and checkpoint"; + } + if (selectionLabels[1]) { + selectionLabels[1].querySelector("strong").textContent = "Runtime"; + selectionLabels[1].querySelector("span").textContent = "Maintained paths only"; + } + + const modelOptions = root.querySelector("[data-cookbook-model-options]"); + const hardwareOptions = root.querySelector("[data-cookbook-hardware-options]"); + const description = root.querySelector("[data-cookbook-description]"); + const hardwareNote = root.querySelector(".cookbook-hardware-note"); + const label = root.querySelector("[data-cookbook-label]"); + const model = root.querySelector("[data-cookbook-model]"); + const task = root.querySelector("[data-cookbook-task]"); + const hardwareValue = root.querySelector("[data-cookbook-gpus]"); + const artifact = root.querySelector("[data-cookbook-artifact]"); + const evidenceCell = root.querySelector("[data-cookbook-evidence]"); + const source = root.querySelector("[data-cookbook-source]"); + const modelLink = root.querySelector("[data-cookbook-model-link]"); + const command = root.querySelector("[data-cookbook-command]"); + const status = root.querySelector("[data-cookbook-status]"); + const hardwareState = root.querySelector("[data-cookbook-hardware-state]"); + const hardwareBadge = root.querySelector("[data-cookbook-hardware-badge]"); + const count = root.querySelector("[data-cookbook-count]"); + const result = root.querySelector(".cookbook-result"); + const commandBlock = root.querySelector(".cookbook-command"); + + modelOptions.setAttribute("aria-label", "Recipe"); + hardwareOptions.setAttribute("aria-label", "Runtime"); + + if (hardwareNote) { + hardwareNote.textContent = "Exact device and memory details appear only when a recorded run supports them."; + } + const runtimeFactLabel = hardwareValue?.closest("div")?.querySelector("dt"); + if (runtimeFactLabel) runtimeFactLabel.textContent = "Hardware"; + + let recipes; + try { + ({ recipes } = await loadRecipes(root.dataset.recipes)); + } catch (error) { + if (status) status.textContent = "Recipes could not be loaded. Use the maintained examples link below."; + console.error("Failed to load FastVideo cookbook recipes", error); + return; + } + + const familyRecipes = recipes.filter((recipe) => recipe.family === family); + if (!familyRecipes.length) return; + + const byId = new Map(familyRecipes.map((recipe) => [recipe.id, recipe])); + const groups = new Map(); + familyRecipes.forEach((recipe) => { + const groupId = groupIdFor(recipe); + if (!groups.has(groupId)) groups.set(groupId, []); + groups.get(groupId).push(recipe); + }); + if (count) count.textContent = `${familyRecipes.length} maintained recipes`; + + modelOptions.replaceChildren(); + groups.forEach((groupRecipes, groupId) => { + const representative = groupRecipes[0]; + const option = document.createElement("button"); + option.type = "button"; + option.dataset.recipeGroup = groupId; + option.setAttribute("aria-pressed", "false"); + const optionLabel = document.createElement("strong"); + optionLabel.textContent = representative.group_label || representative.label; + const optionTask = document.createElement("span"); + optionTask.textContent = representative.group_task || representative.task; + option.append(optionLabel, optionTask); + modelOptions.append(option); + }); + + const query = new URLSearchParams(window.location.search); + const requestedRecipe = query.get("recipe"); + const defaultRecipeId = familyRecipes[0].id; + let selectedRecipeId = requestedRecipe && byId.has(requestedRecipe) ? requestedRecipe : defaultRecipeId; + let selectedGroupId = groupIdFor(byId.get(selectedRecipeId)); + + const renderRuntimeOptions = () => { + const groupRecipes = groups.get(selectedGroupId) || []; + hardwareOptions.replaceChildren(); + groupRecipes.forEach((recipe) => { + const runtime = runtimeFor(recipe); + const option = document.createElement("button"); + option.type = "button"; + option.dataset.recipeId = recipe.id; + option.dataset.runtimeId = runtime.id; + option.setAttribute("aria-pressed", "false"); + const optionLabel = document.createElement("strong"); + optionLabel.textContent = runtime.label; + const optionHint = document.createElement("span"); + optionHint.textContent = runtime.hint; + option.append(optionLabel, optionHint); + hardwareOptions.append(option); + }); + }; + + let notes = root.querySelector("[data-cookbook-notes]"); + if (!notes) { + notes = document.createElement("aside"); + notes.className = "cookbook-recipe-notes"; + notes.dataset.cookbookNotes = ""; + notes.hidden = true; + result.insertBefore(notes, commandBlock); + } + + const render = ({ groupChanged = false, historyMode = "replace" } = {}) => { + if (!byId.has(selectedRecipeId)) selectedRecipeId = defaultRecipeId; + let recipe = byId.get(selectedRecipeId); + if (groupChanged || groupIdFor(recipe) !== selectedGroupId) { + const currentRuntime = runtimeFor(recipe).id; + const groupRecipes = groups.get(selectedGroupId) || []; + recipe = groupRecipes.find((candidate) => runtimeFor(candidate).id === currentRuntime) || groupRecipes[0]; + selectedRecipeId = recipe.id; + } + + selectedGroupId = groupIdFor(recipe); + renderRuntimeOptions(); + const runtime = runtimeFor(recipe); + + modelOptions.querySelectorAll("button").forEach((option) => { + const selected = option.dataset.recipeGroup === selectedGroupId; + option.classList.toggle("cookbook-option--selected", selected); + option.setAttribute("aria-pressed", String(selected)); + }); + hardwareOptions.querySelectorAll("button").forEach((option) => { + const selected = option.dataset.recipeId === recipe.id; + option.classList.toggle("cookbook-option--selected", selected); + option.setAttribute("aria-pressed", String(selected)); + }); + + description.textContent = recipe.summary; + label.textContent = recipe.label; + model.textContent = recipe.model; + task.textContent = recipe.task; + hardwareValue.textContent = runtimeSummary(recipe); + if (artifact) artifact.textContent = recipe.expected_artifact || "Not yet documented for this recipe."; + if (evidenceCell) { + evidenceCell.textContent = recipe.evidence || "Source-backed"; + evidenceCell.classList.toggle("cookbook-badge--verified", recipe.evidence === "Verified"); + evidenceCell.classList.toggle("cookbook-badge--source-backed", recipe.evidence !== "Verified"); + } + source.href = `https://github.com/hao-ai-lab/FastVideo/blob/main/${recipe.source}`; + modelLink.href = `https://huggingface.co/${recipe.model}`; + command.textContent = recipe.command; + + renderHardwareEvidence(hardwareState, hardwareBadge, recipe); + + const limitations = recipe.limitations || []; + notes.replaceChildren(); + notes.hidden = limitations.length === 0; + if (limitations.length) { + const notesHeading = document.createElement("strong"); + notesHeading.textContent = "Know before you run"; + const notesList = document.createElement("ul"); + limitations.forEach((item) => { + const listItem = document.createElement("li"); + listItem.textContent = item; + notesList.append(listItem); + }); + notes.append(notesHeading, notesList); + } + + const nextQuery = new URLSearchParams(window.location.search); + nextQuery.set("recipe", recipe.id); + nextQuery.set("runtime", runtime.id); + nextQuery.delete("gpus"); + const nextUrl = `${window.location.pathname}?${nextQuery.toString()}${window.location.hash}`; + if (historyMode === "push") window.history.pushState({}, "", nextUrl); + else if (historyMode === "replace") window.history.replaceState({}, "", nextUrl); + status.textContent = `${recipe.label} selected for ${runtime.label}.`; + }; + + modelOptions.addEventListener("click", (event) => { + const option = event.target.closest("button[data-recipe-group]"); + if (!option) return; + selectedGroupId = option.dataset.recipeGroup; + render({ groupChanged: true, historyMode: "push" }); + }); + hardwareOptions.addEventListener("click", (event) => { + const option = event.target.closest("button[data-recipe-id]"); + if (!option) return; + selectedRecipeId = option.dataset.recipeId; + selectedGroupId = groupIdFor(byId.get(selectedRecipeId)); + render({ historyMode: "push" }); + }); + + render(); + + window.addEventListener("popstate", () => { + const nextQuery = new URLSearchParams(window.location.search); + const nextRecipe = nextQuery.get("recipe"); + selectedRecipeId = nextRecipe && byId.has(nextRecipe) ? nextRecipe : defaultRecipeId; + selectedGroupId = groupIdFor(byId.get(selectedRecipeId)); + render({ historyMode: "none" }); + }); }; const init = () => { - document.querySelectorAll("[data-cookbook]").forEach(async (root) => { + initPatterns(document); + document.querySelectorAll("[data-cookbook][data-family]").forEach((root) => { if (root.dataset.initialized) return; root.dataset.initialized = "true"; - - const select = root.querySelector("[data-cookbook-recipe]"); - const model = root.querySelector("[data-cookbook-model]"); - const source = root.querySelector("[data-cookbook-source]"); - const command = root.querySelector("[data-cookbook-command]"); - const status = root.querySelector("[data-cookbook-status]"); - - try { - const { recipes } = await loadRecipes(root.dataset.recipes); - const byId = new Map(recipes.map((recipe) => [recipe.id, recipe])); - const groups = new Map(); - - select.replaceChildren(); - recipes.forEach((recipe) => { - if (!groups.has(recipe.task)) { - const group = document.createElement("optgroup"); - group.label = recipe.task; - groups.set(recipe.task, group); - select.append(group); - } - groups.get(recipe.task).append(new Option(recipe.label, recipe.id)); - }); - - const render = () => { - const recipe = byId.get(select.value); - model.textContent = recipe.model; - source.textContent = recipe.source; - source.href = `https://github.com/hao-ai-lab/FastVideo/blob/main/${recipe.source}`; - command.textContent = recipe.command; - status.textContent = `${recipe.label} selected.`; - }; - - select.addEventListener("change", render); - select.disabled = false; - render(); - } catch (error) { - status.textContent = "Recipes could not be loaded. Use the examples link below."; - console.error("Failed to load FastVideo cookbook recipes", error); - } + initFamilyBuilder(root); }); }; diff --git a/docs/assets/custom.css b/docs/assets/custom.css index b87ef67c..3c7a6ef7 100644 --- a/docs/assets/custom.css +++ b/docs/assets/custom.css @@ -4,75 +4,843 @@ max-width: 0; } -/* Keep header cell paragraph content tight (avoid CSS nesting for compatibility) */ .vertical-table-header th.head:not(.stub) p { margin: 0; } -/* Image sizing classes */ -.image-small { - max-width: 200px; - height: auto; -} +.image-small { max-width: 200px; height: auto; } +.image-medium { max-width: 400px; height: auto; } +.image-large { max-width: 600px; height: auto; } +.image-full { max-width: 100%; height: auto; } -.image-medium { - max-width: 400px; - height: auto; -} - -.image-large { - max-width: 600px; - height: auto; -} - -.image-full { - max-width: 100%; - height: auto; -} - -/* Responsive images */ img { max-width: 100%; height: auto; } -/* Center images */ .image-center { display: block; margin: 0 auto; } -.cookbook-picker { - padding: 1rem; - border: 0.05rem solid var(--md-default-fg-color--lightest); - border-radius: 0.2rem; +.md-typeset h1:has(+ .cookbook-shell) { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; } -.cookbook-picker select { +.md-content__inner:has(.cookbook-shell) .copy-page-button { + display: none; +} + +.cookbook-shell { + --cookbook-accent: #6366f1; + --cookbook-accent-strong: #4f46e5; + --cookbook-accent-soft: rgba(99, 102, 241, 0.12); + --cookbook-border: var(--md-default-fg-color--lightest); + --cookbook-surface: var(--md-default-bg-color); + --cookbook-surface-raised: color-mix(in srgb, var(--md-default-bg-color) 95%, var(--md-default-fg-color) 5%); width: 100%; - padding: 0.6rem; + max-width: 64rem; + margin: 0 auto; color: var(--md-default-fg-color); - background: var(--md-default-bg-color); - border: 0.05rem solid var(--md-default-fg-color--lighter); - border-radius: 0.2rem; } -.cookbook-picker dl { +.cookbook-shell * { + box-sizing: border-box; +} + +.cookbook-eyebrow { + margin: 0 0 0.65rem; + color: var(--cookbook-accent); + font-size: 0.66rem; + font-weight: 720; + letter-spacing: 0.1em; + text-transform: uppercase; +} + +.cookbook-hero { + padding: 2.5rem 0 3.25rem; +} + +.md-typeset .cookbook-hero h2 { + max-width: 17ch; + margin: 0; + color: var(--md-default-fg-color); + font-size: clamp(2rem, 4vw, 3rem); + font-weight: 740; + letter-spacing: -0.035em; + line-height: 1.05; +} + +.cookbook-hero__lede { + max-width: 43rem; + margin: 1rem 0 0; + color: var(--md-default-fg-color--light); + font-size: 0.94rem; + line-height: 1.65; +} + +.md-typeset .cookbook-inline-link { + display: inline-flex; + align-items: center; + gap: 0.35rem; + margin-top: 1rem; + color: var(--cookbook-accent); + font-size: 0.69rem; + font-weight: 700; + text-decoration: none; +} + +.md-typeset .cookbook-inline-link:hover { + color: var(--cookbook-accent-strong); +} + +.cookbook-hero__actions { + display: flex; + flex-wrap: wrap; + gap: 0.65rem; + margin-top: 1.5rem; +} + +.md-typeset .cookbook-button { + display: inline-flex; + min-height: 2.5rem; + align-items: center; + justify-content: center; + gap: 0.55rem; + padding: 0.65rem 0.95rem; + border: 1px solid transparent; + border-radius: 0.65rem; + font-size: 0.73rem; + font-weight: 700; + line-height: 1; + text-decoration: none; + transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease; +} + +.md-typeset .cookbook-button:hover { + background-color: color-mix(in srgb, var(--cookbook-accent) 88%, black); +} + +.md-typeset .cookbook-button--primary { + color: #fff; + background: var(--cookbook-accent); +} + +.md-typeset .cookbook-button--primary:hover { + color: #fff; + background: var(--cookbook-accent-strong); +} + +.md-typeset .cookbook-button--secondary { + color: var(--md-default-fg-color); + border-color: var(--cookbook-border); + background: transparent; +} + +.md-typeset .cookbook-journey { + display: grid !important; + grid-template-columns: repeat(4, minmax(0, 1fr)); + gap: 0; + padding: 0; + margin: 2.5rem 0 0; + list-style: none; + border-top: 1px solid var(--cookbook-border); +} + +.cookbook-journey li { + position: relative; + min-width: 0; + padding: 1.2rem 1.5rem 0 0; + margin: 0; +} + +.cookbook-journey li:not(:last-child)::after { + position: absolute; + top: 1.85rem; + right: 0.75rem; + width: 1.25rem; + height: 1px; + background: var(--cookbook-border); + content: ""; +} + +.cookbook-journey li > span { + display: inline-grid; + width: 1.35rem; + height: 1.35rem; + margin-bottom: 0.55rem; + place-items: center; + border-radius: 999px; + color: #fff; + background: var(--cookbook-accent); + font-size: 0.58rem; + font-weight: 720; +} + +.cookbook-journey strong, +.cookbook-journey small { + display: block; +} + +.cookbook-journey strong { + font-size: 0.72rem; +} + +.cookbook-journey small { + margin-top: 0.2rem; + color: var(--md-default-fg-color--light); + font-size: 0.62rem; + line-height: 1.4; +} + +.cookbook-section, +.cookbook-builder, +.cookbook-roadmap { + scroll-margin-top: 4.5rem; +} + +.cookbook-section { + padding: 3.5rem 0; + border-top: 1px solid var(--cookbook-border); +} + +.cookbook-catalog .cookbook-hero { + padding-bottom: 2rem; +} + +.cookbook-catalog .cookbook-section { + padding-top: 0; + border-top: 0; +} + +.cookbook-section__heading { + display: flex; + align-items: end; + justify-content: space-between; + gap: 2rem; + margin-bottom: 1.5rem; +} + +.md-typeset .cookbook-section__heading h2, +.md-typeset .cookbook-builder__intro h2, +.md-typeset .cookbook-roadmap h2 { + margin: 0; + color: var(--md-default-fg-color); + font-size: clamp(1.4rem, 2.6vw, 1.85rem); + letter-spacing: -0.025em; +} + +.cookbook-section__heading > p { + max-width: 27rem; + margin: 0; + color: var(--md-default-fg-color--light); + font-size: 0.74rem; + line-height: 1.55; + text-align: right; +} + +.cookbook-family-grid { display: grid; - grid-template-columns: max-content 1fr; - gap: 0.25rem 1rem; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 0.85rem; } -.cookbook-picker dt { +.md-typeset .cookbook-family-tile { + display: block; + overflow: hidden; + border: 1px solid var(--cookbook-border); + border-radius: 0.75rem; + color: var(--md-default-fg-color); + background: var(--cookbook-surface); + text-decoration: none; + transition: border-color 180ms ease; +} + +/* Identical restrained hover/focus treatment for every tile: a border and + accent change plus the pattern reveal. No transforms, so card geometry + never shifts on hover. */ +.md-typeset a.cookbook-family-tile:focus-visible, +.cookbook-family-tile--coming:focus-visible { + border-color: var(--cookbook-accent); + color: var(--md-default-fg-color); +} + +.cookbook-family-tile--ready { + border-color: color-mix(in srgb, var(--cookbook-accent) 54%, var(--cookbook-border)); +} + +.cookbook-family-tile--coming { + cursor: default; +} + +.cookbook-family-tile__visual { + position: relative; + display: grid; + aspect-ratio: 4 / 3; + overflow: hidden; + place-items: center; + border-bottom: 1px solid var(--cookbook-border); + background: #f7f7f5; +} + +.cookbook-card-pattern { + position: absolute; + inset: 0; + overflow: hidden; + color: rgba(255, 255, 255, 0.8); + background: var(--cookbook-accent); + font-family: var(--md-code-font-family); + font-size: 0.52rem; + font-weight: 700; + line-height: 1.04; + opacity: 0; + overflow-wrap: anywhere; + transition: opacity 200ms ease; +} + +/* Every tile gets the same reveal on hover; links also reveal it when they + receive keyboard focus, so hover is never the only cue. */ +a.cookbook-family-tile:focus-visible .cookbook-card-pattern { + opacity: 1; +} + +@media (hover: hover) and (pointer: fine) { + .md-typeset a.cookbook-family-tile:hover, + .cookbook-family-tile--coming:hover { + border-color: var(--cookbook-accent); + color: var(--md-default-fg-color); + } + + .cookbook-family-tile:hover .cookbook-card-pattern { + opacity: 1; + } +} + +.cookbook-family-tile__logo-wrap { + position: relative; + z-index: 1; + display: grid; + width: 8.4rem; + height: 8.4rem; + place-items: center; + border-radius: 999px; + background: rgba(255, 255, 255, 0.96); + box-shadow: 0 0.7rem 2rem rgba(34, 29, 92, 0.12); + backdrop-filter: blur(8px); +} + +.cookbook-family-tile__logo-wrap img { + display: block; + width: 6rem; + height: 6rem; + margin: 0 auto; + object-fit: contain; +} + +/* Wide wordmark variant: constrained by height so the mark stays legible + and optically centered inside the same circular plate. */ +.cookbook-family-tile__logo-wrap img.cookbook-logo--wordmark { + width: auto; + max-width: 7.5rem; + height: 2.4rem; +} + +/* Typographic fallback for families whose publisher mark is not vendored. + Deliberately plain text on the shared plate - never an invented logo. */ +.cookbook-family-tile__monogram { + display: grid; + place-items: center; + color: #414149; + font-weight: 700; + font-size: 1rem; + letter-spacing: 0.02em; + text-align: center; +} + +.cookbook-family-tile__footer { + display: flex; + min-height: 4.25rem; + align-items: center; + justify-content: space-between; + gap: 0.75rem; + padding: 0.8rem 0.9rem; +} + +.cookbook-family-tile__footer > span:first-child, +.cookbook-family-tile__footer strong, +.cookbook-family-tile__footer small { + display: block; +} + +.cookbook-family-page { + max-width: 58rem; +} + +.cookbook-family-header { + padding: 1.75rem 0 2rem; +} + +.md-typeset .cookbook-back-link { + display: inline-flex; + align-items: center; + gap: 0.4rem; + margin-bottom: 1.5rem; + color: var(--md-default-fg-color--light); + font-size: 0.68rem; + font-weight: 680; + text-decoration: none; +} + +.md-typeset .cookbook-back-link:hover { + color: var(--cookbook-accent); +} + +.cookbook-family-header__body { + display: flex; + align-items: center; + gap: 1.25rem; +} + +.cookbook-family-header__logo { + display: grid; + width: 6.5rem; + height: 6.5rem; + flex: 0 0 6.5rem; + place-items: center; + overflow: hidden; + border: 1px solid var(--cookbook-border); + border-radius: 0.75rem; + background: #f7f7f5; +} + +.cookbook-family-header__logo img { + display: block; + width: 4.75rem; + height: 4.75rem; + margin: 0 auto; + object-fit: contain; +} + +.md-typeset .cookbook-family-header__body h2 { + margin: 0; + color: var(--md-default-fg-color); + font-size: clamp(1.6rem, 3vw, 2.25rem); + letter-spacing: -0.03em; +} + +.cookbook-family-header__body .cookbook-eyebrow { + margin-bottom: 0.4rem; +} + +.cookbook-family-header__body p:last-child { + margin: 0.55rem 0 0; + color: var(--md-default-fg-color--light); + font-size: 0.76rem; +} + +.cookbook-family-tile__footer strong { + font-size: 0.78rem; +} + +.cookbook-family-tile__footer small { + margin-top: 0.12rem; + color: var(--md-default-fg-color--light); + font-size: 0.6rem; +} + +.cookbook-count, +.cookbook-badge { + display: inline-flex; + width: fit-content; + align-items: center; + padding: 0.28rem 0.5rem; + border: 1px solid var(--cookbook-border); + border-radius: 999px; + white-space: nowrap; + color: var(--md-default-fg-color--light); + background: var(--cookbook-surface-raised); + font-size: 0.56rem; + font-weight: 680; +} + +.cookbook-badge--maintained { + border-color: rgba(28, 153, 94, 0.26); + color: #168053; + background: rgba(28, 153, 94, 0.11); +} + +.cookbook-badge--configured { + border-color: rgba(102, 87, 243, 0.28); + color: var(--cookbook-accent); + background: var(--cookbook-accent-soft); +} + +.cookbook-builder { + padding: 1.5rem; + border: 1px solid var(--cookbook-border); + border-radius: 0.85rem; + background: var(--cookbook-surface-raised); +} + +.cookbook-builder__intro { + max-width: 45rem; +} + +.cookbook-builder__intro > p, +.cookbook-roadmap > p { + color: var(--md-default-fg-color--light); + font-size: 0.75rem; + line-height: 1.6; +} + +.md-typeset .cookbook-builder__layout { + display: grid; + grid-template-columns: 1fr; + gap: 0.65rem; + margin-top: 1.35rem; +} + +.cookbook-controls, +.cookbook-result { + overflow: hidden; + border: 1px solid #4e5a70; + border-radius: 0.55rem; + color: #edf0f7; + background: #202b3c; +} + +.cookbook-controls { + padding: 0.5rem; +} + +.cookbook-selection-row { + display: grid; + grid-template-columns: 7.5rem minmax(0, 1fr); + gap: 0.75rem; + align-items: stretch; + padding: 0.45rem; + border-left: 2px solid var(--cookbook-accent); + background: rgba(11, 16, 26, 0.18); +} + +.cookbook-selection-row + .cookbook-selection-row { + margin-top: 0.3rem; +} + +.cookbook-selection-row__label { + display: flex; + flex-direction: column; + justify-content: center; + padding-left: 0.25rem; +} + +.cookbook-selection-row__label strong, +.cookbook-selection-row__label span { + display: block; +} + +.cookbook-selection-row__label strong { + color: #f7f8fc; + font-size: 0.66rem; +} + +.cookbook-selection-row__label span { + margin-top: 0.15rem; + color: #aeb6c6; + font-size: 0.55rem; +} + +.cookbook-option-grid { + display: grid; + gap: 0.25rem; +} + +.cookbook-option-grid--models { + grid-template-columns: repeat(3, minmax(0, 1fr)); +} + +.cookbook-option-grid--hardware { + grid-template-columns: repeat(2, minmax(0, 1fr)); +} + +.cookbook-option-grid button { + display: flex; + min-width: 0; + min-height: 3.2rem; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 0.4rem 0.5rem; + border: 1px solid #7c879a; + border-radius: 0.25rem; + color: #e5e8ef; + background: #3b465a; + cursor: pointer; + font: inherit; + text-align: center; + transition: background-color 140ms ease, border-color 140ms ease; +} + +.cookbook-option-grid button:hover { + border-color: #b8c0cf; + background: #465268; +} + +.cookbook-option-grid button.cookbook-option--selected { + border-color: #8d83ff; + color: #fff; + background: var(--cookbook-accent); +} + +.cookbook-option-grid button strong, +.cookbook-option-grid button span { + display: block; + max-width: 100%; +} + +.cookbook-option-grid button strong { + overflow: hidden; + font-size: 0.6rem; + line-height: 1.25; + text-overflow: ellipsis; +} + +.cookbook-option-grid button span { + margin-top: 0.2rem; + color: #bec5d2; + font-size: 0.48rem; + line-height: 1.25; +} + +.cookbook-option-grid button.cookbook-option--selected span { + color: rgba(255, 255, 255, 0.78); +} + +.cookbook-selection-description, +.cookbook-hardware-note { + margin: 0.75rem 0 0; + color: #d9deea; + font-size: 0.62rem; + line-height: 1.5; +} + +.cookbook-hardware-note { + margin-top: 0.2rem; + color: #aeb6c6; +} + +.cookbook-hardware-state { + padding: 0.65rem 0.75rem; + margin-top: 0.7rem; + border: 1px solid #4e5a70; + border-radius: 0.4rem; + color: #cfd5e1; + background: rgba(11, 16, 26, 0.2); + font-size: 0.6rem; + line-height: 1.5; +} + +.cookbook-hardware-state strong { + color: #fff; +} + +.cookbook-result { + min-width: 0; + padding: 1rem; +} + +.cookbook-result__header { + display: flex; + align-items: start; + justify-content: space-between; + gap: 1rem; +} + +.md-typeset .cookbook-result h3 { + margin: 0; + color: #fff; + font-size: 1.1rem; + letter-spacing: -0.02em; +} + +.cookbook-result__badges { + display: flex; + flex-wrap: wrap; + justify-content: end; + gap: 0.3rem; +} + +.cookbook-result .cookbook-badge { + border-color: #4e5a70; + color: #d8deea; + background: #2c374a; +} + +.cookbook-result .cookbook-badge--maintained { + border-color: rgba(55, 196, 126, 0.5); + color: #8fe0b7; + background: rgba(27, 126, 78, 0.2); +} + +.cookbook-result .cookbook-badge--configured { + border-color: #8177f6; + color: #d7d2ff; + background: rgba(102, 87, 243, 0.28); +} + +.cookbook-result__facts { + display: grid; + grid-template-columns: repeat(4, minmax(0, 1fr)); + gap: 0.35rem; + margin: 0.9rem 0; +} + +.cookbook-result__facts div { + min-width: 0; + padding: 0.6rem; + border: 1px solid #4e5a70; + border-radius: 0.35rem; + background: #2c374a; +} + +.cookbook-result__facts dt { + margin-bottom: 0.2rem; + color: #aeb6c6; + font-size: 0.5rem; + font-weight: 700; + letter-spacing: 0.07em; + text-transform: uppercase; +} + +.cookbook-result__facts dd { + margin: 0; + overflow-wrap: anywhere; + color: #f0f2f7; + font-size: 0.58rem; + font-weight: 600; +} + +.cookbook-command { + overflow: hidden; + border: 1px solid #465166; + border-radius: 0.5rem; + background: #12182a; +} + +.cookbook-command__bar { + display: flex; + min-height: 2.2rem; + align-items: center; + justify-content: space-between; + padding: 0 0.75rem; + border-bottom: 1px solid #3d4658; + color: #aeb6c6; + font-size: 0.56rem; font-weight: 700; } -.cookbook-picker dd { +.cookbook-command pre { margin: 0; - min-width: 0; + border-radius: 0; +} + +.cookbook-command pre > code { + min-height: 4.5rem; + padding: 0.9rem; + color: #f1f2fb; + background: #12182a; + white-space: pre-wrap; overflow-wrap: anywhere; } +.cookbook-result__footer { + display: flex; + flex-wrap: wrap; + gap: 1rem; + margin-top: 0.8rem; + font-size: 0.62rem; + font-weight: 700; +} + +.cookbook-roadmap { + padding: 2.5rem 0; + margin: 3.5rem 0 1rem; + border-top: 1px solid var(--cookbook-border); +} + +/* Lifecycle roadmap on family pages: inference is live; later stages are + explicitly labelled planned and must not look runnable. */ +.cookbook-lifecycle { + display: flex; + flex-wrap: wrap; + gap: 0.4rem; + margin-top: 1.25rem; +} + +.cookbook-lifecycle__stage { + display: inline-flex; + align-items: center; + gap: 0.35rem; + padding: 0.32rem 0.6rem; + border: 1px solid var(--cookbook-border); + border-radius: 999px; + color: var(--md-default-fg-color--light); + background: var(--cookbook-surface-raised); + font-size: 0.58rem; + font-weight: 680; +} + +.cookbook-lifecycle__stage--active { + border-color: color-mix(in srgb, var(--cookbook-accent) 54%, var(--cookbook-border)); + color: var(--cookbook-accent-strong); + background: var(--cookbook-accent-soft); +} + +.cookbook-lifecycle__stage small { + opacity: 0.75; + font-weight: 600; +} + +/* Evidence-state badges. Each state keeps its own distinct colouring; they + are never mixed or reused decoratively. */ +.cookbook-badge--verified { + border-color: rgba(28, 153, 94, 0.26); + color: #168053; + background: rgba(28, 153, 94, 0.11); +} + +.cookbook-badge--source-backed { + border-color: color-mix(in srgb, var(--cookbook-accent) 35%, var(--cookbook-border)); + color: var(--cookbook-accent-strong); + background: var(--cookbook-accent-soft); +} + +.cookbook-badge--unknown { + border-color: var(--cookbook-border); + color: var(--md-default-fg-color--light); + background: var(--cookbook-info-soft); +} + +.cookbook-noscript { + padding: 0.75rem; + margin-top: 0.8rem; + border: 1px solid var(--cookbook-border); + border-radius: 0.5rem; + color: var(--md-default-fg-color--light); +} + +.cookbook-logo-credit { + color: var(--md-default-fg-color--light); +} + .cookbook-picker__status { position: absolute; width: 1px; @@ -82,6 +850,609 @@ img { white-space: nowrap; } +.md-typeset .cookbook-button:focus-visible, +.cookbook-family-tile:focus-visible, +.cookbook-option-grid button:focus-visible { + outline: 3px solid color-mix(in srgb, var(--cookbook-accent) 52%, transparent); + outline-offset: 3px; +} + +@media (max-width: 52rem) { + .md-typeset .cookbook-journey { + grid-template-columns: repeat(2, minmax(0, 1fr)); + row-gap: 1rem; + } + + .cookbook-journey li::after { + display: none; + } + + .cookbook-family-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .cookbook-selection-row { + grid-template-columns: 1fr; + } + + .cookbook-option-grid--models { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .cookbook-result__facts { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } +} + +@media (max-width: 35rem) { + .cookbook-hero { + padding-top: 1.5rem; + } + + .md-typeset .cookbook-journey, + .cookbook-family-grid, + .cookbook-option-grid--models, + .cookbook-result__facts { + grid-template-columns: 1fr; + } + + .cookbook-section__heading, + .cookbook-result__header { + align-items: flex-start; + flex-direction: column; + } + + .cookbook-section__heading > p { + text-align: left; + } + + .cookbook-builder { + padding: 0.75rem; + } + + .cookbook-family-header__body { + align-items: flex-start; + flex-direction: column; + } + + .cookbook-option-grid--hardware { + grid-template-columns: 1fr 1fr; + } + + .cookbook-result__badges { + justify-content: start; + } +} + +@media (prefers-reduced-motion: reduce) { + .md-typeset .cookbook-button, + .md-typeset .cookbook-family-tile, + .cookbook-card-pattern, + .cookbook-option-grid button { + transition: none; + } + + .md-typeset .cookbook-button:hover, + .md-typeset .cookbook-family-tile:hover { + transform: none; + } +} + +/* Cookbook v3: neutral catalog, indigo interaction states, and a compact + recipe-first family flow. */ +.cookbook-shell { + --cookbook-info-soft: color-mix(in srgb, var(--md-default-fg-color) 5%, transparent); + --cookbook-code: #111827; +} + +.cookbook-eyebrow, +.md-typeset .cookbook-inline-link, +.md-typeset .cookbook-back-link:hover { + color: var(--cookbook-accent); +} + +.cookbook-family-grid { + gap: 1rem; +} + +.md-typeset .cookbook-family-tile, +.md-typeset .cookbook-family-tile--ready { + border-color: var(--cookbook-border); + border-radius: 0.95rem; + background: var(--cookbook-surface); + box-shadow: 0 0.1rem 0.25rem rgba(15, 23, 42, 0.04); + transition-property: transform, border-color, box-shadow; + transition-duration: 180ms; + transition-timing-function: cubic-bezier(0.2, 0, 0, 1); +} + +.cookbook-family-tile--featured { + border-color: color-mix(in srgb, var(--cookbook-accent) 48%, var(--cookbook-border)); + box-shadow: 0 0 0 1px color-mix(in srgb, var(--cookbook-accent) 12%, transparent); +} + +.cookbook-family-tile__visual { + background: linear-gradient(145deg, #fafafa, #f0f1f5); +} + +.cookbook-card-pattern { + color: rgba(255, 255, 255, 0.58); + background: + radial-gradient(circle at 20% 10%, rgba(129, 140, 248, 0.95), transparent 38%), + linear-gradient(145deg, #3730a3, #111827 76%); + opacity: 0; + transform: scale(1.035); + transition-property: opacity, transform; + transition-duration: 200ms; + transition-timing-function: cubic-bezier(0.2, 0, 0, 1); +} + +.cookbook-family-tile__logo-wrap { + box-shadow: 0 0.8rem 2rem rgba(15, 23, 42, 0.12); + transition-property: transform, box-shadow; + transition-duration: 200ms; + transition-timing-function: cubic-bezier(0.2, 0, 0, 1); +} + +.cookbook-family-tile__footer { + min-height: 4.7rem; + padding: 0.9rem 1rem; +} + +.cookbook-family-tile__footer strong { + font-size: 0.8rem; + transition: color 150ms ease; +} + +.cookbook-family-tile__footer small { + max-width: 19ch; + margin-top: 0.18rem; + font-size: 0.61rem; + line-height: 1.35; +} + +.cookbook-family-tile:focus-visible .cookbook-card-pattern { + opacity: 1; + transform: scale(1); +} + +.cookbook-family-tile:focus-visible .cookbook-family-tile__logo-wrap { + transform: translateY(-0.2rem) scale(0.96); +} + +@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) { + .md-typeset .cookbook-family-tile:hover { + border-color: color-mix(in srgb, var(--cookbook-accent) 62%, var(--cookbook-border)); + box-shadow: 0 1rem 2.4rem rgba(15, 23, 42, 0.14); + transform: translateY(-0.3rem); + } + + .cookbook-family-tile:hover .cookbook-card-pattern { + opacity: 1; + transform: scale(1); + } + + .cookbook-family-tile:hover .cookbook-family-tile__logo-wrap { + box-shadow: 0 1.1rem 2.4rem rgba(15, 23, 42, 0.22); + transform: translateY(-0.2rem) scale(0.96); + } + + .cookbook-family-tile:hover .cookbook-family-tile__footer strong { + color: var(--cookbook-accent-strong); + } +} + +.cookbook-family-page { + max-width: 62rem; +} + +.cookbook-family-header { + display: flex; + flex-direction: column; + align-items: center; + padding: 1.5rem 0 2.25rem; + text-align: center; +} + +.md-typeset .cookbook-back-link { + align-self: flex-start; + margin-bottom: 1.75rem; +} + +.cookbook-family-header__body { + flex-direction: column; + align-items: center; + gap: 1rem; +} + +.cookbook-family-header__body > div { + display: flex; + max-width: 42rem; + flex-direction: column; + align-items: center; +} + +.cookbook-family-header__logo { + width: 5.75rem; + height: 5.75rem; + flex-basis: 5.75rem; + border-radius: 1rem; + box-shadow: 0 0.8rem 2.1rem rgba(15, 23, 42, 0.08); +} + +.cookbook-family-header__logo img { + width: 4.25rem; + height: 4.25rem; +} + +.md-typeset .cookbook-family-header__body h2 { + max-width: 20ch; + font-size: clamp(1.8rem, 4vw, 2.55rem); + line-height: 1.08; + text-wrap: balance; +} + +.cookbook-family-header__body p:last-child { + max-width: 66ch; + font-size: 0.8rem; + line-height: 1.6; + text-wrap: pretty; +} + +.cookbook-lifecycle { + align-items: center; + justify-content: center; + gap: 0.75rem; + max-width: 48rem; + margin-top: 1.25rem; +} + +.cookbook-lifecycle__stage { + border-color: color-mix(in srgb, var(--cookbook-accent) 34%, var(--cookbook-border)); + color: var(--cookbook-accent-strong); + background: var(--cookbook-accent-soft); +} + +.cookbook-lifecycle__summary { + color: var(--md-default-fg-color--light); + font-size: 0.61rem; + line-height: 1.5; +} + +.cookbook-builder { + padding: 0; + border: 0; + background: transparent; +} + +.cookbook-builder__intro { + max-width: 42rem; + margin: 0 auto; + text-align: center; +} + +.cookbook-builder__intro > p { + max-width: 62ch; + margin-inline: auto; + text-wrap: pretty; +} + +.md-typeset .cookbook-builder__layout { + gap: 1rem; + margin-top: 1.5rem; +} + +.cookbook-controls, +.cookbook-result { + border: 1px solid var(--cookbook-border); + border-radius: 0.95rem; + color: var(--md-default-fg-color); + background: var(--cookbook-surface); + box-shadow: 0 0.35rem 1.4rem rgba(15, 23, 42, 0.04); +} + +.cookbook-controls { + padding: 0.75rem; +} + +.cookbook-selection-row { + grid-template-columns: 8rem minmax(0, 1fr); + gap: 1rem; + padding: 0.65rem; + border-left: 0; + border-radius: 0.65rem; + background: var(--cookbook-info-soft); +} + +.cookbook-selection-row + .cookbook-selection-row { + margin-top: 0.55rem; +} + +.cookbook-selection-row__label { + padding-inline-start: 0.15rem; +} + +.cookbook-selection-row__label strong { + color: var(--md-default-fg-color); + font-size: 0.68rem; +} + +.cookbook-selection-row__label span { + color: var(--md-default-fg-color--light); + font-size: 0.56rem; +} + +.cookbook-option-grid { + gap: 0.45rem; +} + +.cookbook-option-grid--models { + grid-template-columns: repeat(3, minmax(0, 1fr)); +} + +.cookbook-option-grid--hardware { + grid-template-columns: repeat(2, minmax(0, 1fr)); +} + +.cookbook-option-grid button { + min-height: 3.5rem; + align-items: flex-start; + padding: 0.65rem 0.75rem; + border-color: var(--cookbook-border); + border-radius: 0.55rem; + color: var(--md-default-fg-color); + background: var(--cookbook-surface); + text-align: start; + transition-property: background-color, border-color, transform; + transition-duration: 140ms; + transition-timing-function: cubic-bezier(0.2, 0, 0, 1); +} + +.cookbook-option-grid button:hover { + border-color: color-mix(in srgb, var(--cookbook-accent) 48%, var(--cookbook-border)); + color: var(--md-default-fg-color); + background: var(--cookbook-accent-soft); +} + +.cookbook-option-grid button.cookbook-option--selected { + border-color: var(--cookbook-accent); + color: var(--cookbook-accent-strong); + background: var(--cookbook-accent-soft); + box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cookbook-accent) 20%, transparent); +} + +.cookbook-option-grid button strong { + overflow: visible; + color: inherit; + font-size: 0.62rem; + line-height: 1.35; + text-overflow: clip; + white-space: normal; +} + +.cookbook-option-grid button span, +.cookbook-option-grid button.cookbook-option--selected span { + color: var(--md-default-fg-color--light); + font-size: 0.52rem; + line-height: 1.35; +} + +.cookbook-selection-description { + margin: 0.8rem 0.25rem 0; + color: var(--md-default-fg-color); + font-size: 0.67rem; + line-height: 1.55; +} + +.cookbook-hardware-note { + margin: 0.2rem 0.25rem 0; + color: var(--md-default-fg-color--light); + font-size: 0.59rem; +} + +.cookbook-hardware-state, +.cookbook-hardware-state--source, +.cookbook-hardware-state--verified { + padding: 0.7rem 0.8rem; + margin-top: 0.75rem; + border: 0; + border-radius: 0.55rem; + color: var(--md-default-fg-color--light); + background: var(--cookbook-info-soft); + font-size: 0.61rem; + line-height: 1.5; +} + +.cookbook-hardware-state strong { + color: var(--md-default-fg-color); +} + +.cookbook-hardware-state a { + color: var(--cookbook-accent-strong); + font-weight: 680; + white-space: nowrap; +} + +.cookbook-result { + padding: 1.1rem; +} + +.md-typeset .cookbook-result h3 { + color: var(--md-default-fg-color); + font-size: 1.25rem; +} + +.cookbook-result .cookbook-badge { + border-color: var(--cookbook-border); + color: var(--md-default-fg-color--light); + background: var(--cookbook-info-soft); +} + +.cookbook-result .cookbook-badge--maintained, +.cookbook-result .cookbook-badge--verified { + border-color: rgba(22, 163, 74, 0.28); + color: #168053; + background: rgba(22, 163, 74, 0.1); +} + +.cookbook-result .cookbook-badge--configured, +.cookbook-result .cookbook-badge--source-backed { + border-color: color-mix(in srgb, var(--cookbook-accent) 35%, var(--cookbook-border)); + color: var(--cookbook-accent-strong); + background: var(--cookbook-accent-soft); +} + +.cookbook-result__facts { + gap: 0.5rem; + margin: 1rem 0; +} + +.cookbook-result__facts div { + padding: 0.7rem; + border-color: var(--cookbook-border); + border-radius: 0.55rem; + background: var(--cookbook-info-soft); +} + +.cookbook-result__facts dt { + color: var(--md-default-fg-color--light); +} + +.cookbook-result__facts dd { + color: var(--md-default-fg-color); + font-size: 0.6rem; + line-height: 1.45; +} + +.cookbook-recipe-notes { + padding: 0.75rem 0.85rem; + margin: 0 0 1rem; + border-radius: 0.55rem; + color: var(--md-default-fg-color--light); + background: var(--cookbook-info-soft); + font-size: 0.61rem; + line-height: 1.5; +} + +.cookbook-recipe-notes[hidden] { + display: none; +} + +.cookbook-recipe-notes strong { + color: var(--md-default-fg-color); +} + +.md-typeset .cookbook-recipe-notes ul { + margin: 0.35rem 0 0 1rem; +} + +.cookbook-command { + border-color: rgba(148, 163, 184, 0.32); + border-radius: 0.65rem; + background: var(--cookbook-code); +} + +.cookbook-command__bar { + padding: 0 0.85rem; + border-bottom-color: rgba(148, 163, 184, 0.22); + color: #cbd5e1; +} + +.cookbook-command pre { + position: relative; + background: var(--cookbook-code); +} + +.cookbook-command pre > code { + min-height: 4.75rem; + padding: 1rem 3.75rem 1rem 1rem; + color: #f8fafc; + background: var(--cookbook-code); + font-size: 0.65rem; + line-height: 1.55; +} + +.cookbook-command .md-code__nav { + top: 0.65rem; + right: 0.65rem; +} + +.cookbook-command .md-code__button { + display: grid; + width: 2.15rem; + height: 2.15rem; + padding: 0; + place-items: center; + border: 1px solid rgba(148, 163, 184, 0.32); + border-radius: 0.45rem; + color: #e2e8f0; + background: rgba(30, 41, 59, 0.92); +} + +.cookbook-command .md-code__button svg { + display: block; + margin: auto; +} + +.cookbook-result__footer { + margin-top: 0.9rem; +} + +.cookbook-result__footer a { + color: var(--cookbook-accent-strong); +} + +.md-typeset .cookbook-button:focus-visible, +.cookbook-family-tile:focus-visible, +.cookbook-option-grid button:focus-visible, +.cookbook-command .md-code__button:focus-visible { + outline: 3px solid color-mix(in srgb, var(--cookbook-accent) 50%, transparent); + outline-offset: 3px; +} + +@media (max-width: 52rem) { + .cookbook-option-grid--models { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } +} + +@media (max-width: 35rem) { + .cookbook-family-header { + text-align: start; + } + + .cookbook-family-header__body, + .cookbook-family-header__body > div { + align-items: flex-start; + } + + .cookbook-lifecycle { + align-items: flex-start; + justify-content: flex-start; + } + + .cookbook-builder__intro { + text-align: start; + } + + .cookbook-selection-row { + grid-template-columns: 1fr; + } + + .cookbook-option-grid--hardware { + grid-template-columns: 1fr; + } +} + +@media (prefers-reduced-motion: reduce) { + .md-typeset .cookbook-family-tile, + .cookbook-card-pattern, + .cookbook-family-tile__logo-wrap, + .cookbook-option-grid button { + transition: none; + } +} + .md-typeset .copy-page-button.md-button { float: right; margin: 0 0 1rem 1rem; diff --git a/docs/assets/logos/SOURCES.md b/docs/assets/logos/SOURCES.md new file mode 100644 index 00000000..a3edc8a5 --- /dev/null +++ b/docs/assets/logos/SOURCES.md @@ -0,0 +1,26 @@ +# Cookbook logo sources + +All marks are official publisher assets from Hugging Face organization pages +(vendored byte-for-byte from each org's public avatar). No imitation or +redrawn logos are used. Families without a publisher-appropriate mark use a +plain typographic tile instead — that tile is a UI placeholder, not a logo. + +| Asset | Source | Purpose | +| --- | --- | --- | +| `wan-ai.webp` | [Official Wan-AI Hugging Face organization avatar](https://huggingface.co/Wan-AI) | Wan family card and page header | +| `ltx.webp` | [Official Lightricks Hugging Face organization avatar](https://huggingface.co/Lightricks) | LTX family card and page header | +| `tencent-hunyuan.webp` | [Official Tencent Hunyuan Hugging Face organization avatar](https://huggingface.co/Tencent-Hunyuan) | Hunyuan and GameCraft cards, Hunyuan page header | +| `nvidia.webp` | [Official NVIDIA Hugging Face organization avatar](https://huggingface.co/nvidia) | Cosmos and GEN3C cards, Cosmos page header | +| `kandinsky.webp` | [Official Kandinsky Lab Hugging Face organization avatar](https://huggingface.co/kandinskylab) | Kandinsky 5 family card and page header | +| `black-forest-labs.webp` | [Official Black Forest Labs Hugging Face organization avatar](https://huggingface.co/black-forest-labs) | FLUX family card and page header | +| `minimax.webp` | [Official MiniMax Hugging Face organization avatar](https://huggingface.co/MiniMaxAI) | MiniMax H3 family card and page header | +| `tongyi.webp` | [Official Tongyi MAI Hugging Face organization avatar](https://huggingface.co/Tongyi-MAI) | Z-Image family card and page header | +| `zai.webp` | [Official Z.ai Hugging Face organization avatar](https://huggingface.co/zai-org) | GLM-Image family card and page header | +| `stabilityai.webp` | [Official Stability AI Hugging Face organization avatar](https://huggingface.co/stabilityai) | Stable Diffusion and Stable Audio cards and page headers | +| `meituan-longcat.webp` | [Official Meituan LongCat Hugging Face organization avatar](https://huggingface.co/meituan-longcat) | LongCat family card and page header | +| `fastvideo.webp` | [Official FastVideo Hugging Face organization avatar](https://huggingface.co/FastVideo) | Matrix Game and MMAudio cards (converted weights published by this org), DreamX card | + +Typographic tiles (no vendored image): TurboDiffusion ("Turbo"), HY-World +("HY"), LingBot ("LB"), MMAudio page header ("MMA"). These publishers have no +single official mark appropriate for reuse in the catalog; add a licensed +asset here if one becomes available. diff --git a/docs/assets/logos/black-forest-labs.webp b/docs/assets/logos/black-forest-labs.webp new file mode 100644 index 00000000..7835ca56 Binary files /dev/null and b/docs/assets/logos/black-forest-labs.webp differ diff --git a/docs/assets/logos/fastvideo.webp b/docs/assets/logos/fastvideo.webp new file mode 100644 index 00000000..34fea8ae Binary files /dev/null and b/docs/assets/logos/fastvideo.webp differ diff --git a/docs/assets/logos/kandinsky.webp b/docs/assets/logos/kandinsky.webp new file mode 100644 index 00000000..6048b162 Binary files /dev/null and b/docs/assets/logos/kandinsky.webp differ diff --git a/docs/assets/logos/ltx.webp b/docs/assets/logos/ltx.webp new file mode 100644 index 00000000..a8d3974e Binary files /dev/null and b/docs/assets/logos/ltx.webp differ diff --git a/docs/assets/logos/meituan-longcat.webp b/docs/assets/logos/meituan-longcat.webp new file mode 100644 index 00000000..f1294944 Binary files /dev/null and b/docs/assets/logos/meituan-longcat.webp differ diff --git a/docs/assets/logos/minimax.webp b/docs/assets/logos/minimax.webp new file mode 100644 index 00000000..ccbecf77 Binary files /dev/null and b/docs/assets/logos/minimax.webp differ diff --git a/docs/assets/logos/nvidia.webp b/docs/assets/logos/nvidia.webp new file mode 100644 index 00000000..79033d73 Binary files /dev/null and b/docs/assets/logos/nvidia.webp differ diff --git a/docs/assets/logos/stabilityai.webp b/docs/assets/logos/stabilityai.webp new file mode 100644 index 00000000..998068d5 Binary files /dev/null and b/docs/assets/logos/stabilityai.webp differ diff --git a/docs/assets/logos/tencent-hunyuan.webp b/docs/assets/logos/tencent-hunyuan.webp new file mode 100644 index 00000000..c9c6bb99 Binary files /dev/null and b/docs/assets/logos/tencent-hunyuan.webp differ diff --git a/docs/assets/logos/tongyi.webp b/docs/assets/logos/tongyi.webp new file mode 100644 index 00000000..efd767aa Binary files /dev/null and b/docs/assets/logos/tongyi.webp differ diff --git a/docs/assets/logos/wan-ai.webp b/docs/assets/logos/wan-ai.webp new file mode 100644 index 00000000..d856cbdd Binary files /dev/null and b/docs/assets/logos/wan-ai.webp differ diff --git a/docs/assets/logos/zai.webp b/docs/assets/logos/zai.webp new file mode 100644 index 00000000..93ceda24 Binary files /dev/null and b/docs/assets/logos/zai.webp differ diff --git a/docs/cookbook/cosmos.md b/docs/cookbook/cosmos.md new file mode 100644 index 00000000..775cb66e --- /dev/null +++ b/docs/cookbook/cosmos.md @@ -0,0 +1,130 @@ +--- +hide: +- toc +--- + +# Cosmos recipes + +
+
+ All model families +
+ +
+

Maintained family · Inference

+

Cosmos inference recipes

+

NVIDIA Cosmos Predict 2.5 generates navigable world videos. The maintained example runs the 2B text-to-world checkpoint on a single GPU.

+
+
+
+ Inference live + Distillation planned + Fine-tuning planned + Training planned + Evaluation planned + Optimization planned + Deployment planned +
+
+ +
+
+

Choose a model and GPU count

+

Choose a model, then pick a GPU count. Each selection maps to one + checked-in recipe. If that recipe does not use your chosen count, the + page says so instead of guessing.

+
+ +
+
+
+
+ Recipe + Task and checkpoint +
+
+ +
+
+ +
+
+ Runtime + Maintained paths only +
+
+ +
+
+ +

Loading recipe details...

+

Exact device and memory details appear only when a recorded run supports them.

+ +
+ Reading recipe evidence... +
+
+ +
+
+

Loading...

+
+ Maintained + Source-backed + Source config +
+
+ +
+
Model
Loading...
+
Workload
Loading...
+
Source configuration
Loading...
+
Expected output
Loading...
+
+ +
+
+ Terminal +
+
Loading...
+
+ + +

+
+
+ + +
+
+ +## Before you run + +The generated commands expect a local clone: + + git clone https://github.com/hao-ai-lab/FastVideo.git + cd FastVideo + +Use [Configuration](../inference/configuration.md) for supported Python and +CLI settings, [Optimizations](../inference/optimizations.md) for attention and +memory tradeoffs, and the [support matrix](../inference/support_matrix.md) for +the supported model and optimization surface. + +## Troubleshooting + +- World-generation prompts work best describing a scene and camera motion; the built-in prompt in the example is a known-good starting point. +- Gated or missing checkpoints: run `huggingface-cli login` and confirm you accepted the model's license on Hugging Face. + +## Evidence status + +All recipes on this page are **Source-backed**: their commands, model IDs, and flags were validated against the checked-in FastVideo sources listed above (static validation). No runtime GPU validation is recorded for these recipes, so GPU model fit, memory use, throughput, and runtime duration are **Unknown** and deliberately not claimed. Runtime buttons show only the GPU counts configured in checked-in sources. diff --git a/docs/cookbook/flux.md b/docs/cookbook/flux.md new file mode 100644 index 00000000..a442694c --- /dev/null +++ b/docs/cookbook/flux.md @@ -0,0 +1,131 @@ +--- +hide: +- toc +--- + +# FLUX recipes + +
+
+ All model families +
+ +
+

Maintained family · Inference

+

FLUX inference recipes

+

Black Forest Labs' FLUX family covers FLUX.1 dev and FLUX.2 (dev and distilled Klein) text-to-image. FLUX.1 registers no `model_family` in the registry and is grouped under FLUX for documentation only.

+
+
+
+ Inference live + Distillation planned + Fine-tuning planned + Training planned + Evaluation planned + Optimization planned + Deployment planned +
+
+ +
+
+

Choose a model and GPU count

+

Choose a model, then pick a GPU count. Each selection maps to one + checked-in recipe. If that recipe does not use your chosen count, the + page says so instead of guessing.

+
+ +
+
+
+
+ Recipe + Task and checkpoint +
+
+ +
+
+ +
+
+ Runtime + Maintained paths only +
+
+ +
+
+ +

Loading recipe details...

+

Exact device and memory details appear only when a recorded run supports them.

+ +
+ Reading recipe evidence... +
+
+ +
+
+

Loading...

+
+ Maintained + Source-backed + Source config +
+
+ +
+
Model
Loading...
+
Workload
Loading...
+
Source configuration
Loading...
+
Expected output
Loading...
+
+ +
+
+ Terminal +
+
Loading...
+
+ + +

+
+
+ + +
+
+ +## Before you run + +The generated commands expect a local clone: + + git clone https://github.com/hao-ai-lab/FastVideo.git + cd FastVideo + +Use [Configuration](../inference/configuration.md) for supported Python and +CLI settings, [Optimizations](../inference/optimizations.md) for attention and +memory tradeoffs, and the [support matrix](../inference/support_matrix.md) for +the supported model and optimization surface. + +## Troubleshooting + +- FLUX.1 dev defaults to a local `official_weights/FLUX.1-dev` directory in the example; the cookbook command passes the Hugging Face ID explicitly instead. +- Image outputs land under `outputs/`; adjust `--output` if that path is not writable. +- Gated checkpoints (FLUX.1 dev): run `huggingface-cli login` and accept the license on Hugging Face first. + +## Evidence status + +All recipes on this page are **Source-backed**: their commands, model IDs, and flags were validated against the checked-in FastVideo sources listed above (static validation). No runtime GPU validation is recorded for these recipes, so GPU model fit, memory use, throughput, and runtime duration are **Unknown** and deliberately not claimed. Runtime buttons show only the GPU counts configured in checked-in sources. diff --git a/docs/cookbook/glm-image.md b/docs/cookbook/glm-image.md new file mode 100644 index 00000000..b0b8c3f6 --- /dev/null +++ b/docs/cookbook/glm-image.md @@ -0,0 +1,130 @@ +--- +hide: +- toc +--- + +# GLM-Image recipes + +
+
+ All model families +
+ +
+

Maintained family · Inference

+

GLM-Image inference recipes

+

GLM-Image from Z.ai supports both text-to-image generation and instruction-based image editing, each with a maintained example.

+
+
+
+ Inference live + Distillation planned + Fine-tuning planned + Training planned + Evaluation planned + Optimization planned + Deployment planned +
+
+ +
+
+

Choose a model and GPU count

+

Choose a model, then pick a GPU count. Each selection maps to one + checked-in recipe. If that recipe does not use your chosen count, the + page says so instead of guessing.

+
+ +
+
+
+
+ Recipe + Task and checkpoint +
+
+ +
+
+ +
+
+ Runtime + Maintained paths only +
+
+ +
+
+ +

Loading recipe details...

+

Exact device and memory details appear only when a recorded run supports them.

+ +
+ Reading recipe evidence... +
+
+ +
+
+

Loading...

+
+ Maintained + Source-backed + Source config +
+
+ +
+
Model
Loading...
+
Workload
Loading...
+
Source configuration
Loading...
+
Expected output
Loading...
+
+ +
+
+ Terminal +
+
Loading...
+
+ + +

+
+
+ + +
+
+ +## Before you run + +The generated commands expect a local clone: + + git clone https://github.com/hao-ai-lab/FastVideo.git + cd FastVideo + +Use [Configuration](../inference/configuration.md) for supported Python and +CLI settings, [Optimizations](../inference/optimizations.md) for attention and +memory tradeoffs, and the [support matrix](../inference/support_matrix.md) for +the supported model and optimization surface. + +## Troubleshooting + +- The editing example reads `assets/images/couple.jpg` from the repository root, so run it from a repo checkout rather than an arbitrary working directory. +- Output paths default under `image_output/`; pass `--output` to change them. + +## Evidence status + +All recipes on this page are **Source-backed**: their commands, model IDs, and flags were validated against the checked-in FastVideo sources listed above (static validation). No runtime GPU validation is recorded for these recipes, so GPU model fit, memory use, throughput, and runtime duration are **Unknown** and deliberately not claimed. Runtime buttons show only the GPU counts configured in checked-in sources. diff --git a/docs/cookbook/hunyuan.md b/docs/cookbook/hunyuan.md new file mode 100644 index 00000000..d9ec66da --- /dev/null +++ b/docs/cookbook/hunyuan.md @@ -0,0 +1,131 @@ +--- +hide: +- toc +--- + +# Hunyuan recipes + +
+
+ All model families +
+ +
+

Maintained family · Inference

+

Hunyuan inference recipes

+

HunyuanVideo 1.5 is Tencent's video generation family. The maintained examples cover 480p text-to-video with CPU offload and a full 480p-to-1080p upscale chain.

+
+
+
+ Inference live + Distillation planned + Fine-tuning planned + Training planned + Evaluation planned + Optimization planned + Deployment planned +
+
+ +
+
+

Choose a model and GPU count

+

Choose a model, then pick a GPU count. Each selection maps to one + checked-in recipe. If that recipe does not use your chosen count, the + page says so instead of guessing.

+
+ +
+
+
+
+ Recipe + Task and checkpoint +
+
+ +
+
+ +
+
+ Runtime + Maintained paths only +
+
+ +
+
+ +

Loading recipe details...

+

Exact device and memory details appear only when a recorded run supports them.

+ +
+ Reading recipe evidence... +
+
+ +
+
+

Loading...

+
+ Maintained + Source-backed + Source config +
+
+ +
+
Model
Loading...
+
Workload
Loading...
+
Source configuration
Loading...
+
Expected output
Loading...
+
+ +
+
+ Terminal +
+
Loading...
+
+ + +

+
+
+ + +
+
+ +## Before you run + +The generated commands expect a local clone: + + git clone https://github.com/hao-ai-lab/FastVideo.git + cd FastVideo + +Use [Configuration](../inference/configuration.md) for supported Python and +CLI settings, [Optimizations](../inference/optimizations.md) for attention and +memory tradeoffs, and the [support matrix](../inference/support_matrix.md) for +the supported model and optimization surface. + +## Troubleshooting + +- Out of memory: `basic_hy15.py` already enables dit/VAE/text-encoder CPU offload; further tradeoffs are described in [Optimizations](../inference/optimizations.md). +- `pin_cpu_memory` errors on low-RAM machines are documented inline in the example; set it to false as the source comment suggests. +- Gated or missing checkpoints: run `huggingface-cli login` and confirm you accepted the model's license on Hugging Face. + +## Evidence status + +All recipes on this page are **Source-backed**: their commands, model IDs, and flags were validated against the checked-in FastVideo sources listed above (static validation). No runtime GPU validation is recorded for these recipes, so GPU model fit, memory use, throughput, and runtime duration are **Unknown** and deliberately not claimed. Runtime buttons show only the GPU counts configured in checked-in sources. diff --git a/docs/cookbook/index.md b/docs/cookbook/index.md index b5d408f6..7359ac1a 100644 --- a/docs/cookbook/index.md +++ b/docs/cookbook/index.md @@ -1,44 +1,303 @@ +--- +hide: +- toc +--- + # Inference Cookbook -Choose a complete recipe maintained in the FastVideo repository. Each command -runs its checked-in source directly, so coupled model, GPU, offload, and -attention settings do not drift into unsupported combinations. +
+
+

FastVideo inference cookbook

+

Choose a model family.

+

+ Open a family to pick a maintained recipe and a runtime FastVideo + actually supports. Every command runs a checked-in source, so the model, + platform, offload, and attention settings stay tied to that example. The catalog + is derived from the model families registered in + fastvideo/registry.py. +

+ + View the full support matrix + +
-The commands expect a local clone: +
+
+ + + + + + + + + MiniMax H3Video + audio · CUDA + MLX + 6 recipes + + -```bash -git clone https://github.com/hao-ai-lab/FastVideo.git -cd FastVideo -``` + + + + + + + + + WanVideo generation · CUDA + MLX + 7 recipes + + - +
+ +
+

Inference first, then the full workflow

+

+ Inference is the first complete stage. Distillation, fine-tuning, + training, evaluation, optimization, and deployment will reuse the same + family-first structure as their recipes land. Each family page shows + which stages are available and which are planned. +

+
-## Customize a recipe - -Start from the checked-in source, then change only the settings your model -supports: - -- [Configuration](../inference/configuration.md) covers the Python and CLI - config surfaces. -- [Optimizations](../inference/optimizations.md) covers attention backends, - compilation, and memory tradeoffs. -- [Support matrix](../inference/support_matrix.md) lists supported models and - optimizations. + +Catalog marks come from the official model publishers' Hugging Face +organizations; typographic tiles are placeholders, never invented logos. See +docs/assets/logos/SOURCES.md. + diff --git a/docs/cookbook/kandinsky5.md b/docs/cookbook/kandinsky5.md new file mode 100644 index 00000000..1227233c --- /dev/null +++ b/docs/cookbook/kandinsky5.md @@ -0,0 +1,130 @@ +--- +hide: +- toc +--- + +# Kandinsky 5 recipes + +
+
+ All model families +
+ +
+

Maintained family · Inference

+

Kandinsky 5 inference recipes

+

Kandinsky 5.0 from the Kandinsky Lab covers text-to-video and image-to-video in Lite and Pro variants, including distilled checkpoints for faster sampling.

+
+
+
+ Inference live + Distillation planned + Fine-tuning planned + Training planned + Evaluation planned + Optimization planned + Deployment planned +
+
+ +
+
+

Choose a model and GPU count

+

Choose a model, then pick a GPU count. Each selection maps to one + checked-in recipe. If that recipe does not use your chosen count, the + page says so instead of guessing.

+
+ +
+
+
+
+ Recipe + Task and checkpoint +
+
+ +
+
+ +
+
+ Runtime + Maintained paths only +
+
+ +
+
+ +

Loading recipe details...

+

Exact device and memory details appear only when a recorded run supports them.

+ +
+ Reading recipe evidence... +
+
+ +
+
+

Loading...

+
+ Maintained + Source-backed + Source config +
+
+ +
+
Model
Loading...
+
Workload
Loading...
+
Source configuration
Loading...
+
Expected output
Loading...
+
+ +
+
+ Terminal +
+
Loading...
+
+ + +

+
+
+ + +
+
+ +## Before you run + +The generated commands expect a local clone: + + git clone https://github.com/hao-ai-lab/FastVideo.git + cd FastVideo + +Use [Configuration](../inference/configuration.md) for supported Python and +CLI settings, [Optimizations](../inference/optimizations.md) for attention and +memory tradeoffs, and the [support matrix](../inference/support_matrix.md) for +the supported model and optimization surface. + +## Troubleshooting + +- Alternative Lite/Pro checkpoints are listed inline in the maintained examples; swap the model string only after checking its Hugging Face card. +- Gated or missing checkpoints: run `huggingface-cli login` and confirm you accepted the model's license on Hugging Face. + +## Evidence status + +Both recipes map to checked-in FastVideo examples and recorded single-GPU B200 runs. The image-to-video run also records 10,365.89 MB peak GPU memory. These measurements describe the recorded runs; they are not minimum hardware requirements. diff --git a/docs/cookbook/longcat.md b/docs/cookbook/longcat.md new file mode 100644 index 00000000..459931d8 --- /dev/null +++ b/docs/cookbook/longcat.md @@ -0,0 +1,130 @@ +--- +hide: +- toc +--- + +# LongCat recipes + +
+
+ All model families +
+ +
+

Maintained family · Inference

+

LongCat inference recipes

+

LongCat Video from Meituan covers text-to-video and image-to-video, and its maintained examples chain optional distilled and 720p refinement passes.

+
+
+
+ Inference live + Distillation planned + Fine-tuning planned + Training planned + Evaluation planned + Optimization planned + Deployment planned +
+
+ +
+
+

Choose a model and GPU count

+

Choose a model, then pick a GPU count. Each selection maps to one + checked-in recipe. If that recipe does not use your chosen count, the + page says so instead of guessing.

+
+ +
+
+
+
+ Recipe + Task and checkpoint +
+
+ +
+
+ +
+
+ Runtime + Maintained paths only +
+
+ +
+
+ +

Loading recipe details...

+

Exact device and memory details appear only when a recorded run supports them.

+ +
+ Reading recipe evidence... +
+
+ +
+
+

Loading...

+
+ Maintained + Source-backed + Source config +
+
+ +
+
Model
Loading...
+
Workload
Loading...
+
Source configuration
Loading...
+
Expected output
Loading...
+
+ +
+
+ Terminal +
+
Loading...
+
+ + +

+
+
+ + +
+
+ +## Before you run + +The generated commands expect a local clone: + + git clone https://github.com/hao-ai-lab/FastVideo.git + cd FastVideo + +Use [Configuration](../inference/configuration.md) for supported Python and +CLI settings, [Optimizations](../inference/optimizations.md) for attention and +memory tradeoffs, and the [support matrix](../inference/support_matrix.md) for +the supported model and optimization surface. + +## Troubleshooting + +- Each LongCat script runs multiple passes (basic, distilled, refine); total runtime scales accordingly, and every pass prints its own output directory. +- Out of memory: the sources already enable VAE and text-encoder CPU offload; further options are covered in [Offloading](../inference/offloading.md). + +## Evidence status + +All recipes on this page are **Source-backed**: their commands, model IDs, and flags were validated against the checked-in FastVideo sources listed above (static validation). No runtime GPU validation is recorded for these recipes, so GPU model fit, memory use, throughput, and runtime duration are **Unknown** and deliberately not claimed. Runtime buttons show only the GPU counts configured in checked-in sources. diff --git a/docs/cookbook/ltx.md b/docs/cookbook/ltx.md new file mode 100644 index 00000000..0f66defb --- /dev/null +++ b/docs/cookbook/ltx.md @@ -0,0 +1,131 @@ +--- +hide: +- toc +--- + +# LTX recipes + +
+
+ All model families +
+ +
+

Maintained family · Inference

+

LTX inference recipes

+

LTX-2 from Lightricks generates video with synchronized audio. FastVideo maintains both a distilled four-GPU path and a base 1088p single-GPU path.

+
+
+
+ Inference live + Distillation planned + Fine-tuning planned + Training planned + Evaluation planned + Optimization planned + Deployment planned +
+
+ +
+
+

Choose a model and GPU count

+

Choose a model, then pick a GPU count. Each selection maps to one + checked-in recipe. If that recipe does not use your chosen count, the + page says so instead of guessing.

+
+ +
+
+
+
+ Recipe + Task and checkpoint +
+
+ +
+
+ +
+
+ Runtime + Maintained paths only +
+
+ +
+
+ +

Loading recipe details...

+

Exact device and memory details appear only when a recorded run supports them.

+ +
+ Reading recipe evidence... +
+
+ +
+
+

Loading...

+
+ Maintained + Source-backed + Source config +
+
+ +
+
Model
Loading...
+
Workload
Loading...
+
Source configuration
Loading...
+
Expected output
Loading...
+
+ +
+
+ Terminal +
+
Loading...
+
+ + +

+
+
+ + +
+
+ +## Before you run + +The generated commands expect a local clone: + + git clone https://github.com/hao-ai-lab/FastVideo.git + cd FastVideo + +Use [Configuration](../inference/configuration.md) for supported Python and +CLI settings, [Optimizations](../inference/optimizations.md) for attention and +memory tradeoffs, and the [support matrix](../inference/support_matrix.md) for +the supported model and optimization surface. + +## Troubleshooting + +- The distilled recipe is source-configured for four GPUs; running it on fewer GPUs is unverified and may fail during distributed setup. +- Audio-less output usually means the base checkpoint resolved instead of the distilled LTX-2 checkpoint with audio; check the loaded model ID in the logs. +- Gated or missing checkpoints: run `huggingface-cli login` and confirm you accepted the model's license on Hugging Face. + +## Evidence status + +All recipes on this page are **Source-backed**: their commands, model IDs, and flags were validated against the checked-in FastVideo sources listed above (static validation). No runtime GPU validation is recorded for these recipes, so GPU model fit, memory use, throughput, and runtime duration are **Unknown** and deliberately not claimed. Runtime buttons show only the GPU counts configured in checked-in sources. diff --git a/docs/cookbook/matrix-game.md b/docs/cookbook/matrix-game.md new file mode 100644 index 00000000..a33c6f55 --- /dev/null +++ b/docs/cookbook/matrix-game.md @@ -0,0 +1,130 @@ +--- +hide: +- toc +--- + +# Matrix Game recipes + +
+
+ All model families +
+ +
+

Maintained family · Inference

+

Matrix Game inference recipes

+

Matrix Game generates playable interactive worlds from an input image and prompt. Maintained examples cover Matrix Game 2.0 variants and Matrix Game 3.0 at 720p.

+
+
+
+ Inference live + Distillation planned + Fine-tuning planned + Training planned + Evaluation planned + Optimization planned + Deployment planned +
+
+ +
+
+

Choose a model and GPU count

+

Choose a model, then pick a GPU count. Each selection maps to one + checked-in recipe. If that recipe does not use your chosen count, the + page says so instead of guessing.

+
+ +
+
+
+
+ Recipe + Task and checkpoint +
+
+ +
+
+ +
+
+ Runtime + Maintained paths only +
+
+ +
+
+ +

Loading recipe details...

+

Exact device and memory details appear only when a recorded run supports them.

+ +
+ Reading recipe evidence... +
+
+ +
+
+

Loading...

+
+ Maintained + Source-backed + Source config +
+
+ +
+
Model
Loading...
+
Workload
Loading...
+
Source configuration
Loading...
+
Expected output
Loading...
+
+ +
+
+ Terminal +
+
Loading...
+
+ + +

+
+
+ + +
+
+ +## Before you run + +The generated commands expect a local clone: + + git clone https://github.com/hao-ai-lab/FastVideo.git + cd FastVideo + +Use [Configuration](../inference/configuration.md) for supported Python and +CLI settings, [Optimizations](../inference/optimizations.md) for attention and +memory tradeoffs, and the [support matrix](../inference/support_matrix.md) for +the supported model and optimization surface. + +## Troubleshooting + +- Matrix Game 3.0 downloads its reference input image from GitHub; offline machines should pre-download it and edit the `IMAGE_URL` constant locally. +- Streaming variants of Matrix Game 2.0 exist under `examples/inference/basic/basic_matrixgame2_streaming.py` but are not included as cookbook recipes. + +## Evidence status + +All recipes on this page are **Source-backed**: their commands, model IDs, and flags were validated against the checked-in FastVideo sources listed above (static validation). No runtime GPU validation is recorded for these recipes, so GPU model fit, memory use, throughput, and runtime duration are **Unknown** and deliberately not claimed. Runtime buttons show only the GPU counts configured in checked-in sources. diff --git a/docs/cookbook/minimax-h3.md b/docs/cookbook/minimax-h3.md new file mode 100644 index 00000000..9e836102 --- /dev/null +++ b/docs/cookbook/minimax-h3.md @@ -0,0 +1,143 @@ +--- +hide: +- toc +--- + +# MiniMax H3 recipes + +
+
+ All model families +
+ +
+

Primary focus · Inference

+

MiniMax H3 recipes

+

Generate synchronized video and audio with the full H3 checkpoint, the four-step FastH3 Preview, reference and frame-conditioned paths, or the native Apple Silicon MLX runtime.

+ 6 maintained recipes +
+
+
+ Inference live + Distillation planned + Fine-tuning planned + Training planned + Evaluation planned + Optimization planned + Deployment planned +
+
+ +
+
+

Pick an H3 recipe and runtime

+

Choose the result you want, then use a maintained CUDA or MLX path. + Device claims stay tied to checked-in sources and recorded runs.

+
+ +
+
+
+
+ Recipe + Task and checkpoint +
+
+ +
+
+ +
+
+ Runtime + Maintained paths only +
+
+ +
+
+ +

Loading recipe details...

+

Exact device and memory details appear only when a recorded run supports them.

+ +
+ Reading recipe evidence... +
+
+ +
+
+

Loading...

+
+ Maintained + Source-backed + Source config +
+
+ +
+
Model
Loading...
+
Workload
Loading...
+
Hardware
Loading...
+
Expected output
Loading...
+
+ +
+
+ Terminal +
+
Loading...
+
+ + +

+
+
+ + +
+
+ +## Before you run + +The generated commands expect a local clone: + + git clone https://github.com/hao-ai-lab/FastVideo.git + cd FastVideo + +Use [Configuration](../inference/configuration.md) for supported Python and +CLI settings, [Optimizations](../inference/optimizations.md) for attention and +memory tradeoffs, and the [support matrix](../inference/support_matrix.md) for +the supported model and optimization surface. + +CUDA FastH3 uses the pinned performance dependencies: + + UV_TORCH_BACKEND=cu130 uv pip install -e ".[fasth3]" + +Apple Silicon uses the native MLX extra and a locally converted H3 DiT: + + uv pip install -e ".[mlx]" + +Follow the [Apple Silicon guide](../getting_started/installation/mps.md#run-fasth3-preview) +for the download, conversion, and storage requirements. + +## Troubleshooting + +- The full CUDA H3 examples request four GPUs by default. Their sources do not claim a GPU model or memory minimum. +- The FastH3 CUDA performance profile was measured on four GB200 GPUs. Use its strict profile when exact operation order matters more than the measured performance configuration. +- The MLX source runtime is limited to T2VA. FL2VA, Ref2VA, VSA, spatial fast mode, and two-pass refinement are not wired on MLX. +- Gated or missing checkpoints: run `huggingface-cli login` and confirm you accepted the model's license on Hugging Face. + +## Evidence status + +Every command, model ID, and flag on this page maps to a checked-in FastVideo source. Recipes marked **Verified** also have a recorded hardware path in linked FastVideo evidence. The full H3 CUDA examples remain **Source-backed** where the source records a GPU count but no GPU model or memory requirement. Unlisted hardware is unknown, not unsupported. diff --git a/docs/cookbook/mmaudio.md b/docs/cookbook/mmaudio.md new file mode 100644 index 00000000..2e0e4ca7 --- /dev/null +++ b/docs/cookbook/mmaudio.md @@ -0,0 +1,130 @@ +--- +hide: +- toc +--- + +# MMAudio recipes + +
+
+ All model families +
+ +
+

Maintained family · Inference

+

MMAudio inference recipes

+

MMAudio adds synchronized audio to video or generates audio from text. The checkpoint must be in Diffusers layout; the recipe loads the converted FastVideo repo through the `MMAUDIO_MODEL_PATH` environment variable the example reads.

+
+
+
+ Inference live + Distillation planned + Fine-tuning planned + Training planned + Evaluation planned + Optimization planned + Deployment planned +
+
+ +
+
+

Choose a model and GPU count

+

Choose a model, then pick a GPU count. Each selection maps to one + checked-in recipe. If that recipe does not use your chosen count, the + page says so instead of guessing.

+
+ +
+
+
+
+ Recipe + Task and checkpoint +
+
+ +
+
+ +
+
+ Runtime + Maintained paths only +
+
+ +
+
+ +

Loading recipe details...

+

Exact device and memory details appear only when a recorded run supports them.

+ +
+ Reading recipe evidence... +
+
+ +
+
+

Loading...

+
+ Maintained + Source-backed + Source config +
+
+ +
+
Model
Loading...
+
Workload
Loading...
+
Source configuration
Loading...
+
Expected output
Loading...
+
+ +
+
+ Terminal +
+
Loading...
+
+ + +

+
+
+ + +
+
+ +## Before you run + +The generated commands expect a local clone: + + git clone https://github.com/hao-ai-lab/FastVideo.git + cd FastVideo + +Use [Configuration](../inference/configuration.md) for supported Python and +CLI settings, [Optimizations](../inference/optimizations.md) for attention and +memory tradeoffs, and the [support matrix](../inference/support_matrix.md) for +the supported model and optimization surface. + +## Troubleshooting + +- If the example reports a missing local `converted_weights/mmaudio/large_44k_v2` path, the `MMAUDIO_MODEL_PATH` env var from the cookbook command was not applied; export it in the same shell. +- Alternatively convert upstream weights yourself with `scripts/checkpoint_conversion/convert_mmaudio_to_diffusers.py` and point the env var at the result. + +## Evidence status + +All recipes on this page are **Source-backed**: their commands, model IDs, and flags were validated against the checked-in FastVideo sources listed above (static validation). No runtime GPU validation is recorded for these recipes, so GPU model fit, memory use, throughput, and runtime duration are **Unknown** and deliberately not claimed. Runtime buttons show only the GPU counts configured in checked-in sources. diff --git a/docs/cookbook/stable-audio.md b/docs/cookbook/stable-audio.md new file mode 100644 index 00000000..47a848bd --- /dev/null +++ b/docs/cookbook/stable-audio.md @@ -0,0 +1,130 @@ +--- +hide: +- toc +--- + +# Stable Audio recipes + +
+
+ All model families +
+ +
+

Maintained family · Inference

+

Stable Audio inference recipes

+

Stable Audio Open generates audio from text. FastVideo requires the converted Diffusers-format repos published by the FastVideo organization; upstream monolithic checkpoints are not loader-compatible.

+
+
+
+ Inference live + Distillation planned + Fine-tuning planned + Training planned + Evaluation planned + Optimization planned + Deployment planned +
+
+ +
+
+

Choose a model and GPU count

+

Choose a model, then pick a GPU count. Each selection maps to one + checked-in recipe. If that recipe does not use your chosen count, the + page says so instead of guessing.

+
+ +
+
+
+
+ Recipe + Task and checkpoint +
+
+ +
+
+ +
+
+ Runtime + Maintained paths only +
+
+ +
+
+ +

Loading recipe details...

+

Exact device and memory details appear only when a recorded run supports them.

+ +
+ Reading recipe evidence... +
+
+ +
+
+

Loading...

+
+ Maintained + Source-backed + Source config +
+
+ +
+
Model
Loading...
+
Workload
Loading...
+
Source configuration
Loading...
+
Expected output
Loading...
+
+ +
+
+ Terminal +
+
Loading...
+
+ + +

+
+
+ + +
+
+ +## Before you run + +The generated commands expect a local clone: + + git clone https://github.com/hao-ai-lab/FastVideo.git + cd FastVideo + +Use [Configuration](../inference/configuration.md) for supported Python and +CLI settings, [Optimizations](../inference/optimizations.md) for attention and +memory tradeoffs, and the [support matrix](../inference/support_matrix.md) for +the supported model and optimization surface. + +## Troubleshooting + +- Loader errors about monolithic checkpoints mean an upstream `stabilityai/stable-audio-open-*` ID was used; use the FastVideo converted repos from the recipes. +- Duration and step knobs (`audio_end_in_s`, `num_inference_steps`) are documented inline in the example source. + +## Evidence status + +The Stable Audio Open 1.0 recipe maps to a checked-in example and a recorded single-GPU B200 run. The Stable Audio Open Small recipe remains **Source-backed** because the implementation PR did not record a full run for that gated checkpoint. Neither recipe claims a minimum VRAM requirement. diff --git a/docs/cookbook/stable-diffusion.md b/docs/cookbook/stable-diffusion.md new file mode 100644 index 00000000..6185179b --- /dev/null +++ b/docs/cookbook/stable-diffusion.md @@ -0,0 +1,130 @@ +--- +hide: +- toc +--- + +# Stable Diffusion recipes + +
+
+ All model families +
+ +
+

Maintained family · Inference

+

Stable Diffusion inference recipes

+

Stable Diffusion 3.5 Medium is Stability AI's text-to-image model in this catalog. The maintained example sweeps a small prompt set across seeds.

+
+
+
+ Inference live + Distillation planned + Fine-tuning planned + Training planned + Evaluation planned + Optimization planned + Deployment planned +
+
+ +
+
+

Choose a model and GPU count

+

Choose a model, then pick a GPU count. Each selection maps to one + checked-in recipe. If that recipe does not use your chosen count, the + page says so instead of guessing.

+
+ +
+
+
+
+ Recipe + Task and checkpoint +
+
+ +
+
+ +
+
+ Runtime + Maintained paths only +
+
+ +
+
+ +

Loading recipe details...

+

Exact device and memory details appear only when a recorded run supports them.

+ +
+ Reading recipe evidence... +
+
+ +
+
+

Loading...

+
+ Maintained + Source-backed + Source config +
+
+ +
+
Model
Loading...
+
Workload
Loading...
+
Source configuration
Loading...
+
Expected output
Loading...
+
+ +
+
+ Terminal +
+
Loading...
+
+ + +

+
+
+ + +
+
+ +## Before you run + +The generated commands expect a local clone: + + git clone https://github.com/hao-ai-lab/FastVideo.git + cd FastVideo + +Use [Configuration](../inference/configuration.md) for supported Python and +CLI settings, [Optimizations](../inference/optimizations.md) for attention and +memory tradeoffs, and the [support matrix](../inference/support_matrix.md) for +the supported model and optimization surface. + +## Troubleshooting + +- The example writes several PNGs under `outputs/sd35/samples/`; make sure the output directory is writable. +- Gated checkpoints: Stability AI models require accepting the license and `huggingface-cli login`. + +## Evidence status + +All recipes on this page are **Source-backed**: their commands, model IDs, and flags were validated against the checked-in FastVideo sources listed above (static validation). No runtime GPU validation is recorded for these recipes, so GPU model fit, memory use, throughput, and runtime duration are **Unknown** and deliberately not claimed. Runtime buttons show only the GPU counts configured in checked-in sources. diff --git a/docs/cookbook/turbodiffusion.md b/docs/cookbook/turbodiffusion.md new file mode 100644 index 00000000..323f8df0 --- /dev/null +++ b/docs/cookbook/turbodiffusion.md @@ -0,0 +1,130 @@ +--- +hide: +- toc +--- + +# TurboDiffusion recipes + +
+
+ All model families +
+ +
+

Maintained family · Inference

+

TurboDiffusion inference recipes

+

TurboDiffusion profiles accelerate Wan checkpoints with step-distilled sampling and the SLA attention backend. These recipes follow the registry's `turbodiffusion` model family.

+
+
+
+ Inference live + Distillation planned + Fine-tuning planned + Training planned + Evaluation planned + Optimization planned + Deployment planned +
+
+ +
+
+

Choose a model and GPU count

+

Choose a model, then pick a GPU count. Each selection maps to one + checked-in recipe. If that recipe does not use your chosen count, the + page says so instead of guessing.

+
+ +
+
+
+
+ Recipe + Task and checkpoint +
+
+ +
+
+ +
+
+ Runtime + Maintained paths only +
+
+ +
+
+ +

Loading recipe details...

+

Exact device and memory details appear only when a recorded run supports them.

+ +
+ Reading recipe evidence... +
+
+ +
+
+

Loading...

+
+ Maintained + Source-backed + Source config +
+
+ +
+
Model
Loading...
+
Workload
Loading...
+
Source configuration
Loading...
+
Expected output
Loading...
+
+ +
+
+ Terminal +
+
Loading...
+
+ + +

+
+
+ + +
+
+ +## Before you run + +The generated commands expect a local clone: + + git clone https://github.com/hao-ai-lab/FastVideo.git + cd FastVideo + +Use [Configuration](../inference/configuration.md) for supported Python and +CLI settings, [Optimizations](../inference/optimizations.md) for attention and +memory tradeoffs, and the [support matrix](../inference/support_matrix.md) for +the supported model and optimization surface. + +## Troubleshooting + +- TurboDiffusion paths load community-published `loayrashid/TurboWan*` checkpoints; availability is governed by those repos. +- The SLA attention backend used by the I2V recipe is selected inside the example source; do not combine it with another `FASTVIDEO_ATTENTION_BACKEND` override in the same shell. + +## Evidence status + +All recipes on this page are **Source-backed**: their commands, model IDs, and flags were validated against the checked-in FastVideo sources listed above (static validation). No runtime GPU validation is recorded for these recipes, so GPU model fit, memory use, throughput, and runtime duration are **Unknown** and deliberately not claimed. Runtime buttons show only the GPU counts configured in checked-in sources. diff --git a/docs/cookbook/wan.md b/docs/cookbook/wan.md new file mode 100644 index 00000000..36df7964 --- /dev/null +++ b/docs/cookbook/wan.md @@ -0,0 +1,130 @@ +--- +hide: +- toc +--- + +# Wan recipes + +
+
+ All model families +
+ +
+

Maintained family · Inference

+

Wan inference recipes

+

Wan recipes span maintained CUDA examples and the released FastMetal 1.3B, 5B, and 14B native MLX paths for Apple Silicon.

+ 7 maintained recipes +
+
+
+ Inference live + Distillation planned + Fine-tuning planned + Training planned + Evaluation planned + Optimization planned + Deployment planned +
+
+ +
+
+

Pick a recipe and runtime

+

Choose the result you want, then use a maintained CUDA or native MLX path.

+
+ +
+
+
+
+ Recipe + Task and checkpoint +
+
+ +
+
+ +
+
+ Runtime + Maintained paths only +
+
+ +
+
+ +

Loading recipe details...

+

Exact device and memory details appear only when a recorded run supports them.

+ +
+ Reading recipe evidence... +
+
+ +
+
+

Loading...

+
+ Maintained + Source-backed + Source config +
+
+ +
+
Model
Loading...
+
Workload
Loading...
+
Hardware
Loading...
+
Expected output
Loading...
+
+ +
+
+ Terminal +
+
Loading...
+
+ + +

+
+
+ + +
+
+ +## Before you run + +The generated commands expect a local clone: + + git clone https://github.com/hao-ai-lab/FastVideo.git + cd FastVideo + +Use [Configuration](../inference/configuration.md) for supported Python and +CLI settings, [Optimizations](../inference/optimizations.md) for attention and +memory tradeoffs, and the [support matrix](../inference/support_matrix.md) for +the supported model and optimization surface. + +## Troubleshooting + +- Out of memory on the A14B recipes: the checked-in sources already enable CPU offload; see [Configuration](../inference/configuration.md) for the offload surface before reducing resolution or frames. +- The FastWan2.1 recipe requires `VIDEO_SPARSE_ATTN`; confirm the environment variable in the command was set in the same shell. +- Gated or missing checkpoints: run `huggingface-cli login` and confirm you accepted the model's license on Hugging Face. + +## Evidence status + +Every recipe on this page maps to a checked-in FastVideo source. The FastMetal MLX releases include the recorded M4 Max system memory, documented unified-memory floor, and measured peak MLX memory. CUDA entries remain **Source-backed** where the examples record a GPU count but no exact GPU model or VRAM. Unlisted hardware is unknown, not unsupported. diff --git a/docs/cookbook/z-image.md b/docs/cookbook/z-image.md new file mode 100644 index 00000000..6a608279 --- /dev/null +++ b/docs/cookbook/z-image.md @@ -0,0 +1,130 @@ +--- +hide: +- toc +--- + +# Z-Image recipes + +
+
+ All model families +
+ +
+

Maintained family · Inference

+

Z-Image inference recipes

+

Z-Image Turbo from Tongyi MAI is a fast text-to-image model. The maintained example runs it on a single GPU.

+
+
+
+ Inference live + Distillation planned + Fine-tuning planned + Training planned + Evaluation planned + Optimization planned + Deployment planned +
+
+ +
+
+

Choose a model and GPU count

+

Choose a model, then pick a GPU count. Each selection maps to one + checked-in recipe. If that recipe does not use your chosen count, the + page says so instead of guessing.

+
+ +
+
+
+
+ Recipe + Task and checkpoint +
+
+ +
+
+ +
+
+ Runtime + Maintained paths only +
+
+ +
+
+ +

Loading recipe details...

+

Exact device and memory details appear only when a recorded run supports them.

+ +
+ Reading recipe evidence... +
+
+ +
+
+

Loading...

+
+ Maintained + Source-backed + Source config +
+
+ +
+
Model
Loading...
+
Workload
Loading...
+
Source configuration
Loading...
+
Expected output
Loading...
+
+ +
+
+ Terminal +
+
Loading...
+
+ + +

+
+
+ + +
+
+ +## Before you run + +The generated commands expect a local clone: + + git clone https://github.com/hao-ai-lab/FastVideo.git + cd FastVideo + +Use [Configuration](../inference/configuration.md) for supported Python and +CLI settings, [Optimizations](../inference/optimizations.md) for attention and +memory tradeoffs, and the [support matrix](../inference/support_matrix.md) for +the supported model and optimization surface. + +## Troubleshooting + +- Output defaults to `outputs/zimage/zimage_turbo.png`; pass `--output` to redirect. +- Gated or missing checkpoints: run `huggingface-cli login` and confirm you accepted the model's license on Hugging Face. + +## Evidence status + +All recipes on this page are **Source-backed**: their commands, model IDs, and flags were validated against the checked-in FastVideo sources listed above (static validation). No runtime GPU validation is recorded for these recipes, so GPU model fit, memory use, throughput, and runtime duration are **Unknown** and deliberately not claimed. Runtime buttons show only the GPU counts configured in checked-in sources. diff --git a/docs/generate_examples.py b/docs/generate_examples.py index 1e85d5d4..2b045cd2 100644 --- a/docs/generate_examples.py +++ b/docs/generate_examples.py @@ -25,17 +25,69 @@ COOKBOOK_SOURCE_ROOTS = ( ROOT_DIR / "examples/inference", ROOT_DIR / "scripts/inference", ) +# Cookbook families mirror the `model_family` values declared in +# fastvideo/registry.py, plus "flux" for models that register no family +# (e.g. black-forest-labs/FLUX.1-dev) and are grouped for documentation only. +COOKBOOK_FAMILIES = { + "wan", + "turbodiffusion", + "ltx2", + "hunyuan", + "cosmos", + "kandinsky5", + "flux", + "glm_image", + "zimage", + "sd35", + "minimax_h3", + "longcat", + "stable_audio", + "mmaudio", + "matrixgame", +} +# Lifecycle stages a recipe can belong to. Only "inference" has recipes today; +# the rest exist so the schema (and UI) can grow without another migration. +COOKBOOK_STAGES = { + "inference", + "distillation", + "fine-tuning", + "training", + "lora-training", + "evaluation", + "optimization", + "deployment", +} +# Explicit evidence states; never conflate these in recipe entries. +COOKBOOK_EVIDENCE_STATES = { + "Verified", + "Source-backed", + "Estimated", + "Community-reported", + "Unknown", + "Unsupported", +} +COOKBOOK_HARDWARE_EVIDENCE = {"validated", "source-configured", "estimated", "unknown"} +COOKBOOK_HARDWARE_PLATFORMS = {"cuda", "mlx", "mps"} +COOKBOOK_GPU_TYPES = {"NVIDIA", "Apple Silicon"} +COOKBOOK_HARDWARE_TEXT_FIELDS = { + "accelerator", + "system_memory", + "minimum_memory", + "peak_memory", + "evidence_url", +} def validate_cookbook() -> None: """Keep cookbook entries tied to checked-in runnable sources.""" - recipes = json.loads(COOKBOOK_DATA.read_text(encoding="utf-8")).get("recipes") + data = json.loads(COOKBOOK_DATA.read_text(encoding="utf-8")) + recipes = data.get("recipes") if not isinstance(recipes, list) or not recipes: raise ValueError(f"{COOKBOOK_DATA}: recipes must be a non-empty list") seen: set[str] = set() for recipe in recipes: - required = ("id", "task", "label", "model", "source", "command") + required = ("id", "family", "task", "label", "model", "source", "command") missing = {key for key in required if not recipe.get(key)} if missing: raise ValueError(f"Cookbook recipe is missing: {', '.join(sorted(missing))}") @@ -43,6 +95,58 @@ def validate_cookbook() -> None: raise ValueError(f"Duplicate cookbook recipe id: {recipe['id']}") seen.add(recipe["id"]) + if recipe["family"] not in COOKBOOK_FAMILIES: + raise ValueError(f"Cookbook recipe has an unknown family: {recipe['id']}: {recipe['family']}") + + stage = recipe.get("stage", "inference") + if stage not in COOKBOOK_STAGES: + raise ValueError(f"Cookbook recipe has an unknown stage: {recipe['id']}: {stage}") + + evidence = recipe.get("evidence", "Source-backed") + if evidence not in COOKBOOK_EVIDENCE_STATES: + raise ValueError(f"Cookbook recipe has an unknown evidence state: {recipe['id']}: {evidence}") + + hardware = recipe.get("hardware") + if not isinstance(hardware, dict): + raise ValueError(f"Cookbook recipe is missing hardware info: {recipe['id']}") + platform = hardware.get("platform", "cuda") + if platform not in COOKBOOK_HARDWARE_PLATFORMS: + raise ValueError(f"Cookbook recipe has an unknown hardware platform: {recipe['id']}: {platform}") + gpu_count = hardware.get("gpu_count") + if platform == "cuda" and (not isinstance(gpu_count, int) or gpu_count < 1): + raise ValueError(f"CUDA cookbook recipe needs an integer gpu_count >= 1: {recipe['id']}") + if platform != "cuda" and gpu_count is not None: + raise ValueError(f"Non-CUDA cookbook recipe must not use gpu_count: {recipe['id']}") + hardware_evidence = hardware.get("evidence") + if hardware_evidence not in COOKBOOK_HARDWARE_EVIDENCE: + raise ValueError(f"Cookbook recipe has unknown hardware evidence: {recipe['id']}: {hardware_evidence}\n" + f"Expected one of {sorted(COOKBOOK_HARDWARE_EVIDENCE)}. Never guess GPU compatibility.") + for field_name in COOKBOOK_HARDWARE_TEXT_FIELDS: + value = hardware.get(field_name) + if value is not None and not (isinstance(value, str) and value.strip()): + raise ValueError(f"Cookbook hardware field must be a non-empty string: {recipe['id']}: {field_name}") + if hardware_evidence == "validated" and not hardware.get("accelerator"): + raise ValueError(f"Validated cookbook hardware needs an exact accelerator: {recipe['id']}") + if hardware_evidence == "source-configured": + recorded_fields = {"accelerator", "system_memory", "peak_memory"}.intersection(hardware) + if recorded_fields: + raise ValueError(f"Source-configured hardware cannot claim recorded run details: {recipe['id']}: " + f"{', '.join(sorted(recorded_fields))}") + evidence_url = hardware.get("evidence_url") + if evidence_url is not None and not evidence_url.startswith("https://github.com/hao-ai-lab/FastVideo/"): + raise ValueError(f"Cookbook hardware evidence must link to the FastVideo repository: {recipe['id']}") + gpu_types = recipe.get("gpu_types", []) + if not isinstance(gpu_types, list) or any(gpu not in COOKBOOK_GPU_TYPES for gpu in gpu_types): + raise ValueError(f"Cookbook recipe has an unknown gpu_types entry: {recipe['id']}: {gpu_types}") + + revision = recipe.get("revision") + if revision is not None and not (isinstance(revision, str) and revision.strip()): + raise ValueError(f"Cookbook recipe revision must be a non-empty string when present: {recipe['id']}") + + related = recipe.get("related", []) + if not isinstance(related, list): + raise ValueError(f"Cookbook recipe related must be a list of recipe ids: {recipe['id']}") + source = (ROOT_DIR / recipe["source"]).resolve() if not any(source.is_relative_to(root.resolve()) for root in COOKBOOK_SOURCE_ROOTS): raise ValueError(f"Cookbook source is outside an approved directory: {recipe['source']}") @@ -50,11 +154,21 @@ def validate_cookbook() -> None: raise ValueError(f"Cookbook source does not exist: {recipe['source']}") source_text = source.read_text(encoding="utf-8") - if recipe["model"] not in source_text: - raise ValueError(f"Cookbook model is not present in {recipe['source']}: {recipe['model']}") + # The model must be traceable to the checked-in source itself, or be + # passed explicitly on the command line (e.g. --model-path or + # MODEL_PATH=) when the source reads it from arguments/env. + if recipe["model"] not in source_text and recipe["model"] not in recipe["command"]: + raise ValueError(f"Cookbook model is not present in {recipe['source']} or its command: {recipe['id']}") if recipe["source"] not in recipe["command"]: raise ValueError(f"Cookbook command does not invoke its source: {recipe['id']}") + # Second pass so `related` may point forward at recipes defined later. + ids = {recipe["id"] for recipe in recipes} + for recipe in recipes: + for related_id in recipe.get("related", []): + if related_id not in ids: + raise ValueError(f"Cookbook recipe references unknown related id: {recipe['id']}: {related_id}") + def fix_case(text: str) -> str: subs = { diff --git a/mkdocs.yml b/mkdocs.yml index e2180d61..9956e749 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -154,7 +154,23 @@ nav: - Apple Silicon FastWan: getting_started/installation/mps.md - Quick Start: getting_started/quick_start.md - V1 API: getting_started/v1_api.md - - Cookbook: cookbook/index.md + - Cookbook: + - Model Families: cookbook/index.md + - Wan: cookbook/wan.md + - LTX: cookbook/ltx.md + - Hunyuan: cookbook/hunyuan.md + - Cosmos: cookbook/cosmos.md + - Kandinsky 5: cookbook/kandinsky5.md + - FLUX: cookbook/flux.md + - GLM-Image: cookbook/glm-image.md + - Z-Image: cookbook/z-image.md + - Stable Diffusion: cookbook/stable-diffusion.md + - MiniMax H3: cookbook/minimax-h3.md + - LongCat: cookbook/longcat.md + - Stable Audio: cookbook/stable-audio.md + - MMAudio: cookbook/mmaudio.md + - Matrix Game: cookbook/matrix-game.md + - TurboDiffusion: cookbook/turbodiffusion.md - Inference: - Quick Start: inference/inference_quick_start.md - Configuration: inference/configuration.md