import{s as le,n as fe,o as me}from"../chunks/scheduler.8c3d61f6.js";import{S as ue,i as _e,g as a,s as n,r as u,A as pe,h as d,f as s,c as r,j as S,u as _,x as k,k as J,y as f,a as t,v as p,d as h,t as g,w as A}from"../chunks/index.da70eac4.js";import{D as se}from"../chunks/Docstring.367be9ed.js";import{C as he}from"../chunks/CodeBlock.a9c4becf.js";import{H as te,E as ge}from"../chunks/getInferenceSnippets.cb466318.js";function Ae(ne){let c,q,$,V,P,X,D,re='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.',H,T,ie="The model can be loaded with the following code snippet.",R,b,z,v,j,i,F,Y,C,ae='A Transformer model for video-like data in <a href="https://github.com/PKU-YuanGroup/ConsisID" rel="nofollow">ConsisID</a>.',Q,m,y,ee,I,de="Sets the attention processor to use to compute attention.",N,x,U,l,M,oe,E,ce='The output of <a href="/docs/diffusers/main/en/api/models/transformer2d#diffusers.Transformer2DModel">Transformer2DModel</a>.',K,L,Z,G,W;return P=new te({props:{title:"ConsisIDTransformer3DModel",local:"consisidtransformer3dmodel",headingTag:"h1"}}),b=new he({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}}),v=new te({props:{title:"ConsisIDTransformer3DModel",local:"diffusers.ConsisIDTransformer3DModel",headingTag:"h2"}}),F=new se({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"}}),y=new se({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"}}),x=new te({props:{title:"Transformer2DModelOutput",local:"diffusers.models.modeling_outputs.Transformer2DModelOutput",headingTag:"h2"}}),M=new se({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"}}),L=new ge({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/consisid_transformer3d.md"}}),{c(){c=a("meta"),q=n(),$=a("p"),V=n(),u(P.$$.fragment),X=n(),D=a("p"),D.innerHTML=re,H=n(),T=a("p"),T.textContent=ie,R=n(),u(b.$$.fragment),z=n(),u(v.$$.fragment),j=n(),i=a("div"),u(F.$$.fragment),Y=n(),C=a("p"),C.innerHTML=ae,Q=n(),m=a("div"),u(y.$$.fragment),ee=n(),I=a("p"),I.textContent=de,N=n(),u(x.$$.fragment),U=n(),l=a("div"),u(M.$$.fragment),oe=n(),E=a("p"),E.innerHTML=ce,K=n(),u(L.$$.fragment),Z=n(),G=a("p"),this.h()},l(e){const o=pe("svelte-u9bgzb",document.head);c=d(o,"META",{name:!0,content:!0}),o.forEach(s),q=r(e),$=d(e,"P",{}),S($).forEach(s),V=r(e),_(P.$$.fragment,e),X=r(e),D=d(e,"P",{"data-svelte-h":!0}),k(D)!=="svelte-1842u1r"&&(D.innerHTML=re),H=r(e),T=d(e,"P",{"data-svelte-h":!0}),k(T)!=="svelte-1vuni30"&&(T.textContent=ie),R=r(e),_(b.$$.fragment,e),z=r(e),_(v.$$.fragment,e),j=r(e),i=d(e,"DIV",{class:!0});var w=S(i);_(F.$$.fragment,w),Y=r(w),C=d(w,"P",{"data-svelte-h":!0}),k(C)!=="svelte-1m59yg9"&&(C.innerHTML=ae),Q=r(w),m=d(w,"DIV",{class:!0});var O=S(m);_(y.$$.fragment,O),ee=r(O),I=d(O,"P",{"data-svelte-h":!0}),k(I)!=="svelte-1o77hl2"&&(I.textContent=de),O.forEach(s),w.forEach(s),N=r(e),_(x.$$.fragment,e),U=r(e),l=d(e,"DIV",{class:!0});var B=S(l);_(M.$$.fragment,B),oe=r(B),E=d(B,"P",{"data-svelte-h":!0}),k(E)!=="svelte-1x8c0js"&&(E.innerHTML=ce),B.forEach(s),K=r(e),_(L.$$.fragment,e),Z=r(e),G=d(e,"P",{}),S(G).forEach(s),this.h()},h(){J(c,"name","hf:doc:metadata"),J(c,"content",Pe),J(m,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(i,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(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){f(document.head,c),t(e,q,o),t(e,$,o),t(e,V,o),p(P,e,o),t(e,X,o),t(e,D,o),t(e,H,o),t(e,T,o),t(e,R,o),p(b,e,o),t(e,z,o),p(v,e,o),t(e,j,o),t(e,i,o),p(F,i,null),f(i,Y),f(i,C),f(i,Q),f(i,m),p(y,m,null),f(m,ee),f(m,I),t(e,N,o),p(x,e,o),t(e,U,o),t(e,l,o),p(M,l,null),f(l,oe),f(l,E),t(e,K,o),p(L,e,o),t(e,Z,o),t(e,G,o),W=!0},p:fe,i(e){W||(h(P.$$.fragment,e),h(b.$$.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),W=!0)},o(e){g(P.$$.fragment,e),g(b.$$.fragment,e),g(v.$$.fragment,e),g(F.$$.fragment,e),g(y.$$.fragment,e),g(x.$$.fragment,e),g(M.$$.fragment,e),g(L.$$.fragment,e),W=!1},d(e){e&&(s(q),s($),s(V),s(X),s(D),s(H),s(T),s(R),s(z),s(j),s(i),s(N),s(U),s(l),s(K),s(Z),s(G)),s(c),A(P,e),A(b,e),A(v,e),A(F),A(y),A(x,e),A(M),A(L,e)}}}const Pe='{"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 De(ne){return me(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xe extends ue{constructor(c){super(),_e(this,c,De,Ae,le,{})}}export{xe as component};
