Diffusers documentation
Pipeline states
Get started
Inference
Using diffusion pipelines
Adapters and personalization
Optimize and scale
Basic performance
Inference
Community methods
Quantization
Hardware-specific acceleration
Serving and scaling
Modular Diffusers
Train and fine-tune
Resources
Contribute
API
Main Classes
Modular
Loaders
Models
Pipelines
Schedulers
Internal classes
You are viewing main version, which requires installation from source. If you'd like
regular pip install, checkout the latest stable version (v0.40.0).
Pipeline states
PipelineState
class diffusers.modular_pipelines.PipelineState
< source >( values: dict = <factory>kwargs_mapping: dict = <factory> )
PipelineState stores the state of a pipeline. It is used to pass data between pipeline blocks.
get
< source >( keys: str | list[str]default: typing.Any = None ) → Any | dict[str, Any]
Get one or multiple values from the pipeline state.
get_by_kwargs
< source >( kwargs_type: str ) → dict[str, Any]
Get all values with matching kwargs_type.
set
< source >( key: strvalue: typing.Anykwargs_type: str = None )
Add a value to the pipeline state.
Convert PipelineState to a dictionary.
BlockState
Container for block state data with attribute access and formatted representation.
as_dict
< source >( ) → dict[str, Any]
Returns
dict[str, Any]
Dictionary containing all attributes of the BlockState
Convert BlockState to a dictionary.