Skip to content

Installation

Requirements

  • Python 3.10+
  • PyTorch 2.0+
  • uv

Global CLI Install (cargo new style)

uv tool install worldflux
worldflux init my-world-model

Optional: install InquirerPy for enhanced prompt widgets.

uv tool install --with inquirerpy worldflux
git clone https://github.com/worldflux/WorldFlux.git
cd worldflux
uv sync
source .venv/bin/activate
worldflux init my-world-model

With Optional Dependencies

# Training infrastructure (Trainer, ReplayBuffer, callbacks)
uv sync --extra training

# Visualization (matplotlib, imageio for GIFs)
uv sync --extra viz

# Atari environments (gymnasium[atari], ale-py)
uv sync --extra atari

# All optional dependencies
uv sync --extra all

# Development (testing, linting, type checking)
uv sync --extra dev

# Documentation tooling (MkDocs + API autogen plugins)
uv sync --extra docs

From PyPI

uv pip install worldflux
worldflux init my-world-model

Verify Installation

import worldflux
print(worldflux.__version__)

from worldflux import create_world_model, list_models
print(list_models())

CPU Success Check

uv sync --extra dev
uv run python examples/quickstart_cpu_success.py --quick

GPU Support

WorldFlux automatically uses CUDA if available:

import torch
print(f"CUDA available: {torch.cuda.is_available()}")

# Models automatically use GPU when available
model = create_world_model("dreamerv3:size12m", device="cuda")

Troubleshooting

CUDA Out of Memory

Use smaller model presets or reduce batch size:

# Use smaller model
model = create_world_model("dreamerv3:size12m")  # Instead of size200m

# Reduce training batch size
config = TrainingConfig(batch_size=8)  # Instead of 16

Missing Dependencies

If you get import errors for training features:

uv sync --extra training

Build Documentation Locally

uv sync --extra docs
uv run mkdocs serve
uv run mkdocs build --strict