import{s as Be,o as Ye,n as Qe}from"../chunks/scheduler.8c3d61f6.js";import{S as et,i as tt,g as a,s,r as u,A as ot,h as l,f as o,c as n,j as v,u as p,x as A,k as y,y as d,a as r,v as _,d as h,t as g,w as b}from"../chunks/index.da70eac4.js";import{T as Ke}from"../chunks/Tip.1d9b8c37.js";import{D as Q}from"../chunks/Docstring.28bd4ce5.js";import{C as st}from"../chunks/CodeBlock.a9c4becf.js";import{H as ye,E as nt}from"../chunks/getInferenceSnippets.cd165132.js";function rt(B){let i,P="This API is 🧪 experimental.";return{c(){i=a("p"),i.textContent=P},l(f){i=l(f,"P",{"data-svelte-h":!0}),A(i)!=="svelte-89q1io"&&(i.textContent=P)},m(f,x){r(f,i,x)},p:Qe,d(f){f&&o(i)}}}function it(B){let i,P="This API is 🧪 experimental.";return{c(){i=a("p"),i.textContent=P},l(f){i=l(f,"P",{"data-svelte-h":!0}),A(i)!=="svelte-89q1io"&&(i.textContent=P)},m(f,x){r(f,i,x)},p:Qe,d(f){f&&o(i)}}}function dt(B){let i,P,f,x,T,ae,F,Ie="SD3ControlNetModel is an implementation of ControlNet for Stable Diffusion 3.",le,k,Ve='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,j,Re="The abstract from the paper is:",fe,L,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,G,ue,z,Ue='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,I,_e,V,he,c,R,xe,Y,Ze='ControlNet model for <a href="https://huggingface.co/papers/2403.03206" rel="nofollow">Stable Diffusion 3</a>.',Me,M,X,De,ee,He=`Sets the attention processor to use <a href="https://huggingface.co/blog/reformer#2-chunked-feed-forward-layers" rel="nofollow">feed forward
chunking</a>.`,Se,D,U,we,te,qe='The <a href="/docs/diffusers/main/en/api/models/sd3_transformer2d#diffusers.SD3Transformer2DModel">SD3Transformer2DModel</a> forward method.',Ne,$,Z,Te,oe,Ee=`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.`,Fe,S,ke,w,H,je,se,Je="Sets the attention processor to use to compute attention.",Le,C,q,Ge,ne,We="Disables the fused QKV projection if enabled.",ze,N,ge,E,be,J,W,Ae,O,Pe,de,$e;return T=new ye({props:{title:"SD3ControlNetModel",local:"sd3controlnetmodel",headingTag:"h1"}}),G=new ye({props:{title:"Loading from the original format",local:"loading-from-the-original-format",headingTag:"h2"}}),I=new st({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}}),V=new ye({props:{title:"SD3ControlNetModel",local:"diffusers.SD3ControlNetModel",headingTag:"h2"}}),R=new Q({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"}}),X=new Q({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"}}),U=new Q({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#L340",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>
`}}),Z=new Q({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"}}),S=new Ke({props:{warning:!0,$$slots:{default:[rt]},$$scope:{ctx:B}}}),H=new Q({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"}}),q=new Q({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#L294"}}),N=new Ke({props:{warning:!0,$$slots:{default:[it]},$$scope:{ctx:B}}}),E=new ye({props:{title:"SD3ControlNetOutput",local:"diffusers.models.controlnets.SD3ControlNetOutput",headingTag:"h2"}}),W=new Q({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"}}),O=new nt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/controlnet_sd3.md"}}),{c(){i=a("meta"),P=s(),f=a("p"),x=s(),u(T.$$.fragment),ae=s(),F=a("p"),F.textContent=Ie,le=s(),k=a("p"),k.innerHTML=Ve,ce=s(),j=a("p"),j.textContent=Re,fe=s(),L=a("p"),L.innerHTML=Xe,me=s(),u(G.$$.fragment),ue=s(),z=a("p"),z.innerHTML=Ue,pe=s(),u(I.$$.fragment),_e=s(),u(V.$$.fragment),he=s(),c=a("div"),u(R.$$.fragment),xe=s(),Y=a("p"),Y.innerHTML=Ze,Me=s(),M=a("div"),u(X.$$.fragment),De=s(),ee=a("p"),ee.innerHTML=He,Se=s(),D=a("div"),u(U.$$.fragment),we=s(),te=a("p"),te.innerHTML=qe,Ne=s(),$=a("div"),u(Z.$$.fragment),Te=s(),oe=a("p"),oe.textContent=Ee,Fe=s(),u(S.$$.fragment),ke=s(),w=a("div"),u(H.$$.fragment),je=s(),se=a("p"),se.textContent=Je,Le=s(),C=a("div"),u(q.$$.fragment),Ge=s(),ne=a("p"),ne.textContent=We,ze=s(),u(N.$$.fragment),ge=s(),u(E.$$.fragment),be=s(),J=a("div"),u(W.$$.fragment),Ae=s(),u(O.$$.fragment),Pe=s(),de=a("p"),this.h()},l(e){const t=ot("svelte-u9bgzb",document.head);i=l(t,"META",{name:!0,content:!0}),t.forEach(o),P=n(e),f=l(e,"P",{}),v(f).forEach(o),x=n(e),p(T.$$.fragment,e),ae=n(e),F=l(e,"P",{"data-svelte-h":!0}),A(F)!=="svelte-plv1v9"&&(F.textContent=Ie),le=n(e),k=l(e,"P",{"data-svelte-h":!0}),A(k)!=="svelte-1s65p96"&&(k.innerHTML=Ve),ce=n(e),j=l(e,"P",{"data-svelte-h":!0}),A(j)!=="svelte-1cwsb16"&&(j.textContent=Re),fe=n(e),L=l(e,"P",{"data-svelte-h":!0}),A(L)!=="svelte-fbiw6t"&&(L.innerHTML=Xe),me=n(e),p(G.$$.fragment,e),ue=n(e),z=l(e,"P",{"data-svelte-h":!0}),A(z)!=="svelte-i9x6qn"&&(z.innerHTML=Ue),pe=n(e),p(I.$$.fragment,e),_e=n(e),p(V.$$.fragment,e),he=n(e),c=l(e,"DIV",{class:!0});var m=v(c);p(R.$$.fragment,m),xe=n(m),Y=l(m,"P",{"data-svelte-h":!0}),A(Y)!=="svelte-1dtgvd2"&&(Y.innerHTML=Ze),Me=n(m),M=l(m,"DIV",{class:!0});var K=v(M);p(X.$$.fragment,K),De=n(K),ee=l(K,"P",{"data-svelte-h":!0}),A(ee)!=="svelte-2m23sy"&&(ee.innerHTML=He),K.forEach(o),Se=n(m),D=l(m,"DIV",{class:!0});var Ce=v(D);p(U.$$.fragment,Ce),we=n(Ce),te=l(Ce,"P",{"data-svelte-h":!0}),A(te)!=="svelte-1fdt9lr"&&(te.innerHTML=qe),Ce.forEach(o),Ne=n(m),$=l(m,"DIV",{class:!0});var re=v($);p(Z.$$.fragment,re),Te=n(re),oe=l(re,"P",{"data-svelte-h":!0}),A(oe)!=="svelte-1254b9i"&&(oe.textContent=Ee),Fe=n(re),p(S.$$.fragment,re),re.forEach(o),ke=n(m),w=l(m,"DIV",{class:!0});var ve=v(w);p(H.$$.fragment,ve),je=n(ve),se=l(ve,"P",{"data-svelte-h":!0}),A(se)!=="svelte-1o77hl2"&&(se.textContent=Je),ve.forEach(o),Le=n(m),C=l(m,"DIV",{class:!0});var ie=v(C);p(q.$$.fragment,ie),Ge=n(ie),ne=l(ie,"P",{"data-svelte-h":!0}),A(ne)!=="svelte-1vhtc74"&&(ne.textContent=We),ze=n(ie),p(N.$$.fragment,ie),ie.forEach(o),m.forEach(o),ge=n(e),p(E.$$.fragment,e),be=n(e),J=l(e,"DIV",{class:!0});var Oe=v(J);p(W.$$.fragment,Oe),Oe.forEach(o),Ae=n(e),p(O.$$.fragment,e),Pe=n(e),de=l(e,"P",{}),v(de).forEach(o),this.h()},h(){y(i,"name","hf:doc:metadata"),y(i,"content",at),y(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(c,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(J,"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){d(document.head,i),r(e,P,t),r(e,f,t),r(e,x,t),_(T,e,t),r(e,ae,t),r(e,F,t),r(e,le,t),r(e,k,t),r(e,ce,t),r(e,j,t),r(e,fe,t),r(e,L,t),r(e,me,t),_(G,e,t),r(e,ue,t),r(e,z,t),r(e,pe,t),_(I,e,t),r(e,_e,t),_(V,e,t),r(e,he,t),r(e,c,t),_(R,c,null),d(c,xe),d(c,Y),d(c,Me),d(c,M),_(X,M,null),d(M,De),d(M,ee),d(c,Se),d(c,D),_(U,D,null),d(D,we),d(D,te),d(c,Ne),d(c,$),_(Z,$,null),d($,Te),d($,oe),d($,Fe),_(S,$,null),d(c,ke),d(c,w),_(H,w,null),d(w,je),d(w,se),d(c,Le),d(c,C),_(q,C,null),d(C,Ge),d(C,ne),d(C,ze),_(N,C,null),r(e,ge,t),_(E,e,t),r(e,be,t),r(e,J,t),_(W,J,null),r(e,Ae,t),_(O,e,t),r(e,Pe,t),r(e,de,t),$e=!0},p(e,[t]){const m={};t&2&&(m.$$scope={dirty:t,ctx:e}),S.$set(m);const K={};t&2&&(K.$$scope={dirty:t,ctx:e}),N.$set(K)},i(e){$e||(h(T.$$.fragment,e),h(G.$$.fragment,e),h(I.$$.fragment,e),h(V.$$.fragment,e),h(R.$$.fragment,e),h(X.$$.fragment,e),h(U.$$.fragment,e),h(Z.$$.fragment,e),h(S.$$.fragment,e),h(H.$$.fragment,e),h(q.$$.fragment,e),h(N.$$.fragment,e),h(E.$$.fragment,e),h(W.$$.fragment,e),h(O.$$.fragment,e),$e=!0)},o(e){g(T.$$.fragment,e),g(G.$$.fragment,e),g(I.$$.fragment,e),g(V.$$.fragment,e),g(R.$$.fragment,e),g(X.$$.fragment,e),g(U.$$.fragment,e),g(Z.$$.fragment,e),g(S.$$.fragment,e),g(H.$$.fragment,e),g(q.$$.fragment,e),g(N.$$.fragment,e),g(E.$$.fragment,e),g(W.$$.fragment,e),g(O.$$.fragment,e),$e=!1},d(e){e&&(o(P),o(f),o(x),o(ae),o(F),o(le),o(k),o(ce),o(j),o(fe),o(L),o(me),o(ue),o(z),o(pe),o(_e),o(he),o(c),o(ge),o(be),o(J),o(Ae),o(Pe),o(de)),o(i),b(T,e),b(G,e),b(I,e),b(V,e),b(R),b(X),b(U),b(Z),b(S),b(H),b(q),b(N),b(E,e),b(W),b(O,e)}}}const at='{"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 lt(B){return Ye(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ht extends et{constructor(i){super(),tt(this,i,lt,dt,Be,{})}}export{ht as component};
