FlashDreams is a GPU-heavy inference and serving library for autoregressive video and world models. Default to inspection, docs, config checks, and CPU tests unless the user explicitly asks to run generation or GPU workflows.
Start here, then use the narrower docs for the task in front of you:
skills/contains repo-authored Agent Skills. Useskills/README.mdfor opt-in setup and skill authoring rules.README.mdcovers user-facing setup, requirements, supported models, and first-run commands.CONTRIBUTING.mdcovers PR process, DCO sign-off, coding conventions, test markers, and dependency rules.docs/README.mdcovers Sphinx docs build and hosting.tests/README.mdcovers local, Docker, and CI-oriented test entry points.
flashdreams/flashdreams/core/: reusable numerical primitives, checkpoint loading, distributed helpers, attention, and I/O. Keep it model-agnostic.flashdreams/flashdreams/infra/: framework contracts and orchestration for configs, pipelines, encoders, decoders, diffusion models, schedulers, runners, profiling, and CUDA graph wrapping.flashdreams/flashdreams/recipes/: built-in reusable recipe code such as WAN, Cosmos, TAEHV, and template wiring.flashdreams/flashdreams/configs/,plugins/, andscripts/: runner registry, plugin discovery, and CLI entry points.integrations/<name>/: workspace-member model/plugin packages with their own configs, runners, tests, README files, andpyproject.tomlentry points.docs/source/: Sphinx sources for quickstart, models, developer guides, API, and community docs.tests/: root test helpers plus package/integration tests. Ignore.claude/worktrees/when scanning the source tree; those are nested worktree artifacts, not the repo's current source.
skills/flashdreams-integrations: read before changing recipe/integration architecture, runner registration, pipeline wiring, or model boundaries.skills/integrate-a-model: read before porting a new external model or reproducing an integration workflow.skills/profile-model-performance: read before starting performance work on an existing model integration, demo, runner, or serving path; use it to map execution, add stage timings, and identify decode/model/cache/transfer/presentation bottlenecks.skills/apply-inference-optimizations: read before porting runtime speedups such as bounded K/V caches, overlap, compile, CUDA graphs, decoder layout changes, or presentation queue tuning into an integration.skills/validate-performance-quality: read before adding benchmark sweeps, quality comparisons, profiler probes, performance summaries, or docs for a performance change.skills/flashdreams-postprocessing: read before adding or modifying video post-processors, postprocess presets,VideoPostprocessStream, buffering/layout behavior, or runner postprocess wiring.skills/python-docstring-style: read before adding or polishing Python docstrings, field docstrings, module comments, or SPDX headers.skills/maintaining-oss-state: read before dependency, license, NOTICE, REUSE, or OSS-release collateral changes.- When adding a new
skills/<skill-name>/SKILL.md, update this section so agents can discover when to use it.
uv sync --extra dev --extra runners
uv sync --package <integration> --extra dev
uv run flashdreams-run --help
uv run flashdreams-run <runner-name> --help
uv run flashdreams-run --no-instantiate <runner-name>
uv run --group lint pre-commit run -a
uv run pytest -m ci_cpu
uv run pytest -m "not manual"
./tests/run_tests_local.sh [target]
./tests/run_tests_docker.sh [target]
uv run --group docs sphinx-build -b html docs/source docs/_build/html
uv run --group docs sphinx-autobuild -E docs/source docs/_build/html --port 8000Use --no-instantiate before GPU work to inspect the resolved runner config without constructing models or loading checkpoints.
- Inspect available runners with
uv run flashdreams-run --help, then inspect a specific runner withuv run flashdreams-run --no-instantiate <runner-name>. - Prefer CPU checks first: config imports, checkpoint key-remap shape/bijection tests on CPU or meta tensors, docs builds,
pytest -m ci_cpu, and static assertions about runner names and pipeline wiring. - Avoid
ci_gpu, generation,torchrun, Docker GPU tests, large Hugging Face downloads, rollout parity, CUDA graph, WebRTC runtime, and quality-regression tests on CPU-only hosts unless the user requests them or the test explicitly skips cleanly.
Every pytest test must carry exactly one of ci_cpu, ci_gpu, or manual; CONTRIBUTING.md has the exact rules. Use module-level pytestmark = pytest.mark.ci_cpu for pure Python/metadata tests. Keep GPU, libGL/cv2, large-checkpoint, credential, and download-heavy checks out of ci_cpu.
Keep dependency direction strict: core -> infra -> recipes/integrations. core and infra must not import from integrations/; expose a generic config slot or override hook instead of adding model-specific branches. Built-in reusable model pieces belong in flashdreams/flashdreams/recipes/; standalone plugin packages belong in integrations/<name>/.
- FlashDreams targets large NVIDIA GPUs; many real rollouts need 80 GB VRAM and CUDA-capable dependencies.
- Full
uv sync/uv runcan build CUDA packages such as Transformer Engine. For narrow work, useuv sync --package <integration> --extra devwhen possible. flashdreams-run --no-instantiateresolves config only; it does not prove weights, CUDA execution, or parity.- First GPU runs include compile/autotune warmup, so benchmark harnesses should discard warmup chunks.
- Docs CI mocks heavy GPU packages; local docs work should use the commands in
docs/README.md. - Plain
pytestincludes manual tests. Usepytest -m ci_cpuorpytest -m "not manual"for normal local validation. - New or moved skills must pass the Agent Skills frontmatter checks in
tests/test_agent_skills.py.
- Setup and requirements:
README.md,docs/source/quickstart/installation.rst - CLI details:
docs/source/api/cli.rst - Integration/plugin layout:
docs/source/api/integrations.rst - New integrations:
docs/source/developer_guides/new_integration.rst - Docs and CPU autodoc:
docs/README.md - Tests and quality regressions:
tests/README.md - Security reports:
SECURITY.md