Summary
After uv sync --extra runners on Python 3.12, flashdreams-run --help logs warnings for 14 runner entry points that fail to import. The root cause is that mediapy 1.2.6 (latest on PyPI, locked in uv.lock) crashes on import when numpy 2.5.0 is installed (the version uv.lock resolves for Python >= 3.12).
Environment
- Python 3.12
numpy==2.5.0 (from uv.lock)
mediapy==1.2.6 (from uv.lock, latest on PyPI)
- Install:
uv sync --extra runners
Reproduction
uv sync --extra runners
uv run python -c "import mediapy"
Fails with:
TypeError: typealias() takes exactly 2 positional arguments (3 given)
Traceback points to mediapy:
class _VideoArray(npt.NDArray[Any]):
NumPy 2.5 redefined numpy.typing.NDArray as a PEP 695 type alias, which can no longer be subclassed this way.
Running flashdreams-run --help then emits warnings like:
Failed to load flashdreams runner entry point 'cosmos2-t2v-2b-720p' -> cosmos_predict2.config:RUNNER_COSMOS2_T2V_2B_720P
Any integration whose config.py imports runner.py at module level (which does import mediapy) is affected. In a fresh sync this includes 14 runners (cosmos2, wan21, causal_forcing, self_forcing, flashvsr, fastvideo, etc.). Omnidreams runners still appear because omnidreams lazy-imports mediapy.
Impact
- Affected runners are silently skipped during plugin discovery (
flashdreams/flashdreams/plugins/registry.py catches the import error and logs a warning).
- Users following the README quickstart may not notice until they try to run a non-omnidreams model.
- Core inference is unaffected; mediapy is only used for runner I/O (
read_image, read_video, write_video).
Proposed fix
Pin numpy below 2.5 until mediapy releases a compatible version, using the existing workspace override pattern in root pyproject.toml:
[tool.uv]
override-dependencies = [
...
"numpy>=1.24,<2.5",
]
Verified workaround: numpy==2.4.6 + mediapy==1.2.6 imports cleanly and all runners register.
Upstream
- mediapy: https://github.com/google/mediapy (no release fixing numpy 2.5 NDArray subclassing yet; 1.2.6 is latest on PyPI)
- numpy 2.5 typing change:
NDArray is now a TypeAliasType (PEP 695)
Summary
After
uv sync --extra runnerson Python 3.12,flashdreams-run --helplogs warnings for 14 runner entry points that fail to import. The root cause is that mediapy 1.2.6 (latest on PyPI, locked inuv.lock) crashes on import when numpy 2.5.0 is installed (the versionuv.lockresolves for Python >= 3.12).Environment
numpy==2.5.0(fromuv.lock)mediapy==1.2.6(fromuv.lock, latest on PyPI)uv sync --extra runnersReproduction
uv sync --extra runners uv run python -c "import mediapy"Fails with:
Traceback points to mediapy:
NumPy 2.5 redefined
numpy.typing.NDArrayas a PEP 695 type alias, which can no longer be subclassed this way.Running
flashdreams-run --helpthen emits warnings like:Any integration whose
config.pyimportsrunner.pyat module level (which doesimport mediapy) is affected. In a fresh sync this includes 14 runners (cosmos2, wan21, causal_forcing, self_forcing, flashvsr, fastvideo, etc.). Omnidreams runners still appear because omnidreams lazy-imports mediapy.Impact
flashdreams/flashdreams/plugins/registry.pycatches the import error and logs a warning).read_image,read_video,write_video).Proposed fix
Pin numpy below 2.5 until mediapy releases a compatible version, using the existing workspace override pattern in root
pyproject.toml:Verified workaround:
numpy==2.4.6+mediapy==1.2.6imports cleanly and all runners register.Upstream
NDArrayis now aTypeAliasType(PEP 695)