Installation¶
Requirements¶
- Python 3.10+
- PyTorch 2.0+
- uv
Global CLI Install (cargo new style)¶
Optional: install InquirerPy for enhanced prompt widgets.
From Source (Recommended)¶
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¶
Verify Installation¶
import worldflux
print(worldflux.__version__)
from worldflux import create_world_model, list_models
print(list_models())
CPU Success Check¶
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: