import{s as me,n as ue,o as _e}from"../chunks/scheduler.53228c21.js";import{S as pe,i as he,e as a,s as n,c as f,h as ge,a as d,d as s,b as r,f as k,g as m,j as J,k as q,l as u,m as t,n as _,t as p,o as h,p as g}from"../chunks/index.100fac89.js";import{C as Ae}from"../chunks/CopyLLMTxtMenu.9360b11d.js";import{D as ne}from"../chunks/Docstring.22cc8849.js";import{C as Pe}from"../chunks/CodeBlock.d30a6509.js";import{H as re,E as De}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.c9001d7a.js";function Te(ie){let c,V,S,X,P,z,D,H,T,ae='A Diffusion Transformer model for 3D data from <a href="https://github.com/PKU-YuanGroup/ConsisID" rel="nofollow">ConsisID</a> was introduced in <a href="https://huggingface.co/papers/2411.17440" rel="nofollow">Identity-Preserving Text-to-Video Generation by Frequency Decomposition</a> by Peking University &amp; University of Rochester &amp; etc.',R,b,de="The model can be loaded with the following code snippet.",j,v,N,F,U,i,y,ee,I,ce='A Transformer model for video-like data in <a href="https://github.com/PKU-YuanGroup/ConsisID" rel="nofollow">ConsisID</a>.',oe,A,x,se,$,le="Sets the attention processor to use to compute attention.",K,M,Z,l,L,te,E,fe='The output of <a href="/docs/diffusers/main/en/api/models/transformer2d#diffusers.Transformer2DModel">Transformer2DModel</a>.',W,C,O,G,B;return P=new Ae({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),D=new re({props:{title:"ConsisIDTransformer3DModel",local:"consisidtransformer3dmodel",headingTag:"h1"}}),v=new Pe({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMENvbnNpc0lEVHJhbnNmb3JtZXIzRE1vZGVsJTBBJTBBdHJhbnNmb3JtZXIlMjAlM0QlMjBDb25zaXNJRFRyYW5zZm9ybWVyM0RNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyQmVzdFdpc2hZc2glMkZDb25zaXNJRC1wcmV2aWV3JTIyJTJDJTIwc3ViZm9sZGVyJTNEJTIydHJhbnNmb3JtZXIlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2KS50byglMjJjdWRhJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ConsisIDTransformer3DModel

transformer = ConsisIDTransformer3DModel.from_pretrained(<span class="hljs-string">&quot;BestWishYsh/ConsisID-preview&quot;</span>, subfolder=<span class="hljs-string">&quot;transformer&quot;</span>, torch_dtype=torch.bfloat16).to(<span class="hljs-string">&quot;cuda&quot;</span>)`,wrap:!1}}),F=new re({props:{title:"ConsisIDTransformer3DModel",local:"diffusers.ConsisIDTransformer3DModel",headingTag:"h2"}}),y=new ne({props:{name:"class diffusers.ConsisIDTransformer3DModel",anchor:"diffusers.ConsisIDTransformer3DModel",parameters:[{name:"num_attention_heads",val:": int = 30"},{name:"attention_head_dim",val:": int = 64"},{name:"in_channels",val:": int = 16"},{name:"out_channels",val:": typing.Optional[int] = 16"},{name:"flip_sin_to_cos",val:": bool = True"},{name:"freq_shift",val:": int = 0"},{name:"time_embed_dim",val:": int = 512"},{name:"text_embed_dim",val:": int = 4096"},{name:"num_layers",val:": int = 30"},{name:"dropout",val:": float = 0.0"},{name:"attention_bias",val:": bool = True"},{name:"sample_width",val:": int = 90"},{name:"sample_height",val:": int = 60"},{name:"sample_frames",val:": int = 49"},{name:"patch_size",val:": int = 2"},{name:"temporal_compression_ratio",val:": int = 4"},{name:"max_text_seq_length",val:": int = 226"},{name:"activation_fn",val:": str = 'gelu-approximate'"},{name:"timestep_activation_fn",val:": str = 'silu'"},{name:"norm_elementwise_affine",val:": bool = True"},{name:"norm_eps",val:": float = 1e-05"},{name:"spatial_interpolation_scale",val:": float = 1.875"},{name:"temporal_interpolation_scale",val:": float = 1.0"},{name:"use_rotary_positional_embeddings",val:": bool = False"},{name:"use_learned_positional_embeddings",val:": bool = False"},{name:"is_train_face",val:": bool = False"},{name:"is_kps",val:": bool = False"},{name:"cross_attn_interval",val:": int = 2"},{name:"cross_attn_dim_head",val:": int = 128"},{name:"cross_attn_num_heads",val:": int = 16"},{name:"LFE_id_dim",val:": int = 1280"},{name:"LFE_vit_dim",val:": int = 1024"},{name:"LFE_depth",val:": int = 10"},{name:"LFE_dim_head",val:": int = 64"},{name:"LFE_num_heads",val:": int = 16"},{name:"LFE_num_id_token",val:": int = 5"},{name:"LFE_num_querie",val:": int = 32"},{name:"LFE_output_dim",val:": int = 2048"},{name:"LFE_ff_mult",val:": int = 4"},{name:"LFE_num_scale",val:": int = 5"},{name:"local_face_scale",val:": float = 1.0"}],parametersDescription:[{anchor:"diffusers.ConsisIDTransformer3DModel.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, defaults to <code>30</code>) &#x2014;
The number of heads to use for multi-head attention.`,name:"num_attention_heads"},{anchor:"diffusers.ConsisIDTransformer3DModel.attention_head_dim",description:`<strong>attention_head_dim</strong> (<code>int</code>, defaults to <code>64</code>) &#x2014;
The number of channels in each head.`,name:"attention_head_dim"},{anchor:"diffusers.ConsisIDTransformer3DModel.in_channels",description:`<strong>in_channels</strong> (<code>int</code>, defaults to <code>16</code>) &#x2014;
The number of channels in the input.`,name:"in_channels"},{anchor:"diffusers.ConsisIDTransformer3DModel.out_channels",description:`<strong>out_channels</strong> (<code>int</code>, <em>optional</em>, defaults to <code>16</code>) &#x2014;
The number of channels in the output.`,name:"out_channels"},{anchor:"diffusers.ConsisIDTransformer3DModel.flip_sin_to_cos",description:`<strong>flip_sin_to_cos</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to flip the sin to cos in the time embedding.`,name:"flip_sin_to_cos"},{anchor:"diffusers.ConsisIDTransformer3DModel.time_embed_dim",description:`<strong>time_embed_dim</strong> (<code>int</code>, defaults to <code>512</code>) &#x2014;
Output dimension of timestep embeddings.`,name:"time_embed_dim"},{anchor:"diffusers.ConsisIDTransformer3DModel.text_embed_dim",description:`<strong>text_embed_dim</strong> (<code>int</code>, defaults to <code>4096</code>) &#x2014;
Input dimension of text embeddings from the text encoder.`,name:"text_embed_dim"},{anchor:"diffusers.ConsisIDTransformer3DModel.num_layers",description:`<strong>num_layers</strong> (<code>int</code>, defaults to <code>30</code>) &#x2014;
The number of layers of Transformer blocks to use.`,name:"num_layers"},{anchor:"diffusers.ConsisIDTransformer3DModel.dropout",description:`<strong>dropout</strong> (<code>float</code>, defaults to <code>0.0</code>) &#x2014;
The dropout probability to use.`,name:"dropout"},{anchor:"diffusers.ConsisIDTransformer3DModel.attention_bias",description:`<strong>attention_bias</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to use bias in the attention projection layers.`,name:"attention_bias"},{anchor:"diffusers.ConsisIDTransformer3DModel.sample_width",description:`<strong>sample_width</strong> (<code>int</code>, defaults to <code>90</code>) &#x2014;
The width of the input latents.`,name:"sample_width"},{anchor:"diffusers.ConsisIDTransformer3DModel.sample_height",description:`<strong>sample_height</strong> (<code>int</code>, defaults to <code>60</code>) &#x2014;
The height of the input latents.`,name:"sample_height"},{anchor:"diffusers.ConsisIDTransformer3DModel.sample_frames",description:`<strong>sample_frames</strong> (<code>int</code>, defaults to <code>49</code>) &#x2014;
The number of frames in the input latents. Note that this parameter was incorrectly initialized to 49
instead of 13 because ConsisID processed 13 latent frames at once in its default and recommended settings,
but cannot be changed to the correct value to ensure backwards compatibility. To create a transformer with
K latent frames, the correct value to pass here would be: ((K - 1) * temporal_compression_ratio + 1).`,name:"sample_frames"},{anchor:"diffusers.ConsisIDTransformer3DModel.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, defaults to <code>2</code>) &#x2014;
The size of the patches to use in the patch embedding layer.`,name:"patch_size"},{anchor:"diffusers.ConsisIDTransformer3DModel.temporal_compression_ratio",description:`<strong>temporal_compression_ratio</strong> (<code>int</code>, defaults to <code>4</code>) &#x2014;
The compression ratio across the temporal dimension. See documentation for <code>sample_frames</code>.`,name:"temporal_compression_ratio"},{anchor:"diffusers.ConsisIDTransformer3DModel.max_text_seq_length",description:`<strong>max_text_seq_length</strong> (<code>int</code>, defaults to <code>226</code>) &#x2014;
The maximum sequence length of the input text embeddings.`,name:"max_text_seq_length"},{anchor:"diffusers.ConsisIDTransformer3DModel.activation_fn",description:`<strong>activation_fn</strong> (<code>str</code>, defaults to <code>&quot;gelu-approximate&quot;</code>) &#x2014;
Activation function to use in feed-forward.`,name:"activation_fn"},{anchor:"diffusers.ConsisIDTransformer3DModel.timestep_activation_fn",description:`<strong>timestep_activation_fn</strong> (<code>str</code>, defaults to <code>&quot;silu&quot;</code>) &#x2014;
Activation function to use when generating the timestep embeddings.`,name:"timestep_activation_fn"},{anchor:"diffusers.ConsisIDTransformer3DModel.norm_elementwise_affine",description:`<strong>norm_elementwise_affine</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to use elementwise affine in normalization layers.`,name:"norm_elementwise_affine"},{anchor:"diffusers.ConsisIDTransformer3DModel.norm_eps",description:`<strong>norm_eps</strong> (<code>float</code>, defaults to <code>1e-5</code>) &#x2014;
The epsilon value to use in normalization layers.`,name:"norm_eps"},{anchor:"diffusers.ConsisIDTransformer3DModel.spatial_interpolation_scale",description:`<strong>spatial_interpolation_scale</strong> (<code>float</code>, defaults to <code>1.875</code>) &#x2014;
Scaling factor to apply in 3D positional embeddings across spatial dimensions.`,name:"spatial_interpolation_scale"},{anchor:"diffusers.ConsisIDTransformer3DModel.temporal_interpolation_scale",description:`<strong>temporal_interpolation_scale</strong> (<code>float</code>, defaults to <code>1.0</code>) &#x2014;
Scaling factor to apply in 3D positional embeddings across temporal dimensions.`,name:"temporal_interpolation_scale"},{anchor:"diffusers.ConsisIDTransformer3DModel.is_train_face",description:`<strong>is_train_face</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to use enable the identity-preserving module during the training process. When set to <code>True</code>, the
model will focus on identity-preserving tasks.`,name:"is_train_face"},{anchor:"diffusers.ConsisIDTransformer3DModel.is_kps",description:`<strong>is_kps</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to enable keypoint for global facial extractor. If <code>True</code>, keypoints will be in the model.`,name:"is_kps"},{anchor:"diffusers.ConsisIDTransformer3DModel.cross_attn_interval",description:`<strong>cross_attn_interval</strong> (<code>int</code>, defaults to <code>2</code>) &#x2014;
The interval between cross-attention layers in the Transformer architecture. A larger value may reduce the
frequency of cross-attention computations, which can help reduce computational overhead.`,name:"cross_attn_interval"},{anchor:"diffusers.ConsisIDTransformer3DModel.cross_attn_dim_head",description:`<strong>cross_attn_dim_head</strong> (<code>int</code>, optional, defaults to <code>128</code>) &#x2014;
The dimensionality of each attention head in the cross-attention layers of the Transformer architecture. A
larger value increases the capacity to attend to more complex patterns, but also increases memory and
computation costs.`,name:"cross_attn_dim_head"},{anchor:"diffusers.ConsisIDTransformer3DModel.cross_attn_num_heads",description:`<strong>cross_attn_num_heads</strong> (<code>int</code>, optional, defaults to <code>16</code>) &#x2014;
The number of attention heads in the cross-attention layers. More heads allow for more parallel attention
mechanisms, capturing diverse relationships between different components of the input, but can also
increase computational requirements.`,name:"cross_attn_num_heads"},{anchor:"diffusers.ConsisIDTransformer3DModel.LFE_id_dim",description:`<strong>LFE_id_dim</strong> (<code>int</code>, optional, defaults to <code>1280</code>) &#x2014;
The dimensionality of the identity vector used in the Local Facial Extractor (LFE). This vector represents
the identity features of a face, which are important for tasks like face recognition and identity
preservation across different frames.`,name:"LFE_id_dim"},{anchor:"diffusers.ConsisIDTransformer3DModel.LFE_vit_dim",description:`<strong>LFE_vit_dim</strong> (<code>int</code>, optional, defaults to <code>1024</code>) &#x2014;
The dimension of the vision transformer (ViT) output used in the Local Facial Extractor (LFE). This value
dictates the size of the transformer-generated feature vectors that will be processed for facial feature
extraction.`,name:"LFE_vit_dim"},{anchor:"diffusers.ConsisIDTransformer3DModel.LFE_depth",description:`<strong>LFE_depth</strong> (<code>int</code>, optional, defaults to <code>10</code>) &#x2014;
The number of layers in the Local Facial Extractor (LFE). Increasing the depth allows the model to capture
more complex representations of facial features, but also increases the computational load.`,name:"LFE_depth"},{anchor:"diffusers.ConsisIDTransformer3DModel.LFE_dim_head",description:`<strong>LFE_dim_head</strong> (<code>int</code>, optional, defaults to <code>64</code>) &#x2014;
The dimensionality of each attention head in the Local Facial Extractor (LFE). This parameter affects how
finely the model can process and focus on different parts of the facial features during the extraction
process.`,name:"LFE_dim_head"},{anchor:"diffusers.ConsisIDTransformer3DModel.LFE_num_heads",description:`<strong>LFE_num_heads</strong> (<code>int</code>, optional, defaults to <code>16</code>) &#x2014;
The number of attention heads in the Local Facial Extractor (LFE). More heads can improve the model&#x2019;s
ability to capture diverse facial features, but at the cost of increased computational complexity.`,name:"LFE_num_heads"},{anchor:"diffusers.ConsisIDTransformer3DModel.LFE_num_id_token",description:`<strong>LFE_num_id_token</strong> (<code>int</code>, optional, defaults to <code>5</code>) &#x2014;
The number of identity tokens used in the Local Facial Extractor (LFE). This defines how many
identity-related tokens the model will process to ensure face identity preservation during feature
extraction.`,name:"LFE_num_id_token"},{anchor:"diffusers.ConsisIDTransformer3DModel.LFE_num_querie",description:`<strong>LFE_num_querie</strong> (<code>int</code>, optional, defaults to <code>32</code>) &#x2014;
The number of query tokens used in the Local Facial Extractor (LFE). These tokens are used to capture
high-frequency face-related information that aids in accurate facial feature extraction.`,name:"LFE_num_querie"},{anchor:"diffusers.ConsisIDTransformer3DModel.LFE_output_dim",description:`<strong>LFE_output_dim</strong> (<code>int</code>, optional, defaults to <code>2048</code>) &#x2014;
The output dimension of the Local Facial Extractor (LFE). This dimension determines the size of the feature
vectors produced by the LFE module, which will be used for subsequent tasks such as face recognition or
tracking.`,name:"LFE_output_dim"},{anchor:"diffusers.ConsisIDTransformer3DModel.LFE_ff_mult",description:`<strong>LFE_ff_mult</strong> (<code>int</code>, optional, defaults to <code>4</code>) &#x2014;
The multiplication factor applied to the feed-forward network&#x2019;s hidden layer size in the Local Facial
Extractor (LFE). A higher value increases the model&#x2019;s capacity to learn more complex facial feature
transformations, but also increases the computation and memory requirements.`,name:"LFE_ff_mult"},{anchor:"diffusers.ConsisIDTransformer3DModel.LFE_num_scale",description:`<strong>LFE_num_scale</strong> (<code>int</code>, optional, defaults to <code>5</code>) &#x2014;
The number of different scales visual feature. A higher value increases the model&#x2019;s capacity to learn more
complex facial feature transformations, but also increases the computation and memory requirements.`,name:"LFE_num_scale"},{anchor:"diffusers.ConsisIDTransformer3DModel.local_face_scale",description:`<strong>local_face_scale</strong> (<code>float</code>, defaults to <code>1.0</code>) &#x2014;
A scaling factor used to adjust the importance of local facial features in the model. This can influence
how strongly the model focuses on high frequency face-related content.`,name:"local_face_scale"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/transformers/consisid_transformer_3d.py#L351"}}),x=new ne({props:{name:"set_attn_processor",anchor:"diffusers.ConsisIDTransformer3DModel.set_attn_processor",parameters:[{name:"processor",val:": typing.Union[diffusers.models.attention_processor.AttnProcessor, diffusers.models.attention_processor.CustomDiffusionAttnProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor2_0, diffusers.models.attention_processor.JointAttnProcessor2_0, diffusers.models.attention_processor.PAGJointAttnProcessor2_0, diffusers.models.attention_processor.PAGCFGJointAttnProcessor2_0, diffusers.models.attention_processor.FusedJointAttnProcessor2_0, diffusers.models.attention_processor.AllegroAttnProcessor2_0, diffusers.models.attention_processor.AuraFlowAttnProcessor2_0, diffusers.models.attention_processor.FusedAuraFlowAttnProcessor2_0, diffusers.models.attention_processor.FluxAttnProcessor2_0, diffusers.models.attention_processor.FluxAttnProcessor2_0_NPU, diffusers.models.attention_processor.FusedFluxAttnProcessor2_0, diffusers.models.attention_processor.FusedFluxAttnProcessor2_0_NPU, diffusers.models.attention_processor.CogVideoXAttnProcessor2_0, diffusers.models.attention_processor.FusedCogVideoXAttnProcessor2_0, diffusers.models.attention_processor.XFormersAttnAddedKVProcessor, diffusers.models.attention_processor.XFormersAttnProcessor, diffusers.models.attention_processor.XLAFlashAttnProcessor2_0, diffusers.models.attention_processor.AttnProcessorNPU, diffusers.models.attention_processor.AttnProcessor2_0, diffusers.models.attention_processor.MochiVaeAttnProcessor2_0, diffusers.models.attention_processor.MochiAttnProcessor2_0, diffusers.models.attention_processor.StableAudioAttnProcessor2_0, diffusers.models.attention_processor.HunyuanAttnProcessor2_0, diffusers.models.attention_processor.FusedHunyuanAttnProcessor2_0, diffusers.models.attention_processor.PAGHunyuanAttnProcessor2_0, diffusers.models.attention_processor.PAGCFGHunyuanAttnProcessor2_0, diffusers.models.attention_processor.LuminaAttnProcessor2_0, diffusers.models.attention_processor.FusedAttnProcessor2_0, diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor, diffusers.models.attention_processor.CustomDiffusionAttnProcessor2_0, diffusers.models.attention_processor.SlicedAttnProcessor, diffusers.models.attention_processor.SlicedAttnAddedKVProcessor, diffusers.models.attention_processor.SanaLinearAttnProcessor2_0, diffusers.models.attention_processor.PAGCFGSanaLinearAttnProcessor2_0, diffusers.models.attention_processor.PAGIdentitySanaLinearAttnProcessor2_0, diffusers.models.attention_processor.SanaMultiscaleLinearAttention, diffusers.models.attention_processor.SanaMultiscaleAttnProcessor2_0, diffusers.models.attention_processor.SanaMultiscaleAttentionProjection, diffusers.models.attention_processor.IPAdapterAttnProcessor, diffusers.models.attention_processor.IPAdapterAttnProcessor2_0, diffusers.models.attention_processor.IPAdapterXFormersAttnProcessor, diffusers.models.attention_processor.SD3IPAdapterJointAttnProcessor2_0, diffusers.models.attention_processor.PAGIdentitySelfAttnProcessor2_0, diffusers.models.attention_processor.PAGCFGIdentitySelfAttnProcessor2_0, diffusers.models.attention_processor.LoRAAttnProcessor, diffusers.models.attention_processor.LoRAAttnProcessor2_0, diffusers.models.attention_processor.LoRAXFormersAttnProcessor, diffusers.models.attention_processor.LoRAAttnAddedKVProcessor, typing.Dict[str, typing.Union[diffusers.models.attention_processor.AttnProcessor, diffusers.models.attention_processor.CustomDiffusionAttnProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor2_0, diffusers.models.attention_processor.JointAttnProcessor2_0, diffusers.models.attention_processor.PAGJointAttnProcessor2_0, diffusers.models.attention_processor.PAGCFGJointAttnProcessor2_0, diffusers.models.attention_processor.FusedJointAttnProcessor2_0, diffusers.models.attention_processor.AllegroAttnProcessor2_0, diffusers.models.attention_processor.AuraFlowAttnProcessor2_0, diffusers.models.attention_processor.FusedAuraFlowAttnProcessor2_0, diffusers.models.attention_processor.FluxAttnProcessor2_0, diffusers.models.attention_processor.FluxAttnProcessor2_0_NPU, diffusers.models.attention_processor.FusedFluxAttnProcessor2_0, diffusers.models.attention_processor.FusedFluxAttnProcessor2_0_NPU, diffusers.models.attention_processor.CogVideoXAttnProcessor2_0, diffusers.models.attention_processor.FusedCogVideoXAttnProcessor2_0, diffusers.models.attention_processor.XFormersAttnAddedKVProcessor, diffusers.models.attention_processor.XFormersAttnProcessor, diffusers.models.attention_processor.XLAFlashAttnProcessor2_0, diffusers.models.attention_processor.AttnProcessorNPU, diffusers.models.attention_processor.AttnProcessor2_0, diffusers.models.attention_processor.MochiVaeAttnProcessor2_0, diffusers.models.attention_processor.MochiAttnProcessor2_0, diffusers.models.attention_processor.StableAudioAttnProcessor2_0, diffusers.models.attention_processor.HunyuanAttnProcessor2_0, diffusers.models.attention_processor.FusedHunyuanAttnProcessor2_0, diffusers.models.attention_processor.PAGHunyuanAttnProcessor2_0, diffusers.models.attention_processor.PAGCFGHunyuanAttnProcessor2_0, diffusers.models.attention_processor.LuminaAttnProcessor2_0, diffusers.models.attention_processor.FusedAttnProcessor2_0, diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor, diffusers.models.attention_processor.CustomDiffusionAttnProcessor2_0, diffusers.models.attention_processor.SlicedAttnProcessor, diffusers.models.attention_processor.SlicedAttnAddedKVProcessor, diffusers.models.attention_processor.SanaLinearAttnProcessor2_0, diffusers.models.attention_processor.PAGCFGSanaLinearAttnProcessor2_0, diffusers.models.attention_processor.PAGIdentitySanaLinearAttnProcessor2_0, diffusers.models.attention_processor.SanaMultiscaleLinearAttention, diffusers.models.attention_processor.SanaMultiscaleAttnProcessor2_0, diffusers.models.attention_processor.SanaMultiscaleAttentionProjection, diffusers.models.attention_processor.IPAdapterAttnProcessor, diffusers.models.attention_processor.IPAdapterAttnProcessor2_0, diffusers.models.attention_processor.IPAdapterXFormersAttnProcessor, diffusers.models.attention_processor.SD3IPAdapterJointAttnProcessor2_0, diffusers.models.attention_processor.PAGIdentitySelfAttnProcessor2_0, diffusers.models.attention_processor.PAGCFGIdentitySelfAttnProcessor2_0, diffusers.models.attention_processor.LoRAAttnProcessor, diffusers.models.attention_processor.LoRAAttnProcessor2_0, diffusers.models.attention_processor.LoRAXFormersAttnProcessor, diffusers.models.attention_processor.LoRAAttnAddedKVProcessor]]]"}],parametersDescription:[{anchor:"diffusers.ConsisIDTransformer3DModel.set_attn_processor.processor",description:`<strong>processor</strong> (<code>dict</code> of <code>AttentionProcessor</code> or only <code>AttentionProcessor</code>) &#x2014;
The instantiated processor class or a dictionary of processor classes that will be set as the processor
for <strong>all</strong> <code>Attention</code> layers.</p>
<p>If <code>processor</code> is a dict, the key needs to define the path to the corresponding cross attention
processor. This is strongly recommended when setting trainable attention processors.`,name:"processor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/transformers/consisid_transformer_3d.py#L649"}}),M=new re({props:{title:"Transformer2DModelOutput",local:"diffusers.models.modeling_outputs.Transformer2DModelOutput",headingTag:"h2"}}),L=new ne({props:{name:"class diffusers.models.modeling_outputs.Transformer2DModelOutput",anchor:"diffusers.models.modeling_outputs.Transformer2DModelOutput",parameters:[{name:"sample",val:": torch.Tensor"}],parametersDescription:[{anchor:"diffusers.models.modeling_outputs.Transformer2DModelOutput.sample",description:`<strong>sample</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code> or <code>(batch size, num_vector_embeds - 1, num_latent_pixels)</code> if <a href="/docs/diffusers/main/en/api/models/transformer2d#diffusers.Transformer2DModel">Transformer2DModel</a> is discrete) &#x2014;
The hidden states output conditioned on the <code>encoder_hidden_states</code> input. If discrete, returns probability
distributions for the unnoised latent pixels.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_outputs.py#L21"}}),C=new De({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/consisid_transformer3d.md"}}),{c(){c=a("meta"),V=n(),S=a("p"),X=n(),f(P.$$.fragment),z=n(),f(D.$$.fragment),H=n(),T=a("p"),T.innerHTML=ae,R=n(),b=a("p"),b.textContent=de,j=n(),f(v.$$.fragment),N=n(),f(F.$$.fragment),U=n(),i=a("div"),f(y.$$.fragment),ee=n(),I=a("p"),I.innerHTML=ce,oe=n(),A=a("div"),f(x.$$.fragment),se=n(),$=a("p"),$.textContent=le,K=n(),f(M.$$.fragment),Z=n(),l=a("div"),f(L.$$.fragment),te=n(),E=a("p"),E.innerHTML=fe,W=n(),f(C.$$.fragment),O=n(),G=a("p"),this.h()},l(e){const o=ge("svelte-u9bgzb",document.head);c=d(o,"META",{name:!0,content:!0}),o.forEach(s),V=r(e),S=d(e,"P",{}),k(S).forEach(s),X=r(e),m(P.$$.fragment,e),z=r(e),m(D.$$.fragment,e),H=r(e),T=d(e,"P",{"data-svelte-h":!0}),J(T)!=="svelte-1842u1r"&&(T.innerHTML=ae),R=r(e),b=d(e,"P",{"data-svelte-h":!0}),J(b)!=="svelte-1vuni30"&&(b.textContent=de),j=r(e),m(v.$$.fragment,e),N=r(e),m(F.$$.fragment,e),U=r(e),i=d(e,"DIV",{class:!0});var w=k(i);m(y.$$.fragment,w),ee=r(w),I=d(w,"P",{"data-svelte-h":!0}),J(I)!=="svelte-1m59yg9"&&(I.innerHTML=ce),oe=r(w),A=d(w,"DIV",{class:!0});var Y=k(A);m(x.$$.fragment,Y),se=r(Y),$=d(Y,"P",{"data-svelte-h":!0}),J($)!=="svelte-1o77hl2"&&($.textContent=le),Y.forEach(s),w.forEach(s),K=r(e),m(M.$$.fragment,e),Z=r(e),l=d(e,"DIV",{class:!0});var Q=k(l);m(L.$$.fragment,Q),te=r(Q),E=d(Q,"P",{"data-svelte-h":!0}),J(E)!=="svelte-1x8c0js"&&(E.innerHTML=fe),Q.forEach(s),W=r(e),m(C.$$.fragment,e),O=r(e),G=d(e,"P",{}),k(G).forEach(s),this.h()},h(){q(c,"name","hf:doc:metadata"),q(c,"content",be),q(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),q(i,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),q(l,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,o){u(document.head,c),t(e,V,o),t(e,S,o),t(e,X,o),_(P,e,o),t(e,z,o),_(D,e,o),t(e,H,o),t(e,T,o),t(e,R,o),t(e,b,o),t(e,j,o),_(v,e,o),t(e,N,o),_(F,e,o),t(e,U,o),t(e,i,o),_(y,i,null),u(i,ee),u(i,I),u(i,oe),u(i,A),_(x,A,null),u(A,se),u(A,$),t(e,K,o),_(M,e,o),t(e,Z,o),t(e,l,o),_(L,l,null),u(l,te),u(l,E),t(e,W,o),_(C,e,o),t(e,O,o),t(e,G,o),B=!0},p:ue,i(e){B||(p(P.$$.fragment,e),p(D.$$.fragment,e),p(v.$$.fragment,e),p(F.$$.fragment,e),p(y.$$.fragment,e),p(x.$$.fragment,e),p(M.$$.fragment,e),p(L.$$.fragment,e),p(C.$$.fragment,e),B=!0)},o(e){h(P.$$.fragment,e),h(D.$$.fragment,e),h(v.$$.fragment,e),h(F.$$.fragment,e),h(y.$$.fragment,e),h(x.$$.fragment,e),h(M.$$.fragment,e),h(L.$$.fragment,e),h(C.$$.fragment,e),B=!1},d(e){e&&(s(V),s(S),s(X),s(z),s(H),s(T),s(R),s(b),s(j),s(N),s(U),s(i),s(K),s(Z),s(l),s(W),s(O),s(G)),s(c),g(P,e),g(D,e),g(v,e),g(F,e),g(y),g(x),g(M,e),g(L),g(C,e)}}}const be='{"title":"ConsisIDTransformer3DModel","local":"consisidtransformer3dmodel","sections":[{"title":"ConsisIDTransformer3DModel","local":"diffusers.ConsisIDTransformer3DModel","sections":[],"depth":2},{"title":"Transformer2DModelOutput","local":"diffusers.models.modeling_outputs.Transformer2DModelOutput","sections":[],"depth":2}],"depth":1}';function ve(ie){return _e(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ie extends pe{constructor(c){super(),he(this,c,ve,Te,me,{})}}export{Ie as component};
