Diffusers documentation

Pipeline 상태

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v0.42.1).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Pipeline 상태

PipelineState

class diffusers.modular_pipelines.PipelineState

< >

( values: dict = <factory>kwargs_mapping: dict = <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인 경우 값의 사전

pipeline 상태로부터 하나 이상의 값을 가져옵니다.

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

pipeline 상태에 값을 추가합니다.

to_dict

< >

( )

PipelineState를 사전으로 변환합니다.

BlockState

class diffusers.modular_pipelines.BlockState

< >

( **kwargs )

속성 접근 및 포맷된 표현을 지원하는 블록 상태 데이터 컨테이너.

as_dict

< >

( ) → dict[str, Any]

반환값

dict[str, Any]

BlockState의 모든 속성을 포함하는 사전

BlockState를 사전으로 변환합니다.

Update on GitHub