Diffusers documentation
Trạng thái Pipeline
Trạng thái Pipeline
PipelineState
lớp diffusers.modular_pipelines.PipelineState
< source >( values: dict[str, typing.Any] = <factory>kwargs_mapping: dict[str, list[str]] = <factory> )
PipelineState lưu trữ trạng thái của một pipeline. Nó được dùng để truyền dữ liệu giữa các khối pipeline.
get
< source >( keys: str | list[str]default: Any = None ) → Any | dict[str, Any]
Lấy một hoặc nhiều giá trị từ trạng thái pipeline.
get_by_kwargs
< source >( kwargs_type: str ) → dict[str, Any]
Lấy tất cả các giá trị có kwargs_type khớp.
set
< source >( key: strvalue: Anykwargs_type: str = None )
Thêm một giá trị vào trạng thái pipeline.
Chuyển đổi PipelineState thành một từ điển.
BlockState
Container cho dữ liệu trạng thái khối với khả năng truy cập thuộc tính và biểu diễn định dạng.
as_dict
< source >( ) → dict[str, Any]
Trả về
dict[str, Any]
Từ điển chứa tất cả các thuộc tính của BlockState
Chuyển đổi BlockState thành một từ điển.