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

Một mô hình UNet từ Stable Cascade pipeline.

StableCascadeUNet

lớp 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 )

Tham số

  • sample (torch.Tensor) — Mẫu đầu vào có nhiễu.
  • timestep_ratio (torch.Tensor) — Tỷ lệ bước thời gian được sử dụng để tính nhúng bước thời gian.
  • clip_text_pooled (torch.Tensor) — Các embedding văn bản CLIP đã pooled.
  • clip_text (torch.Tensor, tùy chọn) — Nhúng văn bản CLIP ở cấp độ chuỗi.
  • clip_img (torch.Tensor, tùy chọn) — Các embedding hình ảnh CLIP.
  • effnet (torch.Tensor, tùy chọn) — Bản đồ đặc trưng EfficientNet được sử dụng như điều kiện bổ sung.
  • pixels (torch.Tensor, tùy chọn) — Tensor điều kiện ở cấp độ pixel. Nếu None, một tensor các số 0 sẽ được sử dụng.
  • sca (torch.Tensor, tùy chọn) — Giá trị điều kiện sca tùy chọn được sử dụng để xây dựng nhúng bước thời gian (timestep embedding).
  • crp (torch.Tensor, tùy chọn) — Giá trị điều kiện crp tùy chọn được sử dụng để xây dựng nhúng bước thời gian (timestep embedding).
  • return_dict (bool, tùy chọn, mặc định là True) — Có nên trả về một StableCascadeUNetOutput thay vì một tuple thông thường hay không.
Update on GitHub