Pipeline states¶
mindone.diffusers.modular_pipelines.modular_pipeline.PipelineState
dataclass
¶
[PipelineState
] stores the state of a pipeline. It is used to pass data between pipeline blocks.
Source code in mindone/diffusers/modular_pipelines/modular_pipeline.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
|
mindone.diffusers.modular_pipelines.modular_pipeline.PipelineState.get(keys, default=None)
¶
Get one or multiple values from the pipeline state.
PARAMETER | DESCRIPTION |
---|---|
keys
|
Key or list of keys for the values
TYPE:
|
default
|
The default value to return if not found
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Union[Any, Dict[str, Any]]
|
Union[Any, Dict[str, Any]]: Single value if keys is str, dictionary of values if keys is list |
Source code in mindone/diffusers/modular_pipelines/modular_pipeline.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
|
mindone.diffusers.modular_pipelines.modular_pipeline.PipelineState.get_by_kwargs(kwargs_type)
¶
Get all values with matching kwargs_type.
PARAMETER | DESCRIPTION |
---|---|
kwargs_type
|
The kwargs_type to filter by
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Dict[str, Any]
|
Dict[str, Any]: Dictionary of values with matching kwargs_type |
Source code in mindone/diffusers/modular_pipelines/modular_pipeline.py
109 110 111 112 113 114 115 116 117 118 119 120 |
|
mindone.diffusers.modular_pipelines.modular_pipeline.PipelineState.set(key, value, kwargs_type=None)
¶
Add a value to the pipeline state.
PARAMETER | DESCRIPTION |
---|---|
key
|
The key for the value
TYPE:
|
value
|
The value to store
TYPE:
|
kwargs_type
|
The kwargs_type with which the value is associated
TYPE:
|
Source code in mindone/diffusers/modular_pipelines/modular_pipeline.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|
mindone.diffusers.modular_pipelines.modular_pipeline.PipelineState.to_dict()
¶
Convert PipelineState to a dictionary.
Source code in mindone/diffusers/modular_pipelines/modular_pipeline.py
122 123 124 125 126 |
|
mindone.diffusers.modular_pipelines.modular_pipeline.BlockState
dataclass
¶
Container for block state data with attribute access and formatted representation.
Source code in mindone/diffusers/modular_pipelines/modular_pipeline.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
|
mindone.diffusers.modular_pipelines.modular_pipeline.BlockState.as_dict()
¶
Convert BlockState to a dictionary.
RETURNS | DESCRIPTION |
---|---|
Dict[str, Any]: Dictionary containing all attributes of the BlockState |
Source code in mindone/diffusers/modular_pipelines/modular_pipeline.py
161 162 163 164 165 166 167 168 |
|