> For the complete documentation index, see [llms.txt](https://world-models-from-scratch.gitbook.io/wmfs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://world-models-from-scratch.gitbook.io/wmfs/chapters/chapter_02.md).

# Chapter 2: Running a Pretrained World Model

In this chapter, we will use a pretrained video world model to generate future video frames. The input is a sequence of observed video frames and a text prompt. The output is a sequence of generated frames showing one possible continuation.

The examples use [NVIDIA Cosmos-Predict2.5-2B](https://huggingface.co/nvidia/Cosmos-Predict2.5-2B) model through Diffusers to generate video continuations from video and text.

## What You Will Build

By the end of the chapter, you will be able to:

* prepare a video observation for a released checkpoint
* load the checkpoint and generate one rollout
* sample several futures from the same observation
* compare guidance and inference-step settings
* measure disagreement among sampled futures
* save each rollout with the settings that produced it

## Contents

* [2.1 From an Observation to a Sampled Future](/wmfs/chapters/chapter_02/01-running-a-pretrained-world-model.md)
* [2.2 Choose a Setup](/wmfs/chapters/chapter_02/02-choose-a-setup.md)
* [2.3 Prepare the Observation](/wmfs/chapters/chapter_02/03-prepare-the-observation.md)
* [2.4 Load the Model and Generate a Rollout](/wmfs/chapters/chapter_02/04-load-and-generate.md)
* [2.5 Generate Several Futures](/wmfs/chapters/chapter_02/05-generate-several-futures.md)
* [2.6 Compare Generation Settings](/wmfs/chapters/chapter_02/06-control-and-inspect.md)
* [2.7 Save a Rollout with Its Settings](/wmfs/chapters/chapter_02/07-save-and-reuse.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://world-models-from-scratch.gitbook.io/wmfs/chapters/chapter_02.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
