diff --git a/.github/scripts/plan_merge_ci.py b/.github/scripts/plan_merge_ci.py index 0d4a01d06..10524392b 100644 --- a/.github/scripts/plan_merge_ci.py +++ b/.github/scripts/plan_merge_ci.py @@ -104,9 +104,9 @@ SAFE_PATTERNS = ( "comfyui/**", "docs/**", "examples/**", - "mkdocs.yml", - "requirements-mkdocs.in", - "requirements-mkdocs.txt", + "docs-site/**", + "requirements-docs.in", + "requirements-docs.txt", "scripts/**", "tests/__init__.py", "tests/local_tests/**", @@ -321,7 +321,7 @@ def classify_paths(paths: list[str], removed_paths: Iterable[str] = ()) -> Merge plan.require_all("changed-file API failed; failing closed") continue - if path in {"requirements-mkdocs.in", "requirements-mkdocs.txt"}: + if path in {"requirements-docs.in", "requirements-docs.txt"}: plan.reasons.append(f"documentation dependencies need no GPU integration: {path}") continue diff --git a/.github/workflows/infra-docs.yml b/.github/workflows/infra-docs.yml index c7a206ad9..d4f4e67b8 100644 --- a/.github/workflows/infra-docs.yml +++ b/.github/workflows/infra-docs.yml @@ -7,9 +7,11 @@ on: - 'docs/**' - 'examples/**' - 'scripts/inference/**' - - 'mkdocs.yml' - - 'requirements-mkdocs.in' - - 'requirements-mkdocs.txt' + - 'docs-site/**' + - 'fastvideo/**' + - 'README.md' + - 'requirements-docs.in' + - 'requirements-docs.txt' - 'scripts/check_docs_links.py' - '.github/workflows/infra-docs.yml' pull_request: @@ -18,9 +20,11 @@ on: - 'docs/**' - 'examples/**' - 'scripts/inference/**' - - 'mkdocs.yml' - - 'requirements-mkdocs.in' - - 'requirements-mkdocs.txt' + - 'docs-site/**' + - 'fastvideo/**' + - 'README.md' + - 'requirements-docs.in' + - 'requirements-docs.txt' - 'scripts/check_docs_links.py' - '.github/workflows/infra-docs.yml' @@ -35,6 +39,7 @@ concurrency: jobs: build: + timeout-minutes: 15 runs-on: ubuntu-latest steps: - name: Checkout @@ -51,7 +56,7 @@ jobs: uses: astral-sh/setup-uv@v3 - name: Install dependencies - run: uv pip install --system -r requirements-mkdocs.txt + run: uv pip install --system -r requirements-docs.txt - name: Setup Pages uses: actions/configure-pages@v4 @@ -59,10 +64,16 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '22' + node-version: '24' + cache: npm + cache-dependency-path: | + docs/package-lock.json + docs-site/package-lock.json - name: Install cookbook dependencies - run: npm ci --prefix docs + run: | + npm ci --prefix docs + npm ci --prefix docs-site - name: Validate and generate cookbook catalogs run: | @@ -71,8 +82,25 @@ jobs: python docs/tests/test_cookbook_assets.py npm run build:catalog --prefix docs - - name: Build documentation - run: mkdocs build + - name: Check site types and formatting + run: | + npm run check --prefix docs-site + npm run format:check --prefix docs-site + + - name: Build and validate documentation + run: | + npm run build --prefix docs-site + npm run validate --prefix docs-site + npm run test:content --prefix docs-site + python -m unittest discover -s docs-site/tests -p 'test_*.py' + python docs/check_cookbook_assets.py docs-site/dist + + - name: Install test browser + working-directory: docs-site + run: npx playwright install --with-deps chromium + + - name: Test documentation and cookbook interactions + run: npm test --prefix docs-site - name: Check docs links run: python scripts/check_docs_links.py @@ -80,7 +108,15 @@ jobs: - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: ./site + path: ./docs-site/dist + + - name: Upload browser failure traces + if: failure() + uses: actions/upload-artifact@v4 + with: + name: docs-browser-results + path: docs-site/test-results + if-no-files-found: ignore deploy: environment: diff --git a/.gitignore b/.gitignore index e4d9d47b0..0564b8e6c 100644 --- a/.gitignore +++ b/.gitignore @@ -52,9 +52,8 @@ dist/ eggs/ .eggs/ -# MkDocs documentation +# Generated documentation site/ -docs/assets/cookbook-serving.json docs/assets/cookbook-config/ examples/serving/clients/node_modules/ docs/node_modules/ @@ -63,7 +62,6 @@ docs/examples/ docs/inference/examples/ docs/training/examples/ docs/distillation/examples/ -!requirements-mkdocs.txt # VSCode .vscode/ diff --git a/AGENTS.md b/AGENTS.md index f79037dcc..85e8e5b23 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,7 +6,7 @@ - Tests: - `fastvideo/tests/` for package-level tests (dataset, encoders, inference, training, SSIM, workflow). - `tests/local_tests/` for additional local/component checks. -- Docs and guides: `docs/` (MkDocs source), with contributor docs in `docs/contributing/`. +- Docs and guides: canonical Markdown in `docs/`, the Blume app in `docs-site/`, and contributor docs in `docs/contributing/`. - Runnable examples and scripts: `examples/` and `scripts/`. - Static assets: `assets/` (including `assets/images/`, `assets/videos/`, and `assets/prompts/`) and `comfyui/assets/`. diff --git a/docs-site/.gitignore b/docs-site/.gitignore new file mode 100644 index 000000000..42bc5b14f --- /dev/null +++ b/docs-site/.gitignore @@ -0,0 +1,9 @@ +node_modules/ +.blume/ +dist/ +.env.local +public/ +test-results/ +playwright-report/ +.generated/ +.venv/ diff --git a/docs-site/.prettierignore b/docs-site/.prettierignore new file mode 100644 index 000000000..8c7d4541d --- /dev/null +++ b/docs-site/.prettierignore @@ -0,0 +1,10 @@ +node_modules +.blume +dist +public +package-lock.json +test-results +playwright-report +.generated +.venv +migration-anchors.json diff --git a/docs-site/INFORMATION_ARCHITECTURE.md b/docs-site/INFORMATION_ARCHITECTURE.md new file mode 100644 index 000000000..651e9a87b --- /dev/null +++ b/docs-site/INFORMATION_ARCHITECTURE.md @@ -0,0 +1,117 @@ +# Documentation and cookbook plan + +Readers should be able to choose a model, find their hardware path, generate a +result, and then customize or train it without searching several sections for +the same instructions. + +## One home for each kind of information + +| Area | Question it answers | Owns | +| --------------------- | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| Fast Models | Which FastVideo release should I choose? | Our released families, checkpoint exports, collections, short capability descriptions, links to recipes | +| Support matrix | What else can FastVideo run? | The wider supported model set and optimization compatibility | +| Hardware and runtimes | Where can I run it? | NVIDIA RTX/workstation and data center CUDA paths, DGX Spark, Apple MLX, AMD ROCm, platform requirements and limits | +| Documentation | How does FastVideo work? | Installation, the first generation, configuration, CLI, parallelism, offloading, integrations, training, architecture and API reference | +| Cookbook | How do I run this model for this task? | One family home, runtime choices, runnable recipes, model-specific configuration, troubleshooting and evidence | + +Fast Models highlights our models without implying that FastVideo only supports +those releases. CUDA and ROCm are runtimes; RTX, data center GPUs and DGX Spark +are hardware paths. MLX is the Apple Silicon runtime. These distinctions should +be visible before readers choose an installation command. + +## Included now + +- One Hardware and runtimes overview links the five hardware paths. AMD is + explicitly source-backed support with incomplete installation/device coverage, + rather than a promise that CUDA recipes or kernels work on every AMD GPU. +- The getting-started sidebar contains Quick start, Installation, Hardware and + runtimes, and Python API basics. +- Run inference contains shared tasks. Hardware and Integrations are expandable + groups; individual hardware recipes do not interrupt onboarding. +- Model-specific references sit beside their family recipes in the Cookbook + sidebar. There is no separate Model guides list competing with the cookbook. + Existing LTX, Kandinsky and FastH3 reference URLs remain intact. +- Fast Models points FastH3 and FastWan readers to their cookbook families. + FastMetal also has a direct MLX setup entry. +- Generated examples have one visible page title, with the source link below it. + Their previous heading fragments remain available. + +## The intended reader flow + +1. Start at **Fast Models** to choose a released model, or the support matrix for + the broader catalog. +2. Check **Hardware and runtimes**, then follow the matching installation guide. +3. Open the model's **Cookbook family**. Choose the task and runtime, configure + a recipe, and run it. +4. Follow links to shared configuration, offloading or optimization docs when + more explanation is needed. +5. Move to training, distillation or contributor guides for development work. + +The quick start remains a short route for readers who want a first result before +browsing the catalog. + +## Next editorial pass + +1. **Consolidate onboarding.** Keep one first-video tutorial. Remove repeated + installation blocks from the inference quick start after preserving its unique + image-conditioning examples. Make Installation a platform chooser and keep + installation commands in platform guides. +2. **Give every model one family home.** Expand the cookbook family page with a + short capability overview, runtime/task recipes, checkpoint choices, limits, + troubleshooting and next steps. Fold overlapping model-specific guides into + that page or link a detailed reference from it. Preserve old routes with + redirects before deleting any page. +3. **Separate explanation from recipes.** Hardware owns environment setup; + cookbook owns model commands; shared docs explain the options. The RTX PRO + 6000 page's kernel internals and rejected experiments belong in research or + contributor material, separate from its runnable recipe. +4. **Reduce pointer pages and duplicate references.** Replace the two-sentence + ComfyUI pointer with a useful integration guide, or link directly to its + maintained README. Reconcile the two attention-backend development guides. + Let Architecture own the package map instead of repeating it in the agent guide. +5. **Split long optimization material by task.** Keep attention selection, + quantization, distributed execution and offloading cross-linked, with one + owner for each setting. Keep STA and mask search clearly archived. +6. **Fill the ROCm evidence gap.** Document a complete AMD installation and model + run with GPU architecture, ROCm/PyTorch versions, model revision, attention + backend, expected output and measured memory. Source implementation alone + should not turn into a broad device-support claim. + +## Per-page structure + +Task guides follow: outcome → requirements → runnable example → expected output +→ configuration → troubleshooting → next step. A model recipe adds its checkpoint, +workload, runtime, hardware evidence and measured limitations. Detailed reference +and implementation history should not interrupt setup commands. + +See the [authoring guide](../docs/contributing/documentation.md). Examples and +Python reference stay source-generated and searchable; they do not need hundreds +of sidebar entries. + +## Publishing + +Blume replaces MkDocs through the existing GitHub Pages workflow at +`https://haoailab.com/FastVideo/`. Only `main` deploys. The migration manifest +checks previous routes and heading fragments. This PR changes navigation and +presentation while keeping the technical content available; the consolidation +steps above remain editorial follow-ups. + +## Cookbook model pages + +The cookbook catalog includes the maintained video, image, audio, and world +models, with category and family filters. FastH3 appears first. Each checkpoint +has its own page; related task or hardware recipes become variants on that page. +Family groups hold the pages alongside their broader runbooks. + +FastH3 8-Step V2, FastWan2.1 1.3B, Wan2.1 I2V 14B, and LTX2 Distilled use the five +existing editable serving deployments. Their pages have a model header, YAML +actions, generated commands, and a compact hardware/options matrix. Other models +publish existing source commands and YAML without inventing editable settings. +Hardware-fit validation remains unverified. New quantization, encoder, or runtime +choices require a backend recipe before becoming selectable. + +The retired page-copy and tab handlers, cookbook JavaScript, and theme styles are +removed. Canonical callouts now use Blume syntax, so builds no longer execute a +migration codemod. Existing family URLs show React model cards with their setup +and troubleshooting content. The homepage adds a direct FastH3 recipe link while +keeping the existing logo, news, project cards, typography, and backgrounds. diff --git a/docs-site/README.md b/docs-site/README.md new file mode 100644 index 000000000..3b209b8b7 --- /dev/null +++ b/docs-site/README.md @@ -0,0 +1,134 @@ +# FastVideo documentation + +Blume builds the documentation and React cookbook at +[haoailab.com/FastVideo](https://haoailab.com/FastVideo/). This PR replaces the +previous MkDocs site using the existing GitHub Pages publishing workflow. + +![Documentation homepage](docs-preview.jpg) + +![Fast Models catalog](fast-models-preview.jpg) + +## Develop and validate + +Read [Documenting FastVideo](../docs/contributing/documentation.md) for setup, +commands, source ownership, and the per-page writing template. Use Node 24 and +Python 3.12. `npm run dev --prefix docs-site` serves under `/FastVideo`. +`npm run build --prefix docs-site` prepares the content and writes `dist/`. +`npm run preview --prefix docs-site` serves that static build. + +Edit canonical guides under `docs/`, the welcome page under `content/`, the model +catalog in `lib/fast-models.ts`, and sidebar grouping in `navigation.json`. +Preparation regenerates `.generated/` and `public/`; neither is an editable copy. + +The [documentation structure plan](INFORMATION_ARCHITECTURE.md) records the new +navigation and proposed page consolidations. URLs stay stable in this PR. +Hardware and integrations sit beneath Run inference. Model-specific references +sit beside their family recipes in the Cookbook tab. Hardware and runtimes gives +readers a single starting point for CUDA, MLX and ROCm. + +## Build architecture + +- `scripts/prepare-python-docs.py` uses Griffe to extract modules, classes, + signatures, docstrings, and source directly from Python files. It never imports + FastVideo or needs PyTorch. Only Griffe, Markdown, and PyYAML are installed from + `requirements-docs.txt`. It also regenerates examples and serving metadata. +- `scripts/transfer-docs.mjs` rewrites links, preserves fragments, copies + assets, and overlays the handwritten application pages. Canonical guides use + native Blume callouts and React family cards; no migration converter runs during builds. +- `migration-anchors.json` is a frozen compatibility contract for the previous + site's URLs and heading fragments. Tests check the published output against it. + Do not regenerate it to hide missing routes or anchors. +- `scripts/prepare-content.mjs` builds and copies cookbook catalogs and assets. + React model cards replace the old family selectors. Source commands and + serving configurations remain owned by their checked-in recipes. +- `.github/workflows/infra-docs.yml` validates and uploads `docs-site/dist/` with + the existing Pages actions. Deployment runs only on `main`. The domain, + environment and `/FastVideo` prefix are unchanged. + +## Homepage and catalog + +The welcome page uses Blume frame mode for its centered logo and accessible +heading. News comes from the first two dated entries under `NEWS` in the root +README; projects come from its Awesome work section. The original introduction +and key features come from canonical `docs/index.md`. + +The star button fetches GitHub's public repository count on load and every five +minutes while visible. Failed initial requests show "Star"; failed refreshes +retain the previous count. No credentials are used. The Trendshift badge loads +from Trendshift. The lab mark in `assets/hao-ai-lab.png` is the supplied image. + +Fast Models uses family cards, setup links, family filters, search, and consistent +checkpoint rows. The curated links were checked against the public Hugging Face +API on October 16, 2026. Published weights do not establish runtime or hardware +compatibility. Check the support matrix and matching setup guide. + +## Extend the cookbook + +`islands/Cookbook.tsx` owns the React UI and its loading/edit state. Shared +configuration behavior stays in `docs/js/cookbook-config.mjs`. The typed adapter +in `lib/cookbook.ts` describes the part of that existing contract used by this UI. +Read [the API contract](../docs/cookbook/design.md) and +[recipe authoring guide](../docs/contributing/cookbook_configuration.md) before +adding fields or recipes. + +- Keep native serving YAMLs and `docs/cookbook/recipes/` as the source of truth. + Do not add another recipe database or hardcode field lists in the UI. +- Use `getOptions` for field metadata and `resolveConfig` for validated YAML, + server commands, and client instructions. Clear generated output when invalid. +- The URL stores the selected deployment. Edit values stay local to the page; + URL serialization of all edited values is follow-up work. +- Reset restores the baseline. Missing fields remain inherited. Explicit `false`, + `0`, and `null` keep their meanings. Switching deployments discards edits. +- Installation and deployment guides resolve against the current origin and + deployment prefix. Family runbook URLs remain available in the Blume site. +- VRAM fit is unknown. Add a calculator or a verified-run badge only with the + measurements and evidence contract described in #1949. + +Blume builds the documentation shell with Astro. Components in `islands/` are +ordinary React; `client = "load"` enables hydration. `components/ui/` contains +editable shadcn components, `components.json` configures the CLI, and `theme.css` +maps their tokens to Blume's light/dark palette. Blume supplies Tailwind and reads +`tsconfig.json` aliases. Add components from this directory: + +```bash +npx shadcn@4.21.5 add dialog +``` + +The two npm overrides keep Astro's React integration and React plugin aligned +with the versions used by Blume 2.2.3. Without them, npm's resolver cycles between +the integration's newer plugin and Blume's pinned plugin. Recheck and remove the +overrides when upgrading Blume. + +The initial dependency audit reports 10 transitive advisories in Blume's dependency +tree, including its unused Vercel adapter and Markdown build dependencies. The +ordinary `npm audit fix` does not clear them; review upstream fixes before +production deployment. Do not apply `npm audit fix --force`, whose proposed +replacement is `blume@0.0.0`. + +## Verify UI changes + +```bash +npm run format:check --prefix docs-site +npm run check --prefix docs-site +npm run test:cookbook --prefix docs +npm run build --prefix docs-site +npm run validate --prefix docs-site +npm run test:content --prefix docs-site +cd docs-site +npx playwright install chromium +npm test +``` + +The browser suite starts a production preview. It checks edits and downloads, +invalid-output suppression, reset, switching runtimes, retry, obsolete loads, +keyboard editing, and mobile overflow under `/FastVideo`. Keep shared API tests +in `docs/tests/`; add React interaction tests here. No serving process is launched. + +## Review and follow-up + +This PR switches the existing Pages artifact from MkDocs to Blume when merged. +The original routes and fragments are checked against the frozen migration +manifest. Review CI and the catalog/sidebar on desktop and mobile before merging. +The remaining cookbook design and editor coverage in #1949 can continue without +keeping a second documentation build. The editorial consolidation proposals are +listed separately in `INFORMATION_ARCHITECTURE.md`. diff --git a/docs-site/assets/hao-ai-lab.png b/docs-site/assets/hao-ai-lab.png new file mode 100644 index 000000000..77dab6914 Binary files /dev/null and b/docs-site/assets/hao-ai-lab.png differ diff --git a/docs-site/blume.config.ts b/docs-site/blume.config.ts new file mode 100644 index 000000000..b42aab496 --- /dev/null +++ b/docs-site/blume.config.ts @@ -0,0 +1,30 @@ +import { defineConfig } from "blume"; +import { readFileSync } from "node:fs"; + +export default defineConfig({ + title: "FastVideo", + description: "A unified inference and post-training framework for accelerated video generation.", + content: { root: ".generated/content" }, + logo: { image: "/icon.svg", text: "FastVideo" }, + theme: { accent: "blue", background: { light: "#ffffff", dark: "#1c1d20" }, mode: "system" }, + search: { + popular: [ + { label: "Quick start", href: "/getting_started/quick_start", icon: "rocket" }, + { label: "Fast Models", href: "/fast-models", icon: "boxes" }, + { label: "Installation", href: "/getting_started/installation", icon: "download" }, + { label: "Supported models", href: "/inference/support_matrix", icon: "video" }, + { label: "Python API", href: "/api", icon: "code" }, + ], + }, + navigation: { + actions: [{ label: "GitHub", href: "https://github.com/hao-ai-lab/FastVideo" }], + tabs: [ + { label: "Documentation", path: "/" }, + { label: "Cookbook", path: "/cookbook" }, + ], + sidebar: { items: JSON.parse(readFileSync(new URL("./.generated/navigation.json", import.meta.url), "utf8")) }, + }, + // Keep the production prefix in local builds so asset-path regressions are visible. + deployment: { site: "https://haoailab.com", base: "/FastVideo" }, + seo: { robots: true, sitemap: true, og: { enabled: false } }, +}); diff --git a/docs-site/components.json b/docs-site/components.json new file mode 100644 index 000000000..736f86ece --- /dev/null +++ b/docs-site/components.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": false, + "tsx": true, + "tailwind": { + "config": "", + "css": "theme.css", + "baseColor": "neutral", + "cssVariables": true + }, + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/ui", + "lib": "@/lib", + "hooks": "@/hooks" + }, + "iconLibrary": "lucide" +} diff --git a/docs-site/components/cookbook/ComponentPlan.tsx b/docs-site/components/cookbook/ComponentPlan.tsx new file mode 100644 index 000000000..c4be21ca9 --- /dev/null +++ b/docs-site/components/cookbook/ComponentPlan.tsx @@ -0,0 +1,57 @@ +import { useState } from "react"; + +/** A UI experiment, deliberately separated from the serving schema and generated YAML. */ +export default function ComponentPlan({ onDraftChange }: { onDraftChange?: (draft: boolean) => void }) { + const [selection, setSelection] = useState>({}); + const groups = [ + { name: "Weights", values: ["Recipe default", "FP8", "NVFP4"] }, + { name: "Text encoder", values: ["Recipe default", "NVFP4 encoder"] }, + { name: "Video decoder", values: ["Recipe default", "FP16 VAE", "NVFP4 VAE"] }, + ]; + return ( +
+ + Explore components Design preview + +
+ {groups.map((group) => ( +
+ {group.name} +
+ {group.values.map((value) => ( + + ))} +
+
+ ))} +
+

+ Preview only. Alternate components need a compatible recipe; some releases are planned. These choices do not + change YAML. +

+ {Object.values(selection).some((value) => value !== "Recipe default") && ( + + )} +
+ ); +} diff --git a/docs-site/components/cookbook/HardwarePicker.tsx b/docs-site/components/cookbook/HardwarePicker.tsx new file mode 100644 index 000000000..927fc2b84 --- /dev/null +++ b/docs-site/components/cookbook/HardwarePicker.tsx @@ -0,0 +1,93 @@ +import { useId, useState } from "react"; +import { Input } from "@/components/ui/input"; + +export default function HardwarePicker({ + backend, + options, + value, + onChange, +}: { + backend: string; + options: string[][]; + value: string; + onChange: (value: string) => void; +}) { + const [search, setSearch] = useState(""); + const [adding, setAdding] = useState(false); + const [custom, setCustom] = useState(() => { + const requested = new URL(window.location.href).searchParams.get("hardware"); + return requested?.startsWith("custom:") ? requested.slice(7) : ""; + }); + const id = useId(); + const known = options.filter((option) => option.join(" ").toLowerCase().includes(search.toLowerCase())); + function add() { + const name = search.trim(); + if (!name) return; + setCustom(name); + onChange(`custom:${name}`); + setSearch(""); + setAdding(false); + } + return ( +
+
+ Hardware target + {known.map(([key, title, detail]) => ( + + ))} + {custom && ( + + )} +
+ + {adding && ( +
{ + event.preventDefault(); + add(); + }} + > + + setSearch(event.target.value)} + placeholder={backend === "mlx" ? "e.g. M4 Max" : "e.g. RTX 4090"} + maxLength={80} + /> +

Search the list or add your device. Memory lookup and fit checks are not connected yet.

+ +
+ )} +
+ ); +} diff --git a/docs-site/components/cookbook/ModelHeader.tsx b/docs-site/components/cookbook/ModelHeader.tsx new file mode 100644 index 000000000..a133a1016 --- /dev/null +++ b/docs-site/components/cookbook/ModelHeader.tsx @@ -0,0 +1,24 @@ +import type { ReactNode } from "react"; +import { sitePath, type DirectoryModel } from "@/lib/cookbook-pages"; + +export default function ModelHeader({ model, actions }: { model: DirectoryModel; actions?: ReactNode }) { + return ( + <> + + ← All recipes + +
+ +
+

{model.provider}

+

{model.title}

+

{model.tags.join(" · ")}

+ {!model.model.startsWith("./") && ( + View on Hugging Face ↗ + )} +
+
{actions}
+
+ + ); +} diff --git a/docs-site/components/cookbook/ModelRelease.tsx b/docs-site/components/cookbook/ModelRelease.tsx new file mode 100644 index 000000000..63299bb2e --- /dev/null +++ b/docs-site/components/cookbook/ModelRelease.tsx @@ -0,0 +1,43 @@ +import ModelHeader from "./ModelHeader"; +import ComponentPlan from "./ComponentPlan"; +import { sitePath, type DirectoryModel } from "@/lib/cookbook-pages"; + +export default function ModelRelease({ model }: { model: DirectoryModel }) { + return ( +
+ +
+

FastH3 Trim is the smaller FastH3 model, previously called CompactH3.

+

A maintained serving recipe is being prepared. Use the published checkpoint instructions for setup.

+
+
+
+

Weights

+
+
+ {[ + ["BF16", "FastVideo-FastH3-Trim-8-Step"], + ["FP8", "FastVideo-FastH3-Trim-8-Step-FP8"], + ["NVFP4", "FastVideo-FastH3-Trim-8-Step-NVFP4"], + ].map(([name, repo]) => ( + + {name} ↗ + + ))} +
+
+
+
+

Components

+
+ +
+
+
+
+ FastH3 checkpoint guide → + Release collection ↗ +
+
+ ); +} diff --git a/docs-site/components/ui/badge.tsx b/docs-site/components/ui/badge.tsx new file mode 100644 index 000000000..f0bc7b726 --- /dev/null +++ b/docs-site/components/ui/badge.tsx @@ -0,0 +1,39 @@ +import * as React from "react"; +import { cva, type VariantProps } from "class-variance-authority"; +import { cn } from "cn"; +import { Slot } from "radix-ui"; + +const badgeVariants = cva( + "inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3", + { + variants: { + variant: { + default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90", + secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90", + destructive: + "bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90", + outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground", + ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground", + link: "text-primary underline-offset-4 [a&]:hover:underline", + }, + }, + defaultVariants: { + variant: "default", + }, + }, +); + +function Badge({ + className, + variant = "default", + asChild = false, + ...props +}: React.ComponentProps<"span"> & VariantProps & { asChild?: boolean }) { + const Comp = asChild ? Slot.Root : "span"; + + return ( + + ); +} + +export { Badge, badgeVariants }; diff --git a/docs-site/components/ui/button.tsx b/docs-site/components/ui/button.tsx new file mode 100644 index 000000000..73bce6f4f --- /dev/null +++ b/docs-site/components/ui/button.tsx @@ -0,0 +1,61 @@ +import * as React from "react"; +import { cva, type VariantProps } from "class-variance-authority"; +import { cn } from "cn"; +import { Slot } from "radix-ui"; + +const buttonVariants = cva( + "inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", + { + variants: { + variant: { + default: "bg-primary text-primary-foreground hover:bg-primary/90", + destructive: + "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40", + outline: + "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50", + secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80", + ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50", + link: "text-primary underline-offset-4 hover:underline", + }, + size: { + default: "h-9 px-4 py-2 has-[>svg]:px-3", + xs: "h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3", + sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5", + lg: "h-10 rounded-md px-6 has-[>svg]:px-4", + icon: "size-9", + "icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3", + "icon-sm": "size-8", + "icon-lg": "size-10", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, + }, +); + +function Button({ + className, + variant = "default", + size = "default", + asChild = false, + ...props +}: React.ComponentProps<"button"> & + VariantProps & { + asChild?: boolean; + }) { + const Comp = asChild ? Slot.Root : "button"; + + return ( + + ); +} + +export { Button, buttonVariants }; diff --git a/docs-site/components/ui/input.tsx b/docs-site/components/ui/input.tsx new file mode 100644 index 000000000..86342c159 --- /dev/null +++ b/docs-site/components/ui/input.tsx @@ -0,0 +1,20 @@ +import * as React from "react"; +import { cn } from "cn"; + +function Input({ className, type, ...props }: React.ComponentProps<"input">) { + return ( + + ); +} + +export { Input }; diff --git a/docs-site/components/ui/textarea.tsx b/docs-site/components/ui/textarea.tsx new file mode 100644 index 000000000..741a012a8 --- /dev/null +++ b/docs-site/components/ui/textarea.tsx @@ -0,0 +1,17 @@ +import * as React from "react"; +import { cn } from "cn"; + +function Textarea({ className, ...props }: React.ComponentProps<"textarea">) { + return ( +