Diffusers documentation

StableCascadeUNet

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

StableCascadeUNet

Stable Cascade パイプラインからの UNet モデル。

StableCascadeUNet

クラス diffusers.models.StableCascadeUNet

< >

( in_channels: int = 16out_channels: int = 16timestep_ratio_embedding_dim: int = 64patch_size: int = 1conditioning_dim: int = 2048block_out_channels: tuple = (2048, 2048)num_attention_heads: tuple = (32, 32)down_num_layers_per_block: tuple = (8, 24)up_num_layers_per_block: tuple = (24, 8)down_blocks_repeat_mappers: tuple[int] | None = (1, 1)up_blocks_repeat_mappers: tuple[int] | None = (1, 1)block_types_per_layer: tuple = (('SDCascadeResBlock', 'SDCascadeTimestepBlock', 'SDCascadeAttnBlock'), ('SDCascadeResBlock', 'SDCascadeTimestepBlock', 'SDCascadeAttnBlock'))clip_text_in_channels: int | None = Noneclip_text_pooled_in_channels = 1280clip_image_in_channels: int | None = Noneclip_seq = 4effnet_in_channels: int | None = Nonepixel_mapper_in_channels: int | None = Nonekernel_size = 3dropout: float | tuple[float] = (0.1, 0.1)self_attn: bool | tuple[bool] = Truetimestep_conditioning_type: tuple = ('sca', 'crp')switch_level: tuple[bool] | None = None )

forward

< >

( sampletimestep_ratioclip_text_pooledclip_text = Noneclip_img = Noneeffnet = Nonepixels = Nonesca = Nonecrp = Nonereturn_dict = True )

パラメータ

  • sample (torch.Tensor) — ノイズ付きの入力サンプル。
  • timestep_ratio (torch.Tensor) — timestep embedding を計算するために使用される timestep ratio。
  • clip_text_pooled (torch.Tensor) — プーリングされた CLIP テキスト埋め込み。
  • clip_text (torch.Tensor, 省略可) — シーケンスレベルの CLIP テキスト埋め込み。
  • clip_img (torch.Tensor、省略可) — CLIP の画像埋め込み。
  • effnet (torch.Tensor、省略可) — 追加の条件付けとして使用される EfficientNet の特徴マップ。
  • pixels (torch.Tensor、省略可) — ピクセルレベルの条件付けテンソル。None の場合は、ゼロのテンソルが使用されます。
  • sca (torch.Tensor, 任意) — タイムステップ埋め込みを構築するために使用される、任意のsca条件付け値。
  • crp (torch.Tensor, 任意) — タイムステップ埋め込みを構築するために使用される、任意のcrp条件付け値。
  • return_dict (bool、省略可能、デフォルトは True) — StableCascadeUNetOutput を返すか、通常のタプルを返すかを指定します。
Update on GitHub