For investigating the manifold geometry of complex dynamical systems and using this information to learn improved world models.
Project description
Seamstress
It's this easy:
# Import pip installed modules
from seamstress import WorldModel
# Load weights from hugging face
model = WorldModel.from_pretrained("isaac-ronald-ward/seamstress-rotorcraft").eval()
# Pass in the context data, and the intended action sequence
# you want to imagine the outcome of
pred = model.imagine(
# (context_len, |states_numeric|)
past_states_numeric=...,
# (context_len, image_channels, image_height, image_width)
past_states_image=...,
# (context_len, |actions|)
past_actions=...,
future_actions=...
)
# Inspect the imagined outputs
# (future_len, |states_numeric|)
pred["pred_future_states_numeric"]
# (future_len, image_channels, image_height, image_width)
pred["pred_future_states_image"]
Complete the instructions under installation before proceeding.
For the full inference walkthrough, including loading the shipped demo trajectory and writing predicted videos, see docs/README.inference.md.
Installation
Git LFS
Git Large File Storage (LFS) is used to manage large files in this repository. After cloning the repository, make sure to install Git LFS and pull the large files:
git lfs install
git lfs pull
Docker
Docker is used for reproducibility and ease of setup, and should be installed if you don't have it already.
We provide a development container style setup that bind-mounts the repo into the container, so edits on the host are reflected immediately inside the container, and vice versa.
To build and run the GPU container (requires NVIDIA drivers + nvidia-container-toolkit):
# The build step takes a while the first time round. Subsequent usage only requires the run command. For now, go grab a cuppa!
docker compose -f docker/compose.seamstress.yml build --no-cache seamstress-gpu
docker compose -f docker/compose.seamstress.yml run --rm -it seamstress-gpu bash
# Ensure that your GPUs are visible inside the container with:
nvidia-smi
This repository concerns the training of deep learning-based world models, so we recommend using a GPU. That said, we also provide a CPU container for development and testing:
# The build step takes a while the first time round. Subsequent usage only requires the run command. For now, go grab a cuppa!
docker compose -f docker/compose.seamstress.yml build --no-cache seamstress-cpu
docker compose -f docker/compose.seamstress.yml run --rm -it seamstress-cpu bash
Standard Docker commands apply:
# Leave the container
exit
# List all the containers and find the desired container id
docker ps
# Use the container id to start a new shell in the running container
docker exec -it ae8c43356adf bash
# Stop a running container with the container id
docker stop ae8c43356adf
# Stop all containers
docker stop $(docker ps -q)
Environment variables
Finally, copy .env.example to .env and fill in required fields (Weights & Biases, HuggingFace tokens, etc.). Note that nothing under the blocks:
# ----------------------------------------------------------------------
# Optional FiGS sidecar integration (GPU-only)
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# The following can remain unchanged unless you are tinkering
# ----------------------------------------------------------------------
Need changing for standard usage, but feel free to edit these for tinkering and ablations.
Getting started
We provide the following specific guides to get started with different aspects of the project, recommending that you always start with 1.
- Running the full workflow on a toy environment
- Loading a pretrained Seamstress model and using it for inference
- Using 'Flying in Gaussian Splats' for high fidelity quadrotor simulations
- Training on real world data
- Using your own data
Convienience commands
To delete all the logs and training artefacts in the repo use:
rm -rf ./logs/*
rm -rf ./wandb/*
rm -rf ./outputs/*
To delete all logs on Weights & Biases that do not include '*' in the run name use:
uv run -- python -m seamstress.utils.wandb_cleanup
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file seamstress_world_models-1.0.4.tar.gz.
File metadata
- Download URL: seamstress_world_models-1.0.4.tar.gz
- Upload date:
- Size: 33.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58de38fa144467ada0ed6a9447795e5491c3cb62ce0c276a342131f9a7498c2c
|
|
| MD5 |
93fbf3b31dd2a2f3610dd388684ea03a
|
|
| BLAKE2b-256 |
12dc3b74c5cedf802178ea09afb4e4c425df4548eb44289b4128a0a97bde67a0
|
Provenance
The following attestation bundles were made for seamstress_world_models-1.0.4.tar.gz:
Publisher:
release.yml on isaac-ward/seamstress
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
seamstress_world_models-1.0.4.tar.gz -
Subject digest:
58de38fa144467ada0ed6a9447795e5491c3cb62ce0c276a342131f9a7498c2c - Sigstore transparency entry: 1108593148
- Sigstore integration time:
-
Permalink:
isaac-ward/seamstress@c13b2631c395613cb78f4d10ca3ed7b9246d0af4 -
Branch / Tag:
refs/tags/v1.0.4 - Owner: https://github.com/isaac-ward
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c13b2631c395613cb78f4d10ca3ed7b9246d0af4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file seamstress_world_models-1.0.4-py3-none-any.whl.
File metadata
- Download URL: seamstress_world_models-1.0.4-py3-none-any.whl
- Upload date:
- Size: 28.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
753705d649ed73d8bedb2ea4b3e81e09ca34c04fa359ae74db90411b0773c2df
|
|
| MD5 |
bb68e4396fdbcbbb1f49bc6676e3ddae
|
|
| BLAKE2b-256 |
4f236c5601ed3973fddb8050ee8ab5acc57fd6aad6ba54839d888e0d713022f5
|
Provenance
The following attestation bundles were made for seamstress_world_models-1.0.4-py3-none-any.whl:
Publisher:
release.yml on isaac-ward/seamstress
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
seamstress_world_models-1.0.4-py3-none-any.whl -
Subject digest:
753705d649ed73d8bedb2ea4b3e81e09ca34c04fa359ae74db90411b0773c2df - Sigstore transparency entry: 1108593152
- Sigstore integration time:
-
Permalink:
isaac-ward/seamstress@c13b2631c395613cb78f4d10ca3ed7b9246d0af4 -
Branch / Tag:
refs/tags/v1.0.4 - Owner: https://github.com/isaac-ward
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c13b2631c395613cb78f4d10ca3ed7b9246d0af4 -
Trigger Event:
push
-
Statement type: