# Pipeline states

## PipelineState[[diffusers.modular_pipelines.PipelineState]]

"}, {"name": "kwargs_mapping", "val": ": dict = "}]}>

`PipelineState` stores the state of a pipeline. It is used to pass data between pipeline blocks.

- **keys** (str | list[str]) -- Key or list of keys for the values
- **default** (Any) -- The default value to return if not foundAny | dict[str, Any]Single value if keys is str, dictionary of values if keys is list

Get one or multiple values from the pipeline state.

- **kwargs_type** (str) -- The kwargs_type to filter bydict[str, Any]Dictionary of values with matching kwargs_type

Get all values with matching kwargs_type.

- **key** (str) -- The key for the value
- **value** (Any) -- The value to store
- **kwargs_type** (str) -- The kwargs_type with which the value is associated

Add a value to the pipeline state.

Convert PipelineState to a dictionary.

## BlockState[[diffusers.modular_pipelines.BlockState]]

Container for block state data with attribute access and formatted representation.

dict[str, Any]Dictionary containing all attributes of the BlockState

Convert BlockState to a dictionary.

