import{s as Be,n as We,o as Ae}from"../chunks/scheduler.53228c21.js";import{S as Oe,i as Pe,e as d,s as n,c as m,h as Ee,a,d as t,b as i,f as O,g as p,j as b,k as P,l as s,m as r,n as u,t as f,o as _,p as h}from"../chunks/index.100fac89.js";import{C as Ze}from"../chunks/CopyLLMTxtMenu.20a72e0e.js";import{D as X}from"../chunks/Docstring.49101787.js";import{C as ze}from"../chunks/CodeBlock.d30a6509.js";import{H as we,E as Je}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.4d82655d.js";function Re(xe){let y,S,G,Q,w,Y,x,K,M,Me="ControlNetUnionModel is an implementation of ControlNet for Stable Diffusion XL.",ee,U,Ue='The ControlNet model was introduced in <a href="https://github.com/xinsir6/ControlNetPlus" rel="nofollow">ControlNetPlus</a> by xinsir6. It supports multiple conditioning inputs without increasing computation.',oe,T,Te="<em>We design a new architecture that can support 10+ control types in condition text-to-image generation and can generate high resolution images visually comparable with midjourney. The network is based on the original ControlNet architecture, we propose two new modules to: 1 Extend the original ControlNet to support different image conditions using the same network parameter. 2 Support multiple conditions input without increasing computation offload, which is especially important for designers who want to edit image in detail, different conditions use the same condition encoder, without adding extra computations or parameters.</em>",te,$,ne,k,$e='By default the <a href="/docs/diffusers/main/en/api/models/controlnet_union#diffusers.ControlNetUnionModel">ControlNetUnionModel</a> should be loaded with <a href="/docs/diffusers/main/en/api/models/overview#diffusers.ModelMixin.from_pretrained">from_pretrained()</a>.',ie,D,se,q,re,l,L,ue,E,ke="A ControlNetUnion model.",fe,C,j,_e,Z,De='The <a href="/docs/diffusers/main/en/api/models/controlnet_union#diffusers.ControlNetUnionModel">ControlNetUnionModel</a> forward method.',he,v,I,ge,z,qe='Instantiate a <a href="/docs/diffusers/main/en/api/models/controlnet_union#diffusers.ControlNetUnionModel">ControlNetUnionModel</a> from <a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>.',be,g,B,ye,J,Le="Enable sliced attention computation.",Ce,R,je=`When this option is enabled, the attention module splits the input tensor in slices to compute attention in
several steps. This is useful for saving some memory in exchange for a small decrease in speed.`,ve,N,W,Ne,F,Ie="Disables custom attention processors and sets the default attention implementation.",de,A,ae,V,le;return w=new Ze({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),x=new we({props:{title:"ControlNetUnionModel",local:"controlnetunionmodel",headingTag:"h1"}}),$=new we({props:{title:"Loading",local:"loading",headingTag:"h2"}}),D=new ze({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblhMQ29udHJvbE5ldFVuaW9uUGlwZWxpbmUlMkMlMjBDb250cm9sTmV0VW5pb25Nb2RlbCUwQSUwQWNvbnRyb2xuZXQlMjAlM0QlMjBDb250cm9sTmV0VW5pb25Nb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyeGluc2lyJTJGY29udHJvbG5ldC11bmlvbi1zZHhsLTEuMCUyMiklMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uWExDb250cm9sTmV0VW5pb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwY29udHJvbG5ldCUzRGNvbnRyb2xuZXQp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionXLControlNetUnionPipeline, ControlNetUnionModel

controlnet = ControlNetUnionModel.from_pretrained(<span class="hljs-string">&quot;xinsir/controlnet-union-sdxl-1.0&quot;</span>)
pipe = StableDiffusionXLControlNetUnionPipeline.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>, controlnet=controlnet)`,wrap:!1}}),q=new we({props:{title:"ControlNetUnionModel",local:"diffusers.ControlNetUnionModel",headingTag:"h2"}}),L=new X({props:{name:"class diffusers.ControlNetUnionModel",anchor:"diffusers.ControlNetUnionModel",parameters:[{name:"in_channels",val:": int = 4"},{name:"conditioning_channels",val:": int = 3"},{name:"flip_sin_to_cos",val:": bool = True"},{name:"freq_shift",val:": int = 0"},{name:"down_block_types",val:": typing.Tuple[str, ...] = ('CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'DownBlock2D')"},{name:"only_cross_attention",val:": typing.Union[bool, typing.Tuple[bool]] = False"},{name:"block_out_channels",val:": typing.Tuple[int, ...] = (320, 640, 1280, 1280)"},{name:"layers_per_block",val:": int = 2"},{name:"downsample_padding",val:": int = 1"},{name:"mid_block_scale_factor",val:": float = 1"},{name:"act_fn",val:": str = 'silu'"},{name:"norm_num_groups",val:": typing.Optional[int] = 32"},{name:"norm_eps",val:": float = 1e-05"},{name:"cross_attention_dim",val:": int = 1280"},{name:"transformer_layers_per_block",val:": typing.Union[int, typing.Tuple[int, ...]] = 1"},{name:"encoder_hid_dim",val:": typing.Optional[int] = None"},{name:"encoder_hid_dim_type",val:": typing.Optional[str] = None"},{name:"attention_head_dim",val:": typing.Union[int, typing.Tuple[int, ...]] = 8"},{name:"num_attention_heads",val:": typing.Union[int, typing.Tuple[int, ...], NoneType] = None"},{name:"use_linear_projection",val:": bool = False"},{name:"class_embed_type",val:": typing.Optional[str] = None"},{name:"addition_embed_type",val:": typing.Optional[str] = None"},{name:"addition_time_embed_dim",val:": typing.Optional[int] = None"},{name:"num_class_embeds",val:": typing.Optional[int] = None"},{name:"upcast_attention",val:": bool = False"},{name:"resnet_time_scale_shift",val:": str = 'default'"},{name:"projection_class_embeddings_input_dim",val:": typing.Optional[int] = None"},{name:"controlnet_conditioning_channel_order",val:": str = 'rgb'"},{name:"conditioning_embedding_out_channels",val:": typing.Optional[typing.Tuple[int, ...]] = (48, 96, 192, 384)"},{name:"global_pool_conditions",val:": bool = False"},{name:"addition_embed_type_num_heads",val:": int = 64"},{name:"num_control_type",val:": int = 6"},{name:"num_trans_channel",val:": int = 320"},{name:"num_trans_head",val:": int = 8"},{name:"num_trans_layer",val:": int = 1"},{name:"num_proj_channel",val:": int = 320"}],parametersDescription:[{anchor:"diffusers.ControlNetUnionModel.in_channels",description:`<strong>in_channels</strong> (<code>int</code>, defaults to 4) &#x2014;
The number of channels in the input sample.`,name:"in_channels"},{anchor:"diffusers.ControlNetUnionModel.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.ControlNetUnionModel.freq_shift",description:`<strong>freq_shift</strong> (<code>int</code>, defaults to 0) &#x2014;
The frequency shift to apply to the time embedding.`,name:"freq_shift"},{anchor:"diffusers.ControlNetUnionModel.down_block_types",description:`<strong>down_block_types</strong> (<code>tuple[str]</code>, defaults to <code>(&quot;CrossAttnDownBlock2D&quot;, &quot;CrossAttnDownBlock2D&quot;, &quot;CrossAttnDownBlock2D&quot;, &quot;DownBlock2D&quot;)</code>) &#x2014;
The tuple of downsample blocks to use.`,name:"down_block_types"},{anchor:"diffusers.ControlNetUnionModel.only_cross_attention",description:"<strong>only_cross_attention</strong> (<code>Union[bool, Tuple[bool]]</code>, defaults to <code>False</code>) &#x2014;",name:"only_cross_attention"},{anchor:"diffusers.ControlNetUnionModel.block_out_channels",description:`<strong>block_out_channels</strong> (<code>tuple[int]</code>, defaults to <code>(320, 640, 1280, 1280)</code>) &#x2014;
The tuple of output channels for each block.`,name:"block_out_channels"},{anchor:"diffusers.ControlNetUnionModel.layers_per_block",description:`<strong>layers_per_block</strong> (<code>int</code>, defaults to 2) &#x2014;
The number of layers per block.`,name:"layers_per_block"},{anchor:"diffusers.ControlNetUnionModel.downsample_padding",description:`<strong>downsample_padding</strong> (<code>int</code>, defaults to 1) &#x2014;
The padding to use for the downsampling convolution.`,name:"downsample_padding"},{anchor:"diffusers.ControlNetUnionModel.mid_block_scale_factor",description:`<strong>mid_block_scale_factor</strong> (<code>float</code>, defaults to 1) &#x2014;
The scale factor to use for the mid block.`,name:"mid_block_scale_factor"},{anchor:"diffusers.ControlNetUnionModel.act_fn",description:`<strong>act_fn</strong> (<code>str</code>, defaults to &#x201C;silu&#x201D;) &#x2014;
The activation function to use.`,name:"act_fn"},{anchor:"diffusers.ControlNetUnionModel.norm_num_groups",description:`<strong>norm_num_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The number of groups to use for the normalization. If None, normalization and activation layers is skipped
in post-processing.`,name:"norm_num_groups"},{anchor:"diffusers.ControlNetUnionModel.norm_eps",description:`<strong>norm_eps</strong> (<code>float</code>, defaults to 1e-5) &#x2014;
The epsilon to use for the normalization.`,name:"norm_eps"},{anchor:"diffusers.ControlNetUnionModel.cross_attention_dim",description:`<strong>cross_attention_dim</strong> (<code>int</code>, defaults to 1280) &#x2014;
The dimension of the cross attention features.`,name:"cross_attention_dim"},{anchor:"diffusers.ControlNetUnionModel.transformer_layers_per_block",description:`<strong>transformer_layers_per_block</strong> (<code>int</code> or <code>Tuple[int]</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of transformer blocks of type <code>BasicTransformerBlock</code>. Only relevant for
<code>~models.unet_2d_blocks.CrossAttnDownBlock2D</code>, <code>~models.unet_2d_blocks.CrossAttnUpBlock2D</code>,
<code>~models.unet_2d_blocks.UNetMidBlock2DCrossAttn</code>.`,name:"transformer_layers_per_block"},{anchor:"diffusers.ControlNetUnionModel.encoder_hid_dim",description:`<strong>encoder_hid_dim</strong> (<code>int</code>, <em>optional</em>, defaults to None) &#x2014;
If <code>encoder_hid_dim_type</code> is defined, <code>encoder_hidden_states</code> will be projected from <code>encoder_hid_dim</code>
dimension to <code>cross_attention_dim</code>.`,name:"encoder_hid_dim"},{anchor:"diffusers.ControlNetUnionModel.encoder_hid_dim_type",description:`<strong>encoder_hid_dim_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If given, the <code>encoder_hidden_states</code> and potentially other embeddings are down-projected to text
embeddings of dimension <code>cross_attention</code> according to <code>encoder_hid_dim_type</code>.`,name:"encoder_hid_dim_type"},{anchor:"diffusers.ControlNetUnionModel.attention_head_dim",description:`<strong>attention_head_dim</strong> (<code>Union[int, Tuple[int]]</code>, defaults to 8) &#x2014;
The dimension of the attention heads.`,name:"attention_head_dim"},{anchor:"diffusers.ControlNetUnionModel.use_linear_projection",description:"<strong>use_linear_projection</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;",name:"use_linear_projection"},{anchor:"diffusers.ControlNetUnionModel.class_embed_type",description:`<strong>class_embed_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The type of class embedding to use which is ultimately summed with the time embeddings. Choose from None,
<code>&quot;timestep&quot;</code>, <code>&quot;identity&quot;</code>, <code>&quot;projection&quot;</code>, or <code>&quot;simple_projection&quot;</code>.`,name:"class_embed_type"},{anchor:"diffusers.ControlNetUnionModel.addition_embed_type",description:`<strong>addition_embed_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Configures an optional embedding which will be summed with the time embeddings. Choose from <code>None</code> or
&#x201C;text&#x201D;. &#x201C;text&#x201D; will use the <code>TextTimeEmbedding</code> layer.`,name:"addition_embed_type"},{anchor:"diffusers.ControlNetUnionModel.num_class_embeds",description:`<strong>num_class_embeds</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Input dimension of the learnable embedding matrix to be projected to <code>time_embed_dim</code>, when performing
class conditioning with <code>class_embed_type</code> equal to <code>None</code>.`,name:"num_class_embeds"},{anchor:"diffusers.ControlNetUnionModel.upcast_attention",description:"<strong>upcast_attention</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;",name:"upcast_attention"},{anchor:"diffusers.ControlNetUnionModel.resnet_time_scale_shift",description:`<strong>resnet_time_scale_shift</strong> (<code>str</code>, defaults to <code>&quot;default&quot;</code>) &#x2014;
Time scale shift config for ResNet blocks (see <code>ResnetBlock2D</code>). Choose from <code>default</code> or <code>scale_shift</code>.`,name:"resnet_time_scale_shift"},{anchor:"diffusers.ControlNetUnionModel.projection_class_embeddings_input_dim",description:`<strong>projection_class_embeddings_input_dim</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The dimension of the <code>class_labels</code> input when <code>class_embed_type=&quot;projection&quot;</code>. Required when
<code>class_embed_type=&quot;projection&quot;</code>.`,name:"projection_class_embeddings_input_dim"},{anchor:"diffusers.ControlNetUnionModel.controlnet_conditioning_channel_order",description:`<strong>controlnet_conditioning_channel_order</strong> (<code>str</code>, defaults to <code>&quot;rgb&quot;</code>) &#x2014;
The channel order of conditional image. Will convert to <code>rgb</code> if it&#x2019;s <code>bgr</code>.`,name:"controlnet_conditioning_channel_order"},{anchor:"diffusers.ControlNetUnionModel.conditioning_embedding_out_channels",description:`<strong>conditioning_embedding_out_channels</strong> (<code>tuple[int]</code>, <em>optional</em>, defaults to <code>(48, 96, 192, 384)</code>) &#x2014;
The tuple of output channel for each block in the <code>conditioning_embedding</code> layer.`,name:"conditioning_embedding_out_channels"},{anchor:"diffusers.ControlNetUnionModel.global_pool_conditions",description:"<strong>global_pool_conditions</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;",name:"global_pool_conditions"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/controlnets/controlnet_union.py#L84"}}),j=new X({props:{name:"forward",anchor:"diffusers.ControlNetUnionModel.forward",parameters:[{name:"sample",val:": Tensor"},{name:"timestep",val:": typing.Union[torch.Tensor, float, int]"},{name:"encoder_hidden_states",val:": Tensor"},{name:"controlnet_cond",val:": typing.List[torch.Tensor]"},{name:"control_type",val:": Tensor"},{name:"control_type_idx",val:": typing.List[int]"},{name:"conditioning_scale",val:": typing.Union[float, typing.List[float]] = 1.0"},{name:"class_labels",val:": typing.Optional[torch.Tensor] = None"},{name:"timestep_cond",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"added_cond_kwargs",val:": typing.Optional[typing.Dict[str, torch.Tensor]] = None"},{name:"cross_attention_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"from_multi",val:": bool = False"},{name:"guess_mode",val:": bool = False"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.ControlNetUnionModel.forward.sample",description:`<strong>sample</strong> (<code>torch.Tensor</code>) &#x2014;
The noisy input tensor.`,name:"sample"},{anchor:"diffusers.ControlNetUnionModel.forward.timestep",description:`<strong>timestep</strong> (<code>Union[torch.Tensor, float, int]</code>) &#x2014;
The number of timesteps to denoise an input.`,name:"timestep"},{anchor:"diffusers.ControlNetUnionModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong> (<code>torch.Tensor</code>) &#x2014;
The encoder hidden states.`,name:"encoder_hidden_states"},{anchor:"diffusers.ControlNetUnionModel.forward.controlnet_cond",description:`<strong>controlnet_cond</strong> (<code>List[torch.Tensor]</code>) &#x2014;
The conditional input tensors.`,name:"controlnet_cond"},{anchor:"diffusers.ControlNetUnionModel.forward.control_type",description:`<strong>control_type</strong> (<code>torch.Tensor</code>) &#x2014;
A tensor of shape <code>(batch, num_control_type)</code> with values <code>0</code> or <code>1</code> depending on whether the control
type is used.`,name:"control_type"},{anchor:"diffusers.ControlNetUnionModel.forward.control_type_idx",description:`<strong>control_type_idx</strong> (<code>List[int]</code>) &#x2014;
The indices of <code>control_type</code>.`,name:"control_type_idx"},{anchor:"diffusers.ControlNetUnionModel.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.ControlNetUnionModel.forward.class_labels",description:`<strong>class_labels</strong> (<code>torch.Tensor</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Optional class labels for conditioning. Their embeddings will be summed with the timestep embeddings.`,name:"class_labels"},{anchor:"diffusers.ControlNetUnionModel.forward.timestep_cond",description:`<strong>timestep_cond</strong> (<code>torch.Tensor</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Additional conditional embeddings for timestep. If provided, the embeddings will be summed with the
timestep_embedding passed through the <code>self.time_embedding</code> layer to obtain the final timestep
embeddings.`,name:"timestep_cond"},{anchor:"diffusers.ControlNetUnionModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
An attention mask of shape <code>(batch, key_tokens)</code> is applied to <code>encoder_hidden_states</code>. If <code>1</code> the mask
is kept, otherwise if <code>0</code> it is discarded. Mask will be converted into a bias, which adds large
negative values to the attention scores corresponding to &#x201C;discard&#x201D; tokens.`,name:"attention_mask"},{anchor:"diffusers.ControlNetUnionModel.forward.added_cond_kwargs",description:`<strong>added_cond_kwargs</strong> (<code>dict</code>) &#x2014;
Additional conditions for the Stable Diffusion XL UNet.`,name:"added_cond_kwargs"},{anchor:"diffusers.ControlNetUnionModel.forward.cross_attention_kwargs",description:`<strong>cross_attention_kwargs</strong> (<code>dict[str]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
A kwargs dictionary that if specified is passed along to the <code>AttnProcessor</code>.`,name:"cross_attention_kwargs"},{anchor:"diffusers.ControlNetUnionModel.forward.from_multi",description:`<strong>from_multi</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Use standard scaling when called from <code>MultiControlNetUnionModel</code>.`,name:"from_multi"},{anchor:"diffusers.ControlNetUnionModel.forward.guess_mode",description:`<strong>guess_mode</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
In this mode, the ControlNet encoder tries its best to recognize the input content of the input even if
you remove all prompts. A <code>guidance_scale</code> between 3.0 and 5.0 is recommended.`,name:"guess_mode"},{anchor:"diffusers.ControlNetUnionModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <code>ControlNetOutput</code> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/controlnets/controlnet_union.py#L540",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, a <code>ControlNetOutput</code> is returned, otherwise a tuple is
returned where the first element is the sample tensor.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>ControlNetOutput</code> <strong>or</strong> <code>tuple</code></p>
`}}),I=new X({props:{name:"from_unet",anchor:"diffusers.ControlNetUnionModel.from_unet",parameters:[{name:"unet",val:": UNet2DConditionModel"},{name:"controlnet_conditioning_channel_order",val:": str = 'rgb'"},{name:"conditioning_embedding_out_channels",val:": typing.Optional[typing.Tuple[int, ...]] = (16, 32, 96, 256)"},{name:"load_weights_from_unet",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.ControlNetUnionModel.from_unet.unet",description:`<strong>unet</strong> (<code>UNet2DConditionModel</code>) &#x2014;
The UNet model weights to copy to the <a href="/docs/diffusers/main/en/api/models/controlnet_union#diffusers.ControlNetUnionModel">ControlNetUnionModel</a>. All configuration options are also
copied where applicable.`,name:"unet"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/controlnets/controlnet_union.py#L388"}}),B=new X({props:{name:"set_attention_slice",anchor:"diffusers.ControlNetUnionModel.set_attention_slice",parameters:[{name:"slice_size",val:": typing.Union[str, int, typing.List[int]]"}],parametersDescription:[{anchor:"diffusers.ControlNetUnionModel.set_attention_slice.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code> or <code>list(int)</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, input to the attention heads is halved, so attention is computed in two steps. If
<code>&quot;max&quot;</code>, maximum amount of memory is saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/controlnets/controlnet_union.py#L475"}}),W=new X({props:{name:"set_default_attn_processor",anchor:"diffusers.ControlNetUnionModel.set_default_attn_processor",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/controlnets/controlnet_union.py#L459"}}),A=new Je({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/controlnet_union.md"}}),{c(){y=d("meta"),S=n(),G=d("p"),Q=n(),m(w.$$.fragment),Y=n(),m(x.$$.fragment),K=n(),M=d("p"),M.textContent=Me,ee=n(),U=d("p"),U.innerHTML=Ue,oe=n(),T=d("p"),T.innerHTML=Te,te=n(),m($.$$.fragment),ne=n(),k=d("p"),k.innerHTML=$e,ie=n(),m(D.$$.fragment),se=n(),m(q.$$.fragment),re=n(),l=d("div"),m(L.$$.fragment),ue=n(),E=d("p"),E.textContent=ke,fe=n(),C=d("div"),m(j.$$.fragment),_e=n(),Z=d("p"),Z.innerHTML=De,he=n(),v=d("div"),m(I.$$.fragment),ge=n(),z=d("p"),z.innerHTML=qe,be=n(),g=d("div"),m(B.$$.fragment),ye=n(),J=d("p"),J.textContent=Le,Ce=n(),R=d("p"),R.textContent=je,ve=n(),N=d("div"),m(W.$$.fragment),Ne=n(),F=d("p"),F.textContent=Ie,de=n(),m(A.$$.fragment),ae=n(),V=d("p"),this.h()},l(e){const o=Ee("svelte-u9bgzb",document.head);y=a(o,"META",{name:!0,content:!0}),o.forEach(t),S=i(e),G=a(e,"P",{}),O(G).forEach(t),Q=i(e),p(w.$$.fragment,e),Y=i(e),p(x.$$.fragment,e),K=i(e),M=a(e,"P",{"data-svelte-h":!0}),b(M)!=="svelte-3qwqxp"&&(M.textContent=Me),ee=i(e),U=a(e,"P",{"data-svelte-h":!0}),b(U)!=="svelte-1uo8sal"&&(U.innerHTML=Ue),oe=i(e),T=a(e,"P",{"data-svelte-h":!0}),b(T)!=="svelte-1nmdtkp"&&(T.innerHTML=Te),te=i(e),p($.$$.fragment,e),ne=i(e),k=a(e,"P",{"data-svelte-h":!0}),b(k)!=="svelte-1jebso6"&&(k.innerHTML=$e),ie=i(e),p(D.$$.fragment,e),se=i(e),p(q.$$.fragment,e),re=i(e),l=a(e,"DIV",{class:!0});var c=O(l);p(L.$$.fragment,c),ue=i(c),E=a(c,"P",{"data-svelte-h":!0}),b(E)!=="svelte-1up8inn"&&(E.textContent=ke),fe=i(c),C=a(c,"DIV",{class:!0});var ce=O(C);p(j.$$.fragment,ce),_e=i(ce),Z=a(ce,"P",{"data-svelte-h":!0}),b(Z)!=="svelte-1r91u8l"&&(Z.innerHTML=De),ce.forEach(t),he=i(c),v=a(c,"DIV",{class:!0});var me=O(v);p(I.$$.fragment,me),ge=i(me),z=a(me,"P",{"data-svelte-h":!0}),b(z)!=="svelte-1jb5v16"&&(z.innerHTML=qe),me.forEach(t),be=i(c),g=a(c,"DIV",{class:!0});var H=O(g);p(B.$$.fragment,H),ye=i(H),J=a(H,"P",{"data-svelte-h":!0}),b(J)!=="svelte-7fahc0"&&(J.textContent=Le),Ce=i(H),R=a(H,"P",{"data-svelte-h":!0}),b(R)!=="svelte-1yjwkav"&&(R.textContent=je),H.forEach(t),ve=i(c),N=a(c,"DIV",{class:!0});var pe=O(N);p(W.$$.fragment,pe),Ne=i(pe),F=a(pe,"P",{"data-svelte-h":!0}),b(F)!=="svelte-1lxcwhv"&&(F.textContent=Ie),pe.forEach(t),c.forEach(t),de=i(e),p(A.$$.fragment,e),ae=i(e),V=a(e,"P",{}),O(V).forEach(t),this.h()},h(){P(y,"name","hf:doc:metadata"),P(y,"content",Fe),P(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P(g,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P(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){s(document.head,y),r(e,S,o),r(e,G,o),r(e,Q,o),u(w,e,o),r(e,Y,o),u(x,e,o),r(e,K,o),r(e,M,o),r(e,ee,o),r(e,U,o),r(e,oe,o),r(e,T,o),r(e,te,o),u($,e,o),r(e,ne,o),r(e,k,o),r(e,ie,o),u(D,e,o),r(e,se,o),u(q,e,o),r(e,re,o),r(e,l,o),u(L,l,null),s(l,ue),s(l,E),s(l,fe),s(l,C),u(j,C,null),s(C,_e),s(C,Z),s(l,he),s(l,v),u(I,v,null),s(v,ge),s(v,z),s(l,be),s(l,g),u(B,g,null),s(g,ye),s(g,J),s(g,Ce),s(g,R),s(l,ve),s(l,N),u(W,N,null),s(N,Ne),s(N,F),r(e,de,o),u(A,e,o),r(e,ae,o),r(e,V,o),le=!0},p:We,i(e){le||(f(w.$$.fragment,e),f(x.$$.fragment,e),f($.$$.fragment,e),f(D.$$.fragment,e),f(q.$$.fragment,e),f(L.$$.fragment,e),f(j.$$.fragment,e),f(I.$$.fragment,e),f(B.$$.fragment,e),f(W.$$.fragment,e),f(A.$$.fragment,e),le=!0)},o(e){_(w.$$.fragment,e),_(x.$$.fragment,e),_($.$$.fragment,e),_(D.$$.fragment,e),_(q.$$.fragment,e),_(L.$$.fragment,e),_(j.$$.fragment,e),_(I.$$.fragment,e),_(B.$$.fragment,e),_(W.$$.fragment,e),_(A.$$.fragment,e),le=!1},d(e){e&&(t(S),t(G),t(Q),t(Y),t(K),t(M),t(ee),t(U),t(oe),t(T),t(te),t(ne),t(k),t(ie),t(se),t(re),t(l),t(de),t(ae),t(V)),t(y),h(w,e),h(x,e),h($,e),h(D,e),h(q,e),h(L),h(j),h(I),h(B),h(W),h(A,e)}}}const Fe='{"title":"ControlNetUnionModel","local":"controlnetunionmodel","sections":[{"title":"Loading","local":"loading","sections":[],"depth":2},{"title":"ControlNetUnionModel","local":"diffusers.ControlNetUnionModel","sections":[],"depth":2}],"depth":1}';function He(xe){return Ae(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ke extends Oe{constructor(y){super(),Pe(this,y,He,Re,Be,{})}}export{Ke as component};
