Buckets:

hf-doc-build/doc-dev / diffusers /pr_12595 /en /api /models /ltx_video_transformer3d.md
rtrm's picture
|
download
raw
4.16 kB

LTXVideoTransformer3DModel

A Diffusion Transformer model for 3D data from LTX was introduced by Lightricks.

The model can be loaded with the following code snippet.

from diffusers import LTXVideoTransformer3DModel

transformer = LTXVideoTransformer3DModel.from_pretrained("Lightricks/LTX-Video", subfolder="transformer", torch_dtype=torch.bfloat16).to("cuda")

LTXVideoTransformer3DModel[[diffusers.LTXVideoTransformer3DModel]]

class diffusers.LTXVideoTransformer3DModeldiffusers.LTXVideoTransformer3DModelhttps://github.com/huggingface/diffusers/blob/vr_12595/src/diffusers/models/transformers/transformer_ltx.py#L385[{"name": "in_channels", "val": ": int = 128"}, {"name": "out_channels", "val": ": int = 128"}, {"name": "patch_size", "val": ": int = 1"}, {"name": "patch_size_t", "val": ": int = 1"}, {"name": "num_attention_heads", "val": ": int = 32"}, {"name": "attention_head_dim", "val": ": int = 64"}, {"name": "cross_attention_dim", "val": ": int = 2048"}, {"name": "num_layers", "val": ": int = 28"}, {"name": "activation_fn", "val": ": str = 'gelu-approximate'"}, {"name": "qk_norm", "val": ": str = 'rms_norm_across_heads'"}, {"name": "norm_elementwise_affine", "val": ": bool = False"}, {"name": "norm_eps", "val": ": float = 1e-06"}, {"name": "caption_channels", "val": ": int = 4096"}, {"name": "attention_bias", "val": ": bool = True"}, {"name": "attention_out_bias", "val": ": bool = True"}]- in_channels (int, defaults to 128) -- The number of channels in the input.

  • out_channels (int, defaults to 128) -- The number of channels in the output.
  • patch_size (int, defaults to 1) -- The size of the spatial patches to use in the patch embedding layer.
  • patch_size_t (int, defaults to 1) -- The size of the tmeporal patches to use in the patch embedding layer.
  • num_attention_heads (int, defaults to 32) -- The number of heads to use for multi-head attention.
  • attention_head_dim (int, defaults to 64) -- The number of channels in each head.
  • cross_attention_dim (int, defaults to 2048 ) -- The number of channels for cross attention heads.
  • num_layers (int, defaults to 28) -- The number of layers of Transformer blocks to use.
  • activation_fn (str, defaults to "gelu-approximate") -- Activation function to use in feed-forward.
  • qk_norm (str, defaults to "rms_norm_across_heads") -- The normalization layer to use.0

A Transformer model for video-like data used in LTX.

Transformer2DModelOutput[[diffusers.models.modeling_outputs.Transformer2DModelOutput]]

class diffusers.models.modeling_outputs.Transformer2DModelOutputdiffusers.models.modeling_outputs.Transformer2DModelOutputhttps://github.com/huggingface/diffusers/blob/vr_12595/src/diffusers/models/modeling_outputs.py#L21[{"name": "sample", "val": ": torch.Tensor"}]- sample (torch.Tensor of shape (batch_size, num_channels, height, width) or (batch size, num_vector_embeds - 1, num_latent_pixels) if Transformer2DModel is discrete) -- The hidden states output conditioned on the encoder_hidden_states input. If discrete, returns probability distributions for the unnoised latent pixels.0

The output of Transformer2DModel.

Xet Storage Details

Size:
4.16 kB
·
Xet hash:
d08ea5f23ac3dbec9066d8fdb5df66820fc4283efdd148f7c46484ff8f39b989

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.