import{s as eo,n as oo,o as to}from"../chunks/scheduler.53228c21.js";import{S as so,i as no,e as d,s,c as f,h as ro,a,d as o,b as n,f as C,g as m,j as g,k as b,l as r,m as i,n as u,t as p,o as _,p as h}from"../chunks/index.100fac89.js";import{C as io}from"../chunks/CopyLLMTxtMenu.fb2ec027.js";import{D as O}from"../chunks/Docstring.86a664ae.js";import{C as ao}from"../chunks/CodeBlock.d30a6509.js";import{H as Me,E as lo}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.09d4dba9.js";function co(Ve){let y,re,se,ie,x,de,S,ae,D,Re="SD3ControlNetModel is an implementation of ControlNet for Stable Diffusion 3.",le,w,Ue='The ControlNet model was introduced in <a href="https://huggingface.co/papers/2302.05543" rel="nofollow">Adding Conditional Control to Text-to-Image Diffusion Models</a> by Lvmin Zhang, Anyi Rao, Maneesh Agrawala. It provides a greater degree of control over text-to-image generation by conditioning the model on additional inputs such as edge maps, depth maps, segmentation maps, and keypoints for pose detection.',ce,N,He="The abstract from the paper is:",fe,T,Xe="<em>We present ControlNet, a neural network architecture to add spatial conditioning controls to large, pretrained text-to-image diffusion models. ControlNet locks the production-ready large diffusion models, and reuses their deep and robust encoding layers pretrained with billions of images as a strong backbone to learn a diverse set of conditional controls. The neural architecture is connected with “zero convolutions” (zero-initialized convolution layers) that progressively grow the parameters from zero and ensure that no harmful noise could affect the finetuning. We test various conditioning controls, eg, edges, depth, segmentation, human pose, etc, with Stable Diffusion, using single or multiple conditions, with or without prompts. We show that the training of ControlNets is robust with small (&lt;50k) and large (&gt;1m) datasets. Extensive results show that ControlNet may facilitate wider applications to control image diffusion models.</em>",me,F,ue,L,Ze='By default the <a href="/docs/diffusers/main/en/api/models/controlnet_sd3#diffusers.SD3ControlNetModel">SD3ControlNetModel</a> should be loaded with <a href="/docs/diffusers/main/en/api/models/overview#diffusers.ModelMixin.from_pretrained">from_pretrained()</a>.',pe,k,_e,j,he,l,z,xe,W,qe='ControlNet model for <a href="https://huggingface.co/papers/2403.03206" rel="nofollow">Stable Diffusion 3</a>.',Se,v,G,De,K,Ee=`Sets the attention processor to use <a href="https://huggingface.co/blog/reformer#2-chunked-feed-forward-layers" rel="nofollow">feed forward
chunking</a>.`,we,$,I,Ne,Q,Je='The <a href="/docs/diffusers/main/en/api/models/sd3_transformer2d#diffusers.SD3Transformer2DModel">SD3Transformer2DModel</a> forward method.',Te,A,V,Fe,B,Oe=`Enables fused QKV projections. For self-attention modules, all projection matrices (i.e., query, key, value)
are fused. For cross-attention modules, key and value projection matrices are fused.`,Le,R,We="<p>&gt; This API is 🧪 experimental.</p>",ke,M,U,je,Y,Ke="Sets the attention processor to use to compute attention.",ze,P,H,Ge,ee,Qe="Disables the fused QKV projection if enabled.",Ie,X,Be="<p>&gt; This API is 🧪 experimental.</p>",ge,Z,be,q,E,Ae,J,Pe,ne,ye;return x=new io({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),S=new Me({props:{title:"SD3ControlNetModel",local:"sd3controlnetmodel",headingTag:"h1"}}),F=new Me({props:{title:"Loading from the original format",local:"loading-from-the-original-format",headingTag:"h2"}}),k=new ao({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvbjNDb250cm9sTmV0UGlwZWxpbmUlMEFmcm9tJTIwZGlmZnVzZXJzLm1vZGVscyUyMGltcG9ydCUyMFNEM0NvbnRyb2xOZXRNb2RlbCUyQyUyMFNEM011bHRpQ29udHJvbE5ldE1vZGVsJTBBJTBBY29udHJvbG5ldCUyMCUzRCUyMFNEM0NvbnRyb2xOZXRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIySW5zdGFudFglMkZTRDMtQ29udHJvbG5ldC1DYW5ueSUyMiklMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uM0NvbnRyb2xOZXRQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLTMtbWVkaXVtLWRpZmZ1c2VycyUyMiUyQyUyMGNvbnRyb2xuZXQlM0Rjb250cm9sbmV0KQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusion3ControlNetPipeline
<span class="hljs-keyword">from</span> diffusers.models <span class="hljs-keyword">import</span> SD3ControlNetModel, SD3MultiControlNetModel

controlnet = SD3ControlNetModel.from_pretrained(<span class="hljs-string">&quot;InstantX/SD3-Controlnet-Canny&quot;</span>)
pipe = StableDiffusion3ControlNetPipeline.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-3-medium-diffusers&quot;</span>, controlnet=controlnet)`,wrap:!1}}),j=new Me({props:{title:"SD3ControlNetModel",local:"diffusers.SD3ControlNetModel",headingTag:"h2"}}),z=new O({props:{name:"class diffusers.SD3ControlNetModel",anchor:"diffusers.SD3ControlNetModel",parameters:[{name:"sample_size",val:": int = 128"},{name:"patch_size",val:": int = 2"},{name:"in_channels",val:": int = 16"},{name:"num_layers",val:": int = 18"},{name:"attention_head_dim",val:": int = 64"},{name:"num_attention_heads",val:": int = 18"},{name:"joint_attention_dim",val:": int = 4096"},{name:"caption_projection_dim",val:": int = 1152"},{name:"pooled_projection_dim",val:": int = 2048"},{name:"out_channels",val:": int = 16"},{name:"pos_embed_max_size",val:": int = 96"},{name:"extra_conditioning_channels",val:": int = 0"},{name:"dual_attention_layers",val:": typing.Tuple[int, ...] = ()"},{name:"qk_norm",val:": typing.Optional[str] = None"},{name:"pos_embed_type",val:": typing.Optional[str] = 'sincos'"},{name:"use_pos_embed",val:": bool = True"},{name:"force_zeros_for_pooled_projection",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.SD3ControlNetModel.sample_size",description:`<strong>sample_size</strong> (<code>int</code>, defaults to <code>128</code>) &#x2014;
The width/height of the latents. This is fixed during training since it is used to learn a number of
position embeddings.`,name:"sample_size"},{anchor:"diffusers.SD3ControlNetModel.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, defaults to <code>2</code>) &#x2014;
Patch size to turn the input data into small patches.`,name:"patch_size"},{anchor:"diffusers.SD3ControlNetModel.in_channels",description:`<strong>in_channels</strong> (<code>int</code>, defaults to <code>16</code>) &#x2014;
The number of latent channels in the input.`,name:"in_channels"},{anchor:"diffusers.SD3ControlNetModel.num_layers",description:`<strong>num_layers</strong> (<code>int</code>, defaults to <code>18</code>) &#x2014;
The number of layers of transformer blocks to use.`,name:"num_layers"},{anchor:"diffusers.SD3ControlNetModel.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.SD3ControlNetModel.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, defaults to <code>18</code>) &#x2014;
The number of heads to use for multi-head attention.`,name:"num_attention_heads"},{anchor:"diffusers.SD3ControlNetModel.joint_attention_dim",description:`<strong>joint_attention_dim</strong> (<code>int</code>, defaults to <code>4096</code>) &#x2014;
The embedding dimension to use for joint text-image attention.`,name:"joint_attention_dim"},{anchor:"diffusers.SD3ControlNetModel.caption_projection_dim",description:`<strong>caption_projection_dim</strong> (<code>int</code>, defaults to <code>1152</code>) &#x2014;
The embedding dimension of caption embeddings.`,name:"caption_projection_dim"},{anchor:"diffusers.SD3ControlNetModel.pooled_projection_dim",description:`<strong>pooled_projection_dim</strong> (<code>int</code>, defaults to <code>2048</code>) &#x2014;
The embedding dimension of pooled text projections.`,name:"pooled_projection_dim"},{anchor:"diffusers.SD3ControlNetModel.out_channels",description:`<strong>out_channels</strong> (<code>int</code>, defaults to <code>16</code>) &#x2014;
The number of latent channels in the output.`,name:"out_channels"},{anchor:"diffusers.SD3ControlNetModel.pos_embed_max_size",description:`<strong>pos_embed_max_size</strong> (<code>int</code>, defaults to <code>96</code>) &#x2014;
The maximum latent height/width of positional embeddings.`,name:"pos_embed_max_size"},{anchor:"diffusers.SD3ControlNetModel.extra_conditioning_channels",description:`<strong>extra_conditioning_channels</strong> (<code>int</code>, defaults to <code>0</code>) &#x2014;
The number of extra channels to use for conditioning for patch embedding.`,name:"extra_conditioning_channels"},{anchor:"diffusers.SD3ControlNetModel.dual_attention_layers",description:`<strong>dual_attention_layers</strong> (<code>Tuple[int, ...]</code>, defaults to <code>()</code>) &#x2014;
The number of dual-stream transformer blocks to use.`,name:"dual_attention_layers"},{anchor:"diffusers.SD3ControlNetModel.qk_norm",description:`<strong>qk_norm</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The normalization to use for query and key in the attention layer. If <code>None</code>, no normalization is used.`,name:"qk_norm"},{anchor:"diffusers.SD3ControlNetModel.pos_embed_type",description:`<strong>pos_embed_type</strong> (<code>str</code>, defaults to <code>&quot;sincos&quot;</code>) &#x2014;
The type of positional embedding to use. Choose between <code>&quot;sincos&quot;</code> and <code>None</code>.`,name:"pos_embed_type"},{anchor:"diffusers.SD3ControlNetModel.use_pos_embed",description:`<strong>use_pos_embed</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to use positional embeddings.`,name:"use_pos_embed"},{anchor:"diffusers.SD3ControlNetModel.force_zeros_for_pooled_projection",description:`<strong>force_zeros_for_pooled_projection</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to force zeros for pooled projection embeddings. This is handled in the pipelines by reading the
config value of the ControlNet model.`,name:"force_zeros_for_pooled_projection"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/controlnets/controlnet_sd3.py#L42"}}),G=new O({props:{name:"enable_forward_chunking",anchor:"diffusers.SD3ControlNetModel.enable_forward_chunking",parameters:[{name:"chunk_size",val:": typing.Optional[int] = None"},{name:"dim",val:": int = 0"}],parametersDescription:[{anchor:"diffusers.SD3ControlNetModel.enable_forward_chunking.chunk_size",description:`<strong>chunk_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The chunk size of the feed-forward layers. If not specified, will run feed-forward layer individually
over each tensor of dim=<code>dim</code>.`,name:"chunk_size"},{anchor:"diffusers.SD3ControlNetModel.enable_forward_chunking.dim",description:`<strong>dim</strong> (<code>int</code>, <em>optional</em>, defaults to <code>0</code>) &#x2014;
The dimension over which the feed-forward computation should be chunked. Choose between dim=0 (batch)
or dim=1 (sequence length).`,name:"dim"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/controlnets/controlnet_sd3.py#L178"}}),I=new O({props:{name:"forward",anchor:"diffusers.SD3ControlNetModel.forward",parameters:[{name:"hidden_states",val:": Tensor"},{name:"controlnet_cond",val:": Tensor"},{name:"conditioning_scale",val:": float = 1.0"},{name:"encoder_hidden_states",val:": Tensor = None"},{name:"pooled_projections",val:": Tensor = None"},{name:"timestep",val:": LongTensor = None"},{name:"joint_attention_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.SD3ControlNetModel.forward.hidden_states",description:`<strong>hidden_states</strong> (<code>torch.Tensor</code> of shape <code>(batch size, channel, height, width)</code>) &#x2014;
Input <code>hidden_states</code>.`,name:"hidden_states"},{anchor:"diffusers.SD3ControlNetModel.forward.controlnet_cond",description:`<strong>controlnet_cond</strong> (<code>torch.Tensor</code>) &#x2014;
The conditional input tensor of shape <code>(batch_size, sequence_length, hidden_size)</code>.`,name:"controlnet_cond"},{anchor:"diffusers.SD3ControlNetModel.forward.conditioning_scale",description:`<strong>conditioning_scale</strong> (<code>float</code>, defaults to <code>1.0</code>) &#x2014;
The scale factor for ControlNet outputs.`,name:"conditioning_scale"},{anchor:"diffusers.SD3ControlNetModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong> (<code>torch.Tensor</code> of shape <code>(batch size, sequence_len, embed_dims)</code>) &#x2014;
Conditional embeddings (embeddings computed from the input conditions such as prompts) to use.`,name:"encoder_hidden_states"},{anchor:"diffusers.SD3ControlNetModel.forward.pooled_projections",description:`<strong>pooled_projections</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, projection_dim)</code>) &#x2014; Embeddings projected
from the embeddings of input conditions.`,name:"pooled_projections"},{anchor:"diffusers.SD3ControlNetModel.forward.timestep",description:`<strong>timestep</strong> ( <code>torch.LongTensor</code>) &#x2014;
Used to indicate denoising step.`,name:"timestep"},{anchor:"diffusers.SD3ControlNetModel.forward.joint_attention_kwargs",description:`<strong>joint_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined under
<code>self.processor</code> in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"joint_attention_kwargs"},{anchor:"diffusers.SD3ControlNetModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <code>~models.transformer_2d.Transformer2DModelOutput</code> instead of a plain
tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/controlnets/controlnet_sd3.py#L332",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is True, an <code>~models.transformer_2d.Transformer2DModelOutput</code> is returned, otherwise a
<code>tuple</code> where the first element is the sample tensor.</p>
`}}),V=new O({props:{name:"fuse_qkv_projections",anchor:"diffusers.SD3ControlNetModel.fuse_qkv_projections",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/controlnets/controlnet_sd3.py#L268"}}),U=new O({props:{name:"set_attn_processor",anchor:"diffusers.SD3ControlNetModel.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.SD3ControlNetModel.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/controlnets/controlnet_sd3.py#L233"}}),H=new O({props:{name:"unfuse_qkv_projections",anchor:"diffusers.SD3ControlNetModel.unfuse_qkv_projections",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/controlnets/controlnet_sd3.py#L290"}}),Z=new Me({props:{title:"SD3ControlNetOutput",local:"diffusers.models.controlnets.SD3ControlNetOutput",headingTag:"h2"}}),E=new O({props:{name:"class diffusers.models.controlnets.SD3ControlNetOutput",anchor:"diffusers.models.controlnets.SD3ControlNetOutput",parameters:[{name:"controlnet_block_samples",val:": typing.Tuple[torch.Tensor]"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/controlnets/controlnet_sd3.py#L38"}}),J=new lo({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/controlnet_sd3.md"}}),{c(){y=d("meta"),re=s(),se=d("p"),ie=s(),f(x.$$.fragment),de=s(),f(S.$$.fragment),ae=s(),D=d("p"),D.textContent=Re,le=s(),w=d("p"),w.innerHTML=Ue,ce=s(),N=d("p"),N.textContent=He,fe=s(),T=d("p"),T.innerHTML=Xe,me=s(),f(F.$$.fragment),ue=s(),L=d("p"),L.innerHTML=Ze,pe=s(),f(k.$$.fragment),_e=s(),f(j.$$.fragment),he=s(),l=d("div"),f(z.$$.fragment),xe=s(),W=d("p"),W.innerHTML=qe,Se=s(),v=d("div"),f(G.$$.fragment),De=s(),K=d("p"),K.innerHTML=Ee,we=s(),$=d("div"),f(I.$$.fragment),Ne=s(),Q=d("p"),Q.innerHTML=Je,Te=s(),A=d("div"),f(V.$$.fragment),Fe=s(),B=d("p"),B.textContent=Oe,Le=s(),R=d("blockquote"),R.innerHTML=We,ke=s(),M=d("div"),f(U.$$.fragment),je=s(),Y=d("p"),Y.textContent=Ke,ze=s(),P=d("div"),f(H.$$.fragment),Ge=s(),ee=d("p"),ee.textContent=Qe,Ie=s(),X=d("blockquote"),X.innerHTML=Be,ge=s(),f(Z.$$.fragment),be=s(),q=d("div"),f(E.$$.fragment),Ae=s(),f(J.$$.fragment),Pe=s(),ne=d("p"),this.h()},l(e){const t=ro("svelte-u9bgzb",document.head);y=a(t,"META",{name:!0,content:!0}),t.forEach(o),re=n(e),se=a(e,"P",{}),C(se).forEach(o),ie=n(e),m(x.$$.fragment,e),de=n(e),m(S.$$.fragment,e),ae=n(e),D=a(e,"P",{"data-svelte-h":!0}),g(D)!=="svelte-plv1v9"&&(D.textContent=Re),le=n(e),w=a(e,"P",{"data-svelte-h":!0}),g(w)!=="svelte-1s65p96"&&(w.innerHTML=Ue),ce=n(e),N=a(e,"P",{"data-svelte-h":!0}),g(N)!=="svelte-1cwsb16"&&(N.textContent=He),fe=n(e),T=a(e,"P",{"data-svelte-h":!0}),g(T)!=="svelte-fbiw6t"&&(T.innerHTML=Xe),me=n(e),m(F.$$.fragment,e),ue=n(e),L=a(e,"P",{"data-svelte-h":!0}),g(L)!=="svelte-i9x6qn"&&(L.innerHTML=Ze),pe=n(e),m(k.$$.fragment,e),_e=n(e),m(j.$$.fragment,e),he=n(e),l=a(e,"DIV",{class:!0});var c=C(l);m(z.$$.fragment,c),xe=n(c),W=a(c,"P",{"data-svelte-h":!0}),g(W)!=="svelte-1dtgvd2"&&(W.innerHTML=qe),Se=n(c),v=a(c,"DIV",{class:!0});var Ce=C(v);m(G.$$.fragment,Ce),De=n(Ce),K=a(Ce,"P",{"data-svelte-h":!0}),g(K)!=="svelte-2m23sy"&&(K.innerHTML=Ee),Ce.forEach(o),we=n(c),$=a(c,"DIV",{class:!0});var ve=C($);m(I.$$.fragment,ve),Ne=n(ve),Q=a(ve,"P",{"data-svelte-h":!0}),g(Q)!=="svelte-1fdt9lr"&&(Q.innerHTML=Je),ve.forEach(o),Te=n(c),A=a(c,"DIV",{class:!0});var oe=C(A);m(V.$$.fragment,oe),Fe=n(oe),B=a(oe,"P",{"data-svelte-h":!0}),g(B)!=="svelte-1254b9i"&&(B.textContent=Oe),Le=n(oe),R=a(oe,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),g(R)!=="svelte-6y4o4y"&&(R.innerHTML=We),oe.forEach(o),ke=n(c),M=a(c,"DIV",{class:!0});var $e=C(M);m(U.$$.fragment,$e),je=n($e),Y=a($e,"P",{"data-svelte-h":!0}),g(Y)!=="svelte-1o77hl2"&&(Y.textContent=Ke),$e.forEach(o),ze=n(c),P=a(c,"DIV",{class:!0});var te=C(P);m(H.$$.fragment,te),Ge=n(te),ee=a(te,"P",{"data-svelte-h":!0}),g(ee)!=="svelte-1vhtc74"&&(ee.textContent=Qe),Ie=n(te),X=a(te,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),g(X)!=="svelte-6y4o4y"&&(X.innerHTML=Be),te.forEach(o),c.forEach(o),ge=n(e),m(Z.$$.fragment,e),be=n(e),q=a(e,"DIV",{class:!0});var Ye=C(q);m(E.$$.fragment,Ye),Ye.forEach(o),Ae=n(e),m(J.$$.fragment,e),Pe=n(e),ne=a(e,"P",{}),C(ne).forEach(o),this.h()},h(){b(y,"name","hf:doc:metadata"),b(y,"content",fo),b(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(R,"class","warning"),b(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(X,"class","warning"),b(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(l,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(q,"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,t){r(document.head,y),i(e,re,t),i(e,se,t),i(e,ie,t),u(x,e,t),i(e,de,t),u(S,e,t),i(e,ae,t),i(e,D,t),i(e,le,t),i(e,w,t),i(e,ce,t),i(e,N,t),i(e,fe,t),i(e,T,t),i(e,me,t),u(F,e,t),i(e,ue,t),i(e,L,t),i(e,pe,t),u(k,e,t),i(e,_e,t),u(j,e,t),i(e,he,t),i(e,l,t),u(z,l,null),r(l,xe),r(l,W),r(l,Se),r(l,v),u(G,v,null),r(v,De),r(v,K),r(l,we),r(l,$),u(I,$,null),r($,Ne),r($,Q),r(l,Te),r(l,A),u(V,A,null),r(A,Fe),r(A,B),r(A,Le),r(A,R),r(l,ke),r(l,M),u(U,M,null),r(M,je),r(M,Y),r(l,ze),r(l,P),u(H,P,null),r(P,Ge),r(P,ee),r(P,Ie),r(P,X),i(e,ge,t),u(Z,e,t),i(e,be,t),i(e,q,t),u(E,q,null),i(e,Ae,t),u(J,e,t),i(e,Pe,t),i(e,ne,t),ye=!0},p:oo,i(e){ye||(p(x.$$.fragment,e),p(S.$$.fragment,e),p(F.$$.fragment,e),p(k.$$.fragment,e),p(j.$$.fragment,e),p(z.$$.fragment,e),p(G.$$.fragment,e),p(I.$$.fragment,e),p(V.$$.fragment,e),p(U.$$.fragment,e),p(H.$$.fragment,e),p(Z.$$.fragment,e),p(E.$$.fragment,e),p(J.$$.fragment,e),ye=!0)},o(e){_(x.$$.fragment,e),_(S.$$.fragment,e),_(F.$$.fragment,e),_(k.$$.fragment,e),_(j.$$.fragment,e),_(z.$$.fragment,e),_(G.$$.fragment,e),_(I.$$.fragment,e),_(V.$$.fragment,e),_(U.$$.fragment,e),_(H.$$.fragment,e),_(Z.$$.fragment,e),_(E.$$.fragment,e),_(J.$$.fragment,e),ye=!1},d(e){e&&(o(re),o(se),o(ie),o(de),o(ae),o(D),o(le),o(w),o(ce),o(N),o(fe),o(T),o(me),o(ue),o(L),o(pe),o(_e),o(he),o(l),o(ge),o(be),o(q),o(Ae),o(Pe),o(ne)),o(y),h(x,e),h(S,e),h(F,e),h(k,e),h(j,e),h(z),h(G),h(I),h(V),h(U),h(H),h(Z,e),h(E),h(J,e)}}}const fo='{"title":"SD3ControlNetModel","local":"sd3controlnetmodel","sections":[{"title":"Loading from the original format","local":"loading-from-the-original-format","sections":[],"depth":2},{"title":"SD3ControlNetModel","local":"diffusers.SD3ControlNetModel","sections":[],"depth":2},{"title":"SD3ControlNetOutput","local":"diffusers.models.controlnets.SD3ControlNetOutput","sections":[],"depth":2}],"depth":1}';function mo(Ve){return to(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ao extends so{constructor(y){super(),no(this,y,mo,co,eo,{})}}export{Ao as component};
