Diffusers documentation

パイプラインの状態

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

パイプラインの状態

PipelineState

class diffusers.modular_pipelines.PipelineState

< >

( values: dict[str, typing.Any] = <factory>kwargs_mapping: dict[str, list[str]] = <factory> )

PipelineStateはパイプラインの状態を保持します。パイプラインブロック間でデータを渡すために使用されます。

get

< >

( keys: str | list[str]default: Any = None ) → Any | dict[str, Any]

パラメータ

  • keys (str | list[str]) — 値のキーまたはキーのリスト
  • default (Any) — 見つからない場合に返すデフォルト値

戻り値

Any | dict[str, Any]

keysがstrの場合は単一の値、keysがlistの場合は値の辞書

パイプラインの状態から1つ以上の値を取得します。

get_by_kwargs

< >

( kwargs_type: str ) → dict[str, Any]

パラメータ

  • kwargs_type (str) — フィルターに使用する kwargs_type

戻り値

dict[str, Any]

kwargs_type と一致する値の辞書

kwargs_type に一致するすべての値を取得します。

set

< >

( key: strvalue: Anykwargs_type: str = None )

パラメータ

  • key (str) — 値のキー
  • value (Any) — 保存する値
  • kwargs_type (str) — 値に関連付けられている kwargs_type

パイプラインの状態に値を追加します。

to_dict

< >

( )

PipelineStateを辞書に変換します。

BlockState

class diffusers.modular_pipelines.BlockState

< >

( **kwargs )

属性アクセスと整形済み表現を備えたブロック状態データのコンテナ。

as_dict

< >

( ) → dict[str, Any]

戻り値

dict[str, Any]

BlockState のすべての属性を含む辞書

BlockStateを辞書に変換します。

Update on GitHub